[gnome-getting-started-docs] mouse control for windows and workspaces
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-getting-started-docs] mouse control for windows and workspaces
- Date: Fri, 30 Nov 2012 12:40:47 +0000 (UTC)
commit 6d7ce9d25d9d0fae4b3965e875eff83942b27f2e
Author: Jakub Steiner <jimmac gmail com>
Date: Fri Nov 30 13:39:29 2012 +0100
mouse control for windows and workspaces
- 2 new scenes
- basic sequence
- still glitchy
animation/gnome-windows-and-workspaces.blend | Bin 2219600 -> 2909720 bytes
animation/gnome-windows-and-workspaces.py | 42 ++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/animation/gnome-windows-and-workspaces.blend b/animation/gnome-windows-and-workspaces.blend
index bbf628a..69de83b 100644
Binary files a/animation/gnome-windows-and-workspaces.blend and b/animation/gnome-windows-and-workspaces.blend differ
diff --git a/animation/gnome-windows-and-workspaces.py b/animation/gnome-windows-and-workspaces.py
new file mode 100644
index 0000000..11a417b
--- /dev/null
+++ b/animation/gnome-windows-and-workspaces.py
@@ -0,0 +1,42 @@
+import bpy,os,re
+from xml.etree import ElementTree as ET
+
+def render(lang):
+ #bpy.context.scene.render.resolution_percentage =
+ #bpy.context.scene.render.use_compositing = 0
+ bpy.context.scene.render.use_sequencer = 1
+ renderpath = '//sequence/'+lang
+ if (not renderpath):
+ os.mkdir(renderpath)
+ bpy.context.scene.render.filepath = "//" + renderpath + '/windows-and-workspaces-'
+ if (not os.path.isfile(bpy.context.scene.render.frame_path())):
+ bpy.ops.render.render(animation=True)
+ else:
+ print('already rendered')
+ transcodepath = "../getting-started/" + lang + "/figures/"
+ regexobj = re.search(r"^(.*\/)(.*)-(\d*)-(\d*)(\.avi)$", bpy.context.scene.render.frame_path())
+ webmfile = regexobj.group(2) + ".webm"
+ transcodecmd = "ffmpeg -y -i " + bpy.context.scene.render.frame_path() + " -b:v 8000k " + transcodepath + webmfile
+ if (not os.path.isfile(transcodepath+webmfile)):
+ os.system(transcodecmd)
+ else:
+ print('already transcoded',transcodepath + webmfile)
+
+#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
+ render(lang)
+
+if __name__ == '__main__':
+ main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]