[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58461] branches/soc-2013-cycles_mblur/ intern/cycles/blender: Renamed the "motion" variable in blender_object. cpp to "export_time".

Gavin Howard gavin.d.howard at gmail.com
Sun Jul 21 00:31:56 CEST 2013


Revision: 58461
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58461
Author:   gdh
Date:     2013-07-20 22:31:56 +0000 (Sat, 20 Jul 2013)
Log Message:
-----------
Renamed the "motion" variable in blender_object.cpp to "export_time". 
This is a better name for the variable, and I was annoyed, so I changed 
it.

Modified Paths:
--------------
    branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
    branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h

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-20 20:29:23 UTC (rev 58460)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp	2013-07-20 22:31:56 UTC (rev 58461)
@@ -262,14 +262,14 @@
 
 /* Object */
 
-Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_ob, Transform& tfm, uint layer_flag, float motion, bool hide_tris)
+Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_ob, Transform& tfm, uint layer_flag, float export_time, bool hide_tris)
 {
 	BL::Object b_ob = (b_dupli_ob ? b_dupli_ob.object() : b_parent);
 	
 	/* light is handled separately */
 	if(object_is_light(b_ob)) {
 		/* don't use lamps for excluded layers used as mask layer */
-		if(!motion && !((layer_flag & render_layer.holdout_layer) && (layer_flag & render_layer.exclude_layer)))
+		if(!export_time && !((layer_flag & render_layer.holdout_layer) && (layer_flag & render_layer.exclude_layer)))
 			sync_light(b_parent, persistent_id, b_ob, tfm);
 
 		return NULL;
@@ -284,12 +284,12 @@
 	Object *object;
 
 	/* motion vector case */
-	if(motion) {
+	if(export_time) {
 		object = object_map.find(key);
 
 		if(object) {
 			if(tfm != object->tfm) {
-				if(motion == -1)
+				if(export_time == -1)
 					object->motion.pre = tfm;
 				else
 					object->motion.post = tfm;
@@ -297,7 +297,7 @@
 
 			/* mesh deformation blur not supported yet */
 			if(!scene->integrator->motion_blur)
-				sync_mesh_motion(b_ob, object->mesh, motion);
+				sync_mesh_motion(b_ob, object->mesh, export_time);
 		}
 
 		return object;
@@ -448,12 +448,12 @@
 
 /* Object Loop */
 
-void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, std::set<float> *export_times, float motion)
+void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, std::set<float> *export_times, float export_time)
 {
 	/* layer data */
 	uint scene_layer = render_layer.scene_layer;
 	
-	if(!motion) {
+	if(!export_time) {
 		/* prepare for sync */
 		light_map.pre_sync();
 		mesh_map.pre_sync();
@@ -499,11 +499,11 @@
 							BL::Array<int, OBJECT_PERSISTENT_ID_SIZE> persistent_id = b_dup->persistent_id();
 
 							/* sync object and mesh or light data */
-							Object *object = sync_object(*b_ob, persistent_id.data, *b_dup, tfm, ob_layer, motion, hide_tris);
+							Object *object = sync_object(*b_ob, persistent_id.data, *b_dup, tfm, ob_layer, export_time, hide_tris);
 
 							/* sync possible particle data, note particle_id
 							 * starts counting at 1, first is dummy particle */
-							if(!motion && object && sync_dupli_particle(*b_ob, *b_dup, object)) {
+							if(!export_time && object && sync_dupli_particle(*b_ob, *b_dup, object)) {
 								if(particle_id != object->particle_id) {
 									object->particle_id = particle_id;
 									scene->object_manager->tag_update(scene);
@@ -524,7 +524,7 @@
 				if(!object_render_hide(*b_ob, true, true, hide_tris)) {
 					/* object itself */
 					Transform tfm = get_transform(b_ob->matrix_world());
-					sync_object(*b_ob, NULL, PointerRNA_NULL, tfm, ob_layer, motion, hide_tris);
+					sync_object(*b_ob, NULL, PointerRNA_NULL, tfm, ob_layer, export_time, hide_tris);
 				}
 			}
 
@@ -534,7 +534,7 @@
 
 	progress.set_sync_status("");
 
-	if(!cancel && !motion) {
+	if(!cancel && !export_time) {
 		sync_background_light();
 
 		/* handle removed data and modified pointers */

Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h	2013-07-20 20:29:23 UTC (rev 58460)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h	2013-07-20 22:31:56 UTC (rev 58461)
@@ -73,7 +73,7 @@
 	/* sync */
 	void sync_lamps(bool update_all);
 	void sync_materials(bool update_all);
-	void sync_objects(BL::SpaceView3D b_v3d, std::set<float> *export_times, float motion = 0.0f);
+	void sync_objects(BL::SpaceView3D b_v3d, std::set<float> *export_times, float export_time = 0.0f);
 	void sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override, std::set<float> *export_times);
 	void sync_film();
 	void sync_view();
@@ -84,7 +84,7 @@
 	void sync_nodes(Shader *shader, BL::ShaderNodeTree b_ntree);
 	Mesh *sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tris);
 	void sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool object_updated);
-	Object *sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_object, Transform& tfm, uint layer_flag, float motion, bool hide_tris);
+	Object *sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_object, Transform& tfm, uint layer_flag, float export_time, bool hide_tris);
 	void sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::Object b_ob, Transform& tfm);
 	void sync_background_light();
 	void sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion);




More information about the Bf-blender-cvs mailing list