[gnome-getting-started-docs] task switching - mouse
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-getting-started-docs] task switching - mouse
- Date: Thu, 1 Nov 2012 12:16:20 +0000 (UTC)
commit c2dadd70c7aaa6b61dc1a76ebc2f80e4cc3140c8
Author: Jakub Steiner <jimmac gmail com>
Date: Thu Nov 1 13:14:18 2012 +0100
task switching - mouse
- WIP renderes for responding and task switching
animation/gnome-responding-to-messages.blend | Bin 2178936 -> 2178332 bytes
animation/gnome-responding-to-messages.py | 2 +-
animation/gnome-task-switching.blend | Bin 1467532 -> 1463248 bytes
animation/gnome-task-switching.py | 54 ++++++++++++++++++++
.../C/figures/responding-to-messages-0001-0734.ogg | Bin 0 -> 3207712 bytes
.../C/figures/task-switching-0001-0734.ogg | Bin 0 -> 3507902 bytes
.../figures/responding-to-messages-0001-0734.ogg | Bin 0 -> 1148409 bytes
.../cs/figures/task-switching-0001-0734.ogg | Bin 0 -> 3527395 bytes
8 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/animation/gnome-responding-to-messages.blend b/animation/gnome-responding-to-messages.blend
index d6ac453..4e07a69 100644
Binary files a/animation/gnome-responding-to-messages.blend and b/animation/gnome-responding-to-messages.blend differ
diff --git a/animation/gnome-responding-to-messages.py b/animation/gnome-responding-to-messages.py
index e6275de..c9ace37 100644
--- a/animation/gnome-responding-to-messages.py
+++ b/animation/gnome-responding-to-messages.py
@@ -45,7 +45,7 @@ def main():
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['typewriter2'].data.body = t[lang].find('t[ id="mt.bubble.response"]').text
+ bpy.data.objects['typewriter2'].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 :/
render(lang)
diff --git a/animation/gnome-task-switching.blend b/animation/gnome-task-switching.blend
index 98ab0fe..8ac3996 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
new file mode 100644
index 0000000..77dc051
--- /dev/null
+++ b/animation/gnome-task-switching.py
@@ -0,0 +1,54 @@
+import bpy,os
+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)
+ 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]
+
+def render(lang):
+ #bpy.context.scene.render.resolution_percentage =
+ #bpy.context.scene.render.use_compositing = 0
+ bpy.context.scene.render.use_sequencer = 1
+ renderpath = '../getting-started/'+lang+'/figures'
+ if (not renderpath):
+ os.mkdir(renderpath)
+ bpy.context.scene.render.filepath = "//" + renderpath + '/task-switching-'
+ if (not os.path.isfile(bpy.context.scene.render.frame_path())):
+ bpy.ops.render.render(animation=True)
+ else:
+ print('already rendered')
+
+#translates strings and calls render
+def main():
+ global typewrite
+
+ t = {}
+ #unfortunately no decent fonts have â
+ langs = open('language-whitelist.txt').readlines()
+ for lang in langs:
+ lang = lang.strip()
+ xmlfile = ET.parse('../getting-started/' + lang + '/animation.xml')
+ t[lang] = xmlfile.getroot()
+ 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 :/
+ render(lang)
+
+if __name__ == '__main__':
+ #bpy.app.handlers.frame_change_pre.append(typewriteit)
+ main()
+ #bpy.app.handlers.frame_change_pre.pop(0)
diff --git a/getting-started/C/figures/responding-to-messages-0001-0734.ogg b/getting-started/C/figures/responding-to-messages-0001-0734.ogg
new file mode 100644
index 0000000..a2f349d
Binary files /dev/null and b/getting-started/C/figures/responding-to-messages-0001-0734.ogg differ
diff --git a/getting-started/C/figures/task-switching-0001-0734.ogg b/getting-started/C/figures/task-switching-0001-0734.ogg
new file mode 100644
index 0000000..88d356b
Binary files /dev/null and b/getting-started/C/figures/task-switching-0001-0734.ogg differ
diff --git a/getting-started/cs/figures/responding-to-messages-0001-0734.ogg b/getting-started/cs/figures/responding-to-messages-0001-0734.ogg
new file mode 100644
index 0000000..e7ca9cd
Binary files /dev/null and b/getting-started/cs/figures/responding-to-messages-0001-0734.ogg differ
diff --git a/getting-started/cs/figures/task-switching-0001-0734.ogg b/getting-started/cs/figures/task-switching-0001-0734.ogg
new file mode 100644
index 0000000..f0ceb37
Binary files /dev/null and b/getting-started/cs/figures/task-switching-0001-0734.ogg differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]