[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57480] branches/soc-2013-cycles_mblur: Merged trunk into branch at r57476.
Gavin Howard
gavin.d.howard at gmail.com
Sat Jun 15 22:54:15 CEST 2013
Revision: 57480
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57480
Author: gdh
Date: 2013-06-15 20:54:14 +0000 (Sat, 15 Jun 2013)
Log Message:
-----------
Merged trunk into branch at r57476.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57476
Modified Paths:
--------------
branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py
branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py
branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
branches/soc-2013-cycles_mblur/scons/scons-time.py
branches/soc-2013-cycles_mblur/scons/scons.py
branches/soc-2013-cycles_mblur/scons/sconsign.py
branches/soc-2013-cycles_mblur/source/blender/windowmanager/intern/wm_files.c
Added Paths:
-----------
branches/soc-2013-cycles_mblur/scons/scons-local/
Removed Paths:
-------------
branches/soc-2013-cycles_mblur/scons/scons-local-1.2.0.d20090223/
Property Changed:
----------------
branches/soc-2013-cycles_mblur/
Property changes on: branches/soc-2013-cycles_mblur
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-57476
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-57479
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py 2013-06-15 20:12:16 UTC (rev 57479)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/properties.py 2013-06-15 20:54:14 UTC (rev 57480)
@@ -668,6 +668,36 @@
del bpy.types.Mesh.cycles
del bpy.types.Curve.cycles
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_blur
class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py 2013-06-15 20:12:16 UTC (rev 57479)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/addon/ui.py 2013-06-15 20:54:14 UTC (rev 57480)
@@ -518,6 +518,32 @@
col = split.column()
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):
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-06-15 20:12:16 UTC (rev 57479)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-06-15 20:54:14 UTC (rev 57480)
@@ -84,6 +84,36 @@
return flag;
}
+/* Returns the number of steps the user chose to export for mblur. */
+static uint object_mblur_steps(BL::Object b_ob)
+{
+ PointerRNA cmblur = RNA_pointer_get(&b_ob.ptr, "cycles_mblur");
+
+ // 3 is the default.
+ uint steps = 3;
+
+ steps = get_int(cmblur, "mblur_steps");
+
+ // Make sure we get the minimum.
+ steps = steps >= 3 ? steps : 3;
+
+ return steps;
+}
+
+/*
+ * Returns true if the user wants deformation motion blur for the object.
+ * It returns false otherwise.
+ */
+static bool object_use_deform_mblur(BL::Object b_ob)
+{
+ PointerRNA cdeform = RNA_pointer_get(&b_ob.ptr, "cycles_mblur");
+ bool useDeform = false;
+
+ useDeform = get_boolean(cdeform, "use_deformation_mblur");
+
+ return useDeform;
+}
+
/* Light */
void BlenderSync::sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::Object b_ob, Transform& tfm)
Modified: branches/soc-2013-cycles_mblur/scons/scons-time.py
===================================================================
--- branches/soc-2013-cycles_mblur/scons/scons-time.py 2013-06-15 20:12:16 UTC (rev 57479)
+++ branches/soc-2013-cycles_mblur/scons/scons-time.py 2013-06-15 20:54:14 UTC (rev 57480)
@@ -9,7 +9,7 @@
#
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -29,36 +29,58 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
+from __future__ import division
from __future__ import nested_scopes
-__revision__ = "src/script/scons-time.py 4043 2009/02/23 09:06:45 scons"
+__revision__ = "src/script/scons-time.py 2013/03/03 09:48:35 garyo"
import getopt
import glob
import os
-import os.path
import re
import shutil
-import string
import sys
import tempfile
import time
try:
- False
+ sorted
except NameError:
- # Pre-2.2 Python has no False keyword.
- import __builtin__
- __builtin__.False = not 1
+ # Pre-2.4 Python has no sorted() function.
+ #
+ # The pre-2.4 Python list.sort() method does not support
+ # list.sort(key=) nor list.sort(reverse=) keyword arguments, so
+ # we must implement the functionality of those keyword arguments
+ # by hand instead of passing them to list.sort().
+ def sorted(iterable, cmp=None, key=None, reverse=False):
+ if key is not None:
+ result = [(key(x), x) for x in iterable]
+ else:
+ result = iterable[:]
+ if cmp is None:
+ # Pre-2.3 Python does not support list.sort(None).
+ result.sort()
+ else:
+ result.sort(cmp)
+ if key is not None:
+ result = [t1 for t0,t1 in result]
+ if reverse:
+ result.reverse()
+ return result
-try:
- True
-except NameError:
- # Pre-2.2 Python has no True keyword.
- import __builtin__
- __builtin__.True = not 0
+if os.environ.get('SCONS_HORRIBLE_REGRESSION_TEST_HACK') is not None:
+ # We can't apply the 'callable' fixer until the floor is 2.6, but the
+ # '-3' option to Python 2.6 and 2.7 generates almost ten thousand
+ # warnings. This hack allows us to run regression tests with the '-3'
+ # option by replacing the callable() built-in function with a hack
+ # that performs the same function but doesn't generate the warning.
+ # Note that this hack is ONLY intended to be used for regression
+ # testing, and should NEVER be used for real runs.
+ from types import ClassType
+ def callable(obj):
+ if hasattr(obj, '__call__'): return True
+ if isinstance(obj, (ClassType, type)): return True
+ return False
def make_temp_file(**kw):
try:
@@ -79,7 +101,18 @@
tempfile.template = save_template
return result
-class Plotter:
+def HACK_for_exec(cmd, *args):
+ '''
+ For some reason, Python won't allow an exec() within a function
+ that also declares an internal function (including lambda functions).
+ This function is a hack that calls exec() in a function with no
+ internal functions.
+ '''
+ if not args: exec(cmd)
+ elif len(args) == 1: exec cmd in args[0]
+ else: exec cmd in args[0], args[1]
+
+class Plotter(object):
def increment_size(self, largest):
"""
Return the size of each horizontal increment line for a specified
@@ -87,12 +120,12 @@
between 5 and 9 horizontal lines on the graph, on some set of
boundaries that are multiples of 10/100/1000/etc.
"""
- i = largest / 5
+ i = largest // 5
if not i:
return largest
multiplier = 1
while i >= 10:
- i = i / 10
+ i = i // 10
multiplier = multiplier * 10
return i * multiplier
@@ -100,9 +133,9 @@
# Round up to next integer.
largest = int(largest) + 1
increment = self.increment_size(largest)
- return ((largest + increment - 1) / increment) * increment
+ return ((largest + increment - 1) // increment) * increment
-class Line:
+class Line(object):
def __init__(self, points, type, title, label, comment, fmt="%s %s"):
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list