[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58034] branches/soc-2013-cycles_mblur: Added the functions to get the newly added properties.
Gavin Howard
gavin.d.howard at gmail.com
Sat Jul 6 08:04:44 CEST 2013
Revision: 58034
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58034
Author: gdh
Date: 2013-07-06 06:04:44 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
Added the functions to get the newly added properties. These functions
will get whether deformation motion blur is enabled and the number of
steps that the user wanted for motion blur for that mesh.
Modified Paths:
--------------
branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
Property Changed:
----------------
branches/soc-2013-cycles_mblur/
Property changes on: branches/soc-2013-cycles_mblur
___________________________________________________________________
Modified: svn:ignore
- BUILD_NOTES.txt
*.pdb
.*
TAGS
cscope.out
sgc.bat
sgd.bat
smc.bat
ssenv.bat
tags
user-config.py
CMakeFiles
CMakeCache.txt
blender.bin
blender.kdev4
.kdev4
+ CMakeLists.txt.user
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-07-06 06:02:11 UTC (rev 58033)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-07-06 06:04:44 UTC (rev 58034)
@@ -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)
More information about the Bf-blender-cvs
mailing list