[gnome-getting-started-docs] fixed paths



commit 418804e243f02e8e25f51551141754aafbb2e503
Author: Jakub Steiner <jimmac gmail com>
Date:   Thu Jan 3 17:20:43 2013 +0100

    fixed paths

 animation/gnome-change-wallpaper.blend             |  Bin 1479408 -> 1485776 bytes
 animation/gnome-change-wallpaper.py                |   22 +++++++---------
 animation/gnome-launching-applications.blend       |  Bin 1697708 -> 1699716 bytes
 animation/gnome-launching-applications.py          |   26 +++++++++++++------
 getting-started/C/figures/changing-wallpaper.png   |  Bin 69554 -> 0 bytes
 getting-started/C/figures/changing-wallpaper.webm  |  Bin 3338466 -> 0 bytes
 getting-started/C/figures/launching-apps.png       |  Bin 154347 -> 0 bytes
 getting-started/C/figures/launching-apps.webm      |  Bin 5085128 -> 0 bytes
 getting-started/C/index.page                       |    2 +-
 getting-started/C/launch-apps.page                 |    2 +-
 getting-started/Makefile.am                        |    4 +-
 getting-started/cs/figures/changing-wallpaper.webm |  Bin 3346613 -> 0 bytes
 getting-started/cs/figures/launching-apps.webm     |  Bin 4945812 -> 0 bytes
 13 files changed, 32 insertions(+), 24 deletions(-)
---
diff --git a/animation/gnome-change-wallpaper.blend b/animation/gnome-change-wallpaper.blend
index e620ff7..5d6f54b 100644
Binary files a/animation/gnome-change-wallpaper.blend and b/animation/gnome-change-wallpaper.blend differ
diff --git a/animation/gnome-change-wallpaper.py b/animation/gnome-change-wallpaper.py
index 60a4853..46f021c 100644
--- a/animation/gnome-change-wallpaper.py
+++ b/animation/gnome-change-wallpaper.py
@@ -3,34 +3,32 @@ from xml.etree import ElementTree as ET
 
  
 def render(lang):
-  global renderpath
+  global renderpath,renderpathabs,sndfile
   
   #bpy.context.scene.render.resolution_percentage =
   #bpy.context.scene.render.use_compositing = 0
   bpy.context.scene.render.use_sequencer = 1
   renderpath = '//sequence/'+lang
-  sndfile = renderpath+'/snd/snd.flac'
-  if (not renderpath):
-    os.mkdir(renderpath)
-  if (not renderpath+'/snd'):
-    os.mkdir(renderpath+'/snd')
+  
   regexobj = re.search(r"^(.*\/)*(.*)(\.blend)$", bpy.data.filepath)
   bpy.context.scene.render.filepath = "%s/%s/" % (renderpath,regexobj.group(2))
-  if (not os.path.isfile(bpy.context.scene.render.frame_path())):
+  renderpathabs = "%ssequence/%s/%s" % (regexobj.group(1),lang,regexobj.group(2))
+  sndpath = "%s/snd" % (renderpathabs)
+  sndfile = "%s/snd.flac" % (sndpath)
+  if (not os.path.isdir(renderpathabs)):
     bpy.ops.render.render(animation=True)
+  if (not os.path.isdir(sndpath)):
+    os.mkdir(sndpath)
     bpy.ops.sound.mixdown(filepath=sndfile)
   else:
     print('already rendered',bpy.context.scene.render.frame_path())
 
 def transcode(lang):
-  global renderpath
-  #FIXME
+  global renderpath,renderpathabs,sndfile
   #theora gst-launch-1.0 oggmux name=mux ! filesink location="../video.webm"    file:///home/jimmac/src/git/gnome/gnome-getting-started-docs/animation/sequence/C/changing-wallpaper/snd/test.flac ! decodebin ! audioconvert ! vorbisenc ! mux.     multifilesrc location="/home/jimmac/src/git/gnome/gnome-getting-started-docs/animation/sequence/C/changing-wallpaper/%04d.png" index=1 caps="image/png,framerate=\(fraction\)25/1" ! pngdec ! videoconvert ! videorate ! theoraenc ! mux.
-  #webm gst-launch-1.0 webmmux name=mux ! filesink location="../video.webm"    file:///home/jimmac/src/git/gnome/gnome-getting-started-docs/animation/sequence/C/changing-wallpaper/snd/test.flac ! decodebin ! audioconvert ! vorbisenc ! mux.     multifilesrc location="/home/jimmac/src/git/gnome/gnome-getting-started-docs/animation/sequence/C/changing-wallpaper/%04d.png" index=1 caps="image/png,framerate=\(fraction\)25/1" ! pngdec ! videoconvert ! videoscale ! videorate ! vp8enc threads=4 ! mux.
   regexobj = re.search(r"^(.*\/)*(.*)(\.blend)$", bpy.data.filepath)
-  framepath = "%ssequence/%s/%s" % (regexobj.group(1),lang,regexobj.group(2))
+  framepath = renderpathabs
   webmfile = "%s.webm" % (regexobj.group(2))
-  sndfile = "%ssequence/%s/%s/snd/snd.flac" % (regexobj.group(1),lang,regexobj.group(2))
   transcodepath = "../getting-started/%s/figures/" % (lang)
   
   #print(transcodepath,webmfile,sndfile,framepath)
diff --git a/animation/gnome-launching-applications.blend b/animation/gnome-launching-applications.blend
index 4f93d2a..8552067 100644
Binary files a/animation/gnome-launching-applications.blend and b/animation/gnome-launching-applications.blend differ
diff --git a/animation/gnome-launching-applications.py b/animation/gnome-launching-applications.py
index 8ff3c46..63f6a88 100644
--- a/animation/gnome-launching-applications.py
+++ b/animation/gnome-launching-applications.py
@@ -2,25 +2,34 @@ import bpy,os,re
 from xml.etree import ElementTree as ET
 
 def render(lang):
+  global renderpath
   #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)
+  sndfile = renderpath+'/snd/snd.flac'
+  regexobj = re.search(r"^(.*\/)*(.*)(\.blend)$", bpy.data.filepath)
+  bpy.context.scene.render.filepath = "%s/%s/" % (renderpath,regexobj.group(2))
   bpy.context.scene.render.filepath = "//" + renderpath + '/launching-apps-'
   if (not os.path.isfile(bpy.context.scene.render.frame_path())):
     bpy.ops.render.render(animation=True)
+    bpy.ops.sound.mixdown(filepath=sndfile)
   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
+    print('already rendered')  
+
+def transcode(lang):
+  global renderpath
+  regexobj = re.search(r"^(.*\/)*(.*)(\.blend)$", bpy.data.filepath)
+  framepath = "%ssequence/%s/%s" % (regexobj.group(1),lang,regexobj.group(2))
+  webmfile = "%s.webm" % (regexobj.group(2))
+  sndfile = "%ssequence/%s/%s/snd/snd.flac" % (regexobj.group(1),lang,regexobj.group(2))
+  transcodepath = "../getting-started/%s/figures/" % (lang)
+  
+  transcodecmd = "gst-launch-1.0 webmmux name=mux ! filesink location=\"%s/%s\"    file://%s ! decodebin ! audioconvert ! vorbisenc ! mux.     multifilesrc location=\"%s/%%04d.png\" index=1 caps=\"image/png,framerate=\(fraction\)25/1\" ! pngdec ! videoconvert ! videoscale ! videorate ! vp8enc threads=4 ! mux." % (transcodepath,webmfile,sndfile,framepath)
   if (not os.path.isfile(transcodepath+webmfile)):
     os.system(transcodecmd)
   else:
-    print('already transcoded',transcodepath + webmfile)
+    print('already transcoded',transcodepath + webmfile)  
 
   
 #translates strings and calls render
@@ -40,6 +49,7 @@ def main():
         bpy.data.objects[textobj.get('id')].data.body = textobj.text
     bpy.data.objects['typewriter'].data.body = t[lang].find('t[ id="search"]').text
     render(lang)
+    transcode(lang)
     
 if __name__ == '__main__':
     main()
diff --git a/getting-started/C/index.page b/getting-started/C/index.page
index 6a9ecf0..299028c 100644
--- a/getting-started/C/index.page
+++ b/getting-started/C/index.page
@@ -13,7 +13,7 @@
 <title>Getting Started</title>
 
   <ui:overlay width="235" height="145">
-  <media type="video" src="figures/launching-apps.webm" width="700" height="394">
+  <media type="video" src="figures/gnome-launching-applications.webm" width="700" height="394">
     <!-- FIXME: needs some sort of label -->
     <ui:thumb src="figures/launching-apps.png"/>
   </media>
diff --git a/getting-started/C/launch-apps.page b/getting-started/C/launch-apps.page
index 0e8d32b..b6c7a7e 100644
--- a/getting-started/C/launch-apps.page
+++ b/getting-started/C/launch-apps.page
@@ -20,7 +20,7 @@
 
   <title>Launching applications</title>
 
-   <media type="video" src="figures/launching-apps.webm" width="840" height="468">
+   <media type="video" src="figures/gnome-launching-applications.webm" width="840" height="468">
      <media type="image" style="poster" src="figures/launching-apps.png"/>
    </media>
   
diff --git a/getting-started/Makefile.am b/getting-started/Makefile.am
index 23ccb3b..c7c7c58 100644
--- a/getting-started/Makefile.am
+++ b/getting-started/Makefile.am
@@ -6,9 +6,9 @@ HELP_LINGUAS = cs
 
 HELP_MEDIA = \
 	figures/changing-wallpaper.png \
-	figures/changing-wallpaper.webm \
+	figures/gnome-change-wallpaper.webm \
 	figures/launching-apps.png \
-	figures/launching-apps.webm \
+	figures/gnome-launching-applications.webm \
 	figures/responding-to-messages.png \
 	figures/responding-to-messages.webm \
 	figures/task-switching.png \



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