[Durian-svn] [4383] use new operator option for rendering opengl

campbell institute at blender.org
Thu Jun 3 11:29:20 CEST 2010


Revision: 4383
          https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=4383
Author:   campbell
Date:     2010-06-03 11:29:20 +0200 (Thu, 03 Jun 2010)
Log Message:
-----------
use new operator option for rendering opengl

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

Modified: pro/scripts/utilities/batch_bake.py
===================================================================
--- pro/scripts/utilities/batch_bake.py	2010-06-03 09:27:51 UTC (rev 4382)
+++ pro/scripts/utilities/batch_bake.py	2010-06-03 09:29:20 UTC (rev 4383)
@@ -268,33 +268,15 @@
 
     filename = bpy.data.filename.replace(".blend", ".avi")
     bpy.context.scene.render.output_path = os.path.join(RENDER_DIR, os.path.basename(filename))
-    
 
-    
     if OVERRIDE:
         finals_config_setup_all(baked=True)
 
     # quick fix
     # freakin give me a 3d view!!! - make them ALL 3d camera views.
 
-    for ar in bpy.context.window.screen.areas:
-        ar.type = 'VIEW_3D'
-        for sp in ar.spaces:
-            if sp.type == 'VIEW_3D': #                 rna_Scene_active_object_get
-                sp.display_render_override = True
-                sp.lock_camera_and_layers = True
-                sp.viewport_shading = 'SOLID'
-                sp.region_3d.view_perspective = 'CAMERA' # view_
-                bpy.context.scene.update()
+    bpy.context.scene.update()
 
-    # looks crap when enabled
-    for obj in bpy.data.objects:
-        if obj.max_draw_type in ('BOUNDS', 'WIRE'):
-            obj.restrict_view = True
-            continue
-            
-        obj.draw_wire = False
-
     # hey, lets make sintel pretty
     for mat in bpy.data.materials:
         if mat.name == "Sintel_Skin1_layer":
@@ -302,7 +284,7 @@
         elif mat.name == "sintel_hair_shabuffe":
             mat.diffuse_color = 0.6, 0.33, 0.25
 
-    bpy.ops.render.opengl({}, animation=True)
+    bpy.ops.render.opengl({}, animation=True, view_context=False)
 
     sys.exit()
 



More information about the Durian-svn mailing list