[Durian-svn] [4055] updates for rendering 2+ characters at once.

campbell institute at blender.org
Fri May 28 09:54:33 CEST 2010


Revision: 4055
          https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=4055
Author:   campbell
Date:     2010-05-28 09:54:33 +0200 (Fri, 28 May 2010)
Log Message:
-----------
updates for rendering 2+ characters at once.

Modified Paths:
--------------
    pro/scripts/utilities/batch_bake.py

Modified: pro/scripts/utilities/batch_bake.py
===================================================================
--- pro/scripts/utilities/batch_bake.py	2010-05-28 05:41:55 UTC (rev 4054)
+++ pro/scripts/utilities/batch_bake.py	2010-05-28 07:54:33 UTC (rev 4055)
@@ -9,15 +9,15 @@
 
 # BIN = "/b/B"
 BIN = "/br/blender"
-RENDER_DIR = "/tmp/dragon_adult"
+RENDER_DIR = "/tmp/shaman"
 
 MULTIPROCESS = False
 
 # what to bake!!
 DO_SINTEL = False
-DO_SHAMAN = False
+DO_SHAMAN = True
 DO_DRAGON_BABY = False
-DO_DRAGON_ADULT = True
+DO_DRAGON_ADULT = False
 
 
 # print("running", __file__)
@@ -68,14 +68,16 @@
     return objects
 
 
-def get_object_layers(objects):
-    lay = [False] * 20
+def get_object_layers(objects, layers=None):
+    #if layers is None:
+    #    layers = [False] * 20
+    
     for base_inst in objects:
         lay_obj = base_inst.layers[:]
         print("Whee:", lay_obj)
-        lay[:] = [lay_obj[i] | val for i, val in enumerate(lay)]
+        layers[:] = [lay_obj[i] | val for i, val in enumerate(layers)]
 
-    return lay
+    return layers
 
 
 def finals_config_setup_all(baked):
@@ -150,6 +152,7 @@
     check_init()
     use_simplify()
 
+
     if DEBUG:
         bpy.context.scene.frame_end = bpy.context.scene.frame_start + 10
 
@@ -175,6 +178,9 @@
         "active_object": None,
         "object": None
     }
+    
+    # Gather all layers
+    lay = [False] * 20
 
     def generic_run_sim(obj_sim_name, get_pointcache_func, setup_sim_func):
         '''Tricky function to bake '''
@@ -185,7 +191,7 @@
             
             context["point_cache"] = mod_sim.point_cache
 
-            lay = get_object_layers(get_group_instance(obj))
+            lay[:] = get_object_layers(get_group_instance(obj), layers=lay)
             bpy.context.scene.layers = lay
 
             if True not in lay:
@@ -249,6 +255,7 @@
 
     filename = bpy.data.filename.replace(".blend", ".avi")
     bpy.context.scene.render.output_path = os.path.join(RENDER_DIR, os.path.basename(filename))
+    
 
     
     if OVERRIDE:
@@ -292,6 +299,8 @@
     files = [l for l in files if l.endswith("_comp.blend")]
     files.sort()
     
+    
+    
     print("TOT_PROP=`cat /proc/cpuinfo | grep vendor_id | wc -l`")
     print("LIBGL=\"/shared/software/mesa-7.8/lib/libGL.so\"")
     print("")



More information about the Durian-svn mailing list