[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58220] branches/soc-2013-cycles_mblur/ intern/cycles/blender/addon: This commit changes many elements of the UI for object motion blur.

Gavin Howard gavin.d.howard at gmail.com
Sat Jul 13 20:23:08 CEST 2013


Revision: 58220
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58220
Author:   gdh
Date:     2013-07-13 18:23:08 +0000 (Sat, 13 Jul 2013)
Log Message:
-----------
This commit changes many elements of the UI for object motion blur.

First of all, the Motion Blur section of the Object menu is only dis- 
played if CPU is selected and if Motion Blur is enabled under the Render 
Settings. Second of all, there is now a checkbox next to the header of 
the Object Motion Blur section which enables the section when checked.

I changed it like this because Cycles will begin to support per-object 
blur, and not every object needs to export more than one step. Some 
don't move at all. For those objects, motion blur can be disabled.

I do not know how not exporting extra steps will affect motion blur when 
the *camera* is animated, and not the objects, but I don't think it will 
affect anything.

Modified Paths:
--------------
    branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py
    branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py

Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py	2013-07-13 16:25:47 UTC (rev 58219)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py	2013-07-13 18:23:08 UTC (rev 58220)
@@ -687,6 +687,12 @@
                 type=cls,
                 )
 
+        cls.use_object_mblur = BoolProperty(
+                name="Use Motion Blur",
+                description="Use motion blur for this object",
+                default=False,
+                )
+
         cls.use_deformation_mblur = BoolProperty(
                 name="Use Deformation Motion Blur",
                 description="Use deformation motion blur for this object",

Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py	2013-07-13 16:25:47 UTC (rev 58219)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py	2013-07-13 18:23:08 UTC (rev 58220)
@@ -531,26 +531,45 @@
     def poll(cls, context):
         ob = context.object
         return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META'}  # todo: 'LAMP'
+        
+    def draw_header(self, context):
 
-    def draw(self, context):
-        layout = self.layout
+        rd = context.scene.render
 
         scene = context.scene
         cscene = scene.cycles
 
+        if (rd.use_motion_blur and cscene.device == 'CPU'):
+            ob = context.object
+            blur = ob.cycles_mblur
+
+            self.layout.prop(blur, "use_object_mblur", text="")
+
+    def draw(self, context):
+
         rd = context.scene.render
-        layout.active = rd.use_motion_blur and cscene.device == 'CPU'
 
-        ob = context.object
-        blur = ob.cycles_mblur
+        scene = context.scene
+        cscene = scene.cycles
 
-        row = layout.row()
-        row.prop(blur, "mblur_steps", text="Steps")
+        if (rd.use_motion_blur and cscene.device == 'CPU'):
+            layout = self.layout
 
-        row = layout.row()
-        row.prop(blur, "use_deformation_mblur", text="Deformation Motion Blur")
+            scene = context.scene
+            cscene = scene.cycles
 
+            ob = context.object
+            blur = ob.cycles_mblur
 
+            layout.active = blur.use_object_mblur
+
+            row = layout.row()
+            row.prop(blur, "mblur_steps", text="Steps")
+
+            row = layout.row()
+            row.prop(blur, "use_deformation_mblur", text="Deformation Motion Blur")
+
+
 class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
     bl_label = "Ray Visibility"
     bl_context = "object"




More information about the Bf-blender-cvs mailing list