[gnome-getting-started-docs] Keyboard/search driven switching scene



commit a2c1f31ca4b26d5fac9a40f8541935860e383412
Author: Jakub Steiner <jimmac gmail com>
Date:   Wed Nov 7 19:43:38 2012 +0100

    Keyboard/search driven switching scene

 animation/gnome-task-switching.blend |  Bin 2362980 -> 2410228 bytes
 animation/gnome-task-switching.py    |   21 +++++++--------------
 animation/tex/empathy.png            |  Bin 0 -> 7093 bytes
 animation/tex/files.png              |  Bin 0 -> 13814 bytes
 getting-started/C/animation.xml      |    1 +
 5 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/animation/gnome-task-switching.blend b/animation/gnome-task-switching.blend
index 1c8e624..1ffb1a5 100644
Binary files a/animation/gnome-task-switching.blend and b/animation/gnome-task-switching.blend differ
diff --git a/animation/gnome-task-switching.py b/animation/gnome-task-switching.py
index 77dc051..7d81ce0 100644
--- a/animation/gnome-task-switching.py
+++ b/animation/gnome-task-switching.py
@@ -3,19 +3,13 @@ from xml.etree import ElementTree as ET
 
 def typewriteit(scene):
   typewrite = bpy.data.objects['typewriter'].data.body
-  typewrite2 = bpy.data.objects['typewriter2'].data.body
-  #psani zacina v sekvenci na 152
-  if bpy.context.scene.frame_current >= 152:
-    i = int((bpy.context.scene.frame_current-152)/2)
+  #psani zacina v sekvenci na 151
+  if bpy.context.scene.frame_current >= 151:
+    i = int((bpy.context.scene.frame_current-152)/3)
   else:
     i = 0
-  if bpy.context.scene.frame_current >= 640:
-    j = int((bpy.context.scene.frame_current-640)/2)
-  else:
-    j = 0
   #print(typewrite, i, typewrite[:i])
-  bpy.data.objects['bubble.response'].data.body = typewrite[:i]
-  bpy.data.objects['mt.bubble.response'].data.body = typewrite2[:j]
+  bpy.data.objects['search2'].data.body = typewrite[:i]
 
 def render(lang):
   #bpy.context.scene.render.resolution_percentage =
@@ -44,11 +38,10 @@ def main():
     for textobj in t[lang].findall('t'):
       if textobj.get('id') in bpy.data.objects: #prelozit jestli existuje jako index
         bpy.data.objects[textobj.get('id')].data.body = textobj.text
-    #bpy.data.objects['typewriter'].data.body = t[lang].find('t[ id="bubble.response"]').text
-    #bpy.data.objects['user.mt.bubble'].data.body = bpy.data.objects['user'].data.body #needs to be left aligned :/
+    bpy.data.objects['typewriter'].data.body = t[lang].find('t[ id="search2"]').text
     render(lang)
     
 if __name__ == '__main__':
-    #bpy.app.handlers.frame_change_pre.append(typewriteit)
+    bpy.app.handlers.frame_change_pre.append(typewriteit)
     main()
-    #bpy.app.handlers.frame_change_pre.pop(0)
+    bpy.app.handlers.frame_change_pre.pop(0)
diff --git a/animation/tex/empathy.png b/animation/tex/empathy.png
new file mode 100644
index 0000000..a490e2f
Binary files /dev/null and b/animation/tex/empathy.png differ
diff --git a/animation/tex/files.png b/animation/tex/files.png
new file mode 100644
index 0000000..421a0c1
Binary files /dev/null and b/animation/tex/files.png differ
diff --git a/getting-started/C/animation.xml b/getting-started/C/animation.xml
index 3033a28..b16cfc2 100644
--- a/getting-started/C/animation.xml
+++ b/getting-started/C/animation.xml
@@ -9,6 +9,7 @@
 <t id='alt'>alt</t>
 <t id='tab'>tab</t>
 <t id='search'>help</t>
+<t id='search2'>web</t>
 <t id='title-justtype'>Just start typingâ</t>
 <t id='user'>John Doe</t>
 <t id='systemsettings'>System Settings</t>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]