[gnome-getting-started-docs] Cleanup for branding



commit 08192753bcd9004bba2134110767ceb7c63e2017
Author: Jakub Steiner <jimmac gmail com>
Date:   Mon Dec 10 13:43:51 2012 +0100

    Cleanup for branding
    
    - change the script to go by python scripts.
    - use GNOME world consistently to allow for rebranding
    - fix up some titles
    
    Conflicts:
    	animation/render-localized.sh

 animation/gnome-launching-applications.py    |   17 ++++++++++++++++-
 animation/gnome-responding-to-messages.blend |  Bin 2691508 -> 2672564 bytes
 animation/gnome-responding-to-messages.py    |   17 ++++++++++++++++-
 animation/gnome-task-switching.blend         |  Bin 2593116 -> 2574156 bytes
 animation/gnome-task-switching.py            |   17 ++++++++++++++++-
 animation/gnome-windows-and-workspaces.blend |  Bin 2840092 -> 2821052 bytes
 animation/gnome-windows-and-workspaces.py    |   15 +++++++++++++++
 animation/render-localized.sh                |    6 +++---
 8 files changed, 66 insertions(+), 6 deletions(-)
---
diff --git a/animation/gnome-launching-applications.py b/animation/gnome-launching-applications.py
index 8ccf145..e26895d 100644
--- a/animation/gnome-launching-applications.py
+++ b/animation/gnome-launching-applications.py
@@ -21,7 +21,21 @@ def render(lang):
     os.system(transcodecmd)
   else:
     print('already transcoded',transcodepath + webmfile)
-    
+
+def brandificate():
+
+  worldgnome = bpy.data.worlds['World GNOME'] 
+  worldrhel = bpy.data.worlds['World RHEL']
+  font = bpy.data.fonts['Overpass-Reg']
+
+  for scene in bpy.data.scenes:
+    if (scene.world == worldgnome):
+      scene.world = worldrhel #replace background color
+  for bobj in bpy.data.objects:
+    #if (bobj.type == 'FONT' and bobj.get('branded')): #sadly doesn't work
+    if (bobj.type == 'FONT' and (bobj.name[:5]=='title')): #replace title font with Overpass Bold
+      bobj.data.font = font
+  
 #translates strings and calls render
 def main():
   global typewrite
@@ -38,6 +52,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="search"]').text
+    brandificate()
     render(lang)
     
 if __name__ == '__main__':
diff --git a/animation/gnome-responding-to-messages.blend b/animation/gnome-responding-to-messages.blend
index 981beb2..8822060 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 9133ae3..dd78f09 100644
--- a/animation/gnome-responding-to-messages.py
+++ b/animation/gnome-responding-to-messages.py
@@ -23,7 +23,21 @@ def render(lang):
     os.system(transcodecmd)
   else:
     print('already transcoded',transcodepath + webmfile)
-        
+  
+def brandificate():
+
+  worldgnome = bpy.data.worlds['World GNOME'] 
+  worldrhel = bpy.data.worlds['World RHEL']
+  font = bpy.data.fonts['Overpass-Reg']
+
+  for scene in bpy.data.scenes:
+    if (scene.world == worldgnome):
+      scene.world = worldrhel #replace background color
+  for bobj in bpy.data.objects:
+    #if (bobj.type == 'FONT' and bobj.get('branded')): #sadly doesn't work
+    if (bobj.type == 'FONT' and (bobj.name[:5]=='title')): #replace title font with Overpass Bold
+      bobj.data.font = font
+      
 #translates strings and calls render
 def main():
   
@@ -41,6 +55,7 @@ def main():
     bpy.data.objects['typewriter2'].data.body = t[lang].find('t[ id="bubble.response2"]').text
     bpy.data.objects['typewriter3'].data.body = t[lang].find('t[ id="bubble.response3"]').text
     bpy.data.objects['user.mt.bubble'].data.body = bpy.data.objects['user'].data.body #needs to be left aligned :/
+    brandificate()
     render(lang)
     
 if __name__ == '__main__':
diff --git a/animation/gnome-task-switching.blend b/animation/gnome-task-switching.blend
index f80c49d..0dc275c 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 1ee708e..c4a90fd 100644
--- a/animation/gnome-task-switching.py
+++ b/animation/gnome-task-switching.py
@@ -31,7 +31,21 @@ def render(lang):
     os.system(transcodecmd)
   else:
     print('already transcoded',transcodepath + webmfile)
-        
+
+def brandificate():
+
+  worldgnome = bpy.data.worlds['World GNOME'] 
+  worldrhel = bpy.data.worlds['World RHEL']
+  font = bpy.data.fonts['Overpass-Reg']
+
+  for scene in bpy.data.scenes:
+    if (scene.world == worldgnome):
+      scene.world = worldrhel #replace background color
+  for bobj in bpy.data.objects:
+    #if (bobj.type == 'FONT' and bobj.get('branded')): #sadly doesn't work
+    if (bobj.type == 'FONT' and (bobj.name[:5]=='title')): #replace title font with Overpass Bold
+      bobj.data.font = font
+
 #translates strings and calls render
 def main():
   global typewrite
@@ -47,6 +61,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="search2"]').text
+    brandificate()
     render(lang)
     
 if __name__ == '__main__':
diff --git a/animation/gnome-windows-and-workspaces.blend b/animation/gnome-windows-and-workspaces.blend
index ad6b868..d87ee51 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
index 11a417b..a145367 100644
--- a/animation/gnome-windows-and-workspaces.py
+++ b/animation/gnome-windows-and-workspaces.py
@@ -21,6 +21,20 @@ def render(lang):
     os.system(transcodecmd)
   else:
     print('already transcoded',transcodepath + webmfile)
+
+def brandificate():
+
+  worldgnome = bpy.data.worlds['World GNOME'] 
+  worldrhel = bpy.data.worlds['World RHEL']
+  font = bpy.data.fonts['Overpass-Reg']
+
+  for scene in bpy.data.scenes:
+    if (scene.world == worldgnome):
+      scene.world = worldrhel #replace background color
+  for bobj in bpy.data.objects:
+    #if (bobj.type == 'FONT' and bobj.get('branded')): #sadly doesn't work
+    if (bobj.type == 'FONT' and (bobj.name[:5]=='title')): #replace title font with Overpass Bold
+      bobj.data.font = font
         
 #translates strings and calls render
 def main():
@@ -36,6 +50,7 @@ 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
+    brandificate()
     render(lang)
     
 if __name__ == '__main__':
diff --git a/animation/render-localized.sh b/animation/render-localized.sh
index f4be5b0..629b665 100755
--- a/animation/render-localized.sh
+++ b/animation/render-localized.sh
@@ -7,7 +7,7 @@ case $1 in
 	  blender="blender";;
 esac
 
-for file in *blend
-  do script=`basename $file blend`py
-  $blender -b $file -P $script
+for script in *py
+  do blend=`basename $script py`blend
+  $blender -b $blend -P $script
 done



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