[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58033] branches/soc-2013-cycles_mblur/ intern/cycles/blender/addon: Added the GUI code again.
Gavin Howard
gavin.d.howard at gmail.com
Sat Jul 6 08:02:11 CEST 2013
Revision: 58033
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58033
Author: gdh
Date: 2013-07-06 06:02:11 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
Added the GUI code again. This originally came in on r57484.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57484
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-06 05:22:17 UTC (rev 58032)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py 2013-07-06 06:02:11 UTC (rev 58033)
@@ -676,6 +676,35 @@
del bpy.types.MetaBall.cycles
+class CyclesObjectBlurSettings(bpy.types.PropertyGroup):
+
+ @classmethod
+ def register(cls):
+
+ bpy.types.Object.cycles_mblur = PointerProperty(
+ name="Cycles Motion Blur Settings",
+ description="Per-Object Cycles motion blur settings",
+ type=cls,
+ )
+
+ cls.use_deformation_mblur = BoolProperty(
+ name="Use Deformation Motion Blur",
+ description="Use deformation motion blur for this object",
+ default=False,
+ )
+
+ cls.mblur_steps = IntProperty(
+ name="Motion Blur Steps",
+ description="Number of steps to export for rendering motion blur",
+ min=3, soft_max=256,
+ default=3,
+ )
+
+ @classmethod
+ def unregister(cls):
+ del bpy.types.Object.cycles_mblur
+
+
class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
@classmethod
def register(cls):
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-06 05:22:17 UTC (rev 58032)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py 2013-07-06 06:02:11 UTC (rev 58033)
@@ -520,6 +520,32 @@
col.label()
+class CyclesObject_PT_mblur(CyclesButtonsPanel, Panel):
+ bl_label = "Motion Blur"
+ bl_context = "object"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ 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(self, context):
+ layout = self.layout
+
+ rd = context.scene.render
+ layout.active = rd.use_motion_blur
+
+ ob = context.object
+ blur = ob.cycles_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