[Bf-blender-cvs] [d23f2de] depsgraph_refactor: Replaced the void* for operation arguments with a PointerRNA as used in the operation node struct.

Lukas Tönne noreply at git.blender.org
Thu Jun 5 20:21:05 CEST 2014


Commit: d23f2de9ffac3e6bcd2f5509f91c743b5c867e7f
Author: Lukas Tönne
Date:   Thu Jun 5 06:55:37 2014 +0200
https://developer.blender.org/rBd23f2de9ffac3e6bcd2f5509f91c743b5c867e7f

Replaced the void* for operation arguments with a PointerRNA as used in
the operation node struct.

This could be done with templating or function argument binding later.

===================================================================

M	source/blender/depsgraph/intern/depsgraph_type_defines.cpp
M	source/blender/depsgraph/intern/depsgraph_types.h
M	source/blender/depsgraph/intern/stubs.h
M	source/blender/depsgraph/util/depsgraph_util_task.cpp

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cpp b/source/blender/depsgraph/intern/depsgraph_type_defines.cpp
index 95ca9d2..fd01b97 100644
--- a/source/blender/depsgraph/intern/depsgraph_type_defines.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cpp
@@ -61,32 +61,32 @@ extern "C" {
 
 #include "stubs.h" // XXX: THIS MUST BE REMOVED WHEN THE DEPSGRAPH REFACTOR IS DONE
 
-void BKE_animsys_eval_driver(void *context, void *item) {}
+void BKE_animsys_eval_driver(void *context, PointerRNA *item) {}
 
-void BKE_constraints_evaluate(void *context, void *item) {}
-void BKE_pose_iktree_evaluate(void *context, void *item) {}
-void BKE_pose_splineik_evaluate(void *context, void *item) {}
-void BKE_pose_eval_bone(void *context, void *item) {}
+void BKE_constraints_evaluate(void *context, PointerRNA *item) {}
+void BKE_pose_iktree_evaluate(void *context, PointerRNA *item) {}
+void BKE_pose_splineik_evaluate(void *context, PointerRNA *item) {}
+void BKE_pose_eval_bone(void *context, PointerRNA *item) {}
 
-void BKE_pose_rebuild_op(void *context, void *item) {}
-void BKE_pose_eval_init(void *context, void *item) {}
-void BKE_pose_eval_flush(void *context, void *item) {}
+void BKE_pose_rebuild_op(void *context, PointerRNA *item) {}
+void BKE_pose_eval_init(void *context, PointerRNA *item) {}
+void BKE_pose_eval_flush(void *context, PointerRNA *item) {}
 
-void BKE_particle_system_eval(void *context, void *item) {}
+void BKE_particle_system_eval(void *context, PointerRNA *item) {}
 
-void BKE_rigidbody_rebuild_sim(void *context, void *item) {}
-void BKE_rigidbody_eval_simulation(void *context, void *item) {}
-void BKE_rigidbody_object_sync_transforms(void *context, void *item) {}
+void BKE_rigidbody_rebuild_sim(void *context, PointerRNA *item) {}
+void BKE_rigidbody_eval_simulation(void *context, PointerRNA *item) {}
+void BKE_rigidbody_object_sync_transforms(void *context, PointerRNA *item) {}
 
-void BKE_object_eval_local_transform(void *context, void *item) {}
-void BKE_object_eval_parent(void *context, void *item) {}
-void BKE_object_eval_modifier(void *context, void *item) {}
+void BKE_object_eval_local_transform(void *context, PointerRNA *item) {}
+void BKE_object_eval_parent(void *context, PointerRNA *item) {}
+void BKE_object_eval_modifier(void *context, PointerRNA *item) {}
 
-void BKE_mesh_eval_geometry(void *context, void *item) {}
-void BKE_mball_eval_geometry(void *context, void *item) {}
-void BKE_curve_eval_geometry(void *context, void *item) {}
-void BKE_curve_eval_path(void *context, void *item) {}
-void BKE_lattice_eval_geometry(void *context, void *item) {}
+void BKE_mesh_eval_geometry(void *context, PointerRNA *item) {}
+void BKE_mball_eval_geometry(void *context, PointerRNA *item) {}
+void BKE_curve_eval_geometry(void *context, PointerRNA *item) {}
+void BKE_curve_eval_path(void *context, PointerRNA *item) {}
+void BKE_lattice_eval_geometry(void *context, PointerRNA *item) {}
 
 const string deg_op_name_object_parent = "BKE_object_eval_parent";
 const string deg_op_name_object_local_transform = "BKE_object_eval_local_transform";
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index 5aef027..52b09f3 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -37,6 +37,7 @@
 
 struct ChannelDriver;
 struct ModifierData;
+struct PointerRNA;
 
 /* Evaluation Operation for atomic operation 
  * < context: (ComponentEvalContext) context containing data necessary for performing this operation
@@ -44,7 +45,7 @@ struct ModifierData;
  * < (item): (ComponentDepsNode/PointerRNA) the specific entity involved, where applicable
  */
 // XXX: move this to another header that can be exposed?
-typedef void (*DepsEvalOperationCb)(void *context, void *item);
+typedef void (*DepsEvalOperationCb)(void *context, PointerRNA *item);
 
 /* Metatype of Nodes - The general "level" in the graph structure the node serves */
 typedef enum eDepsNode_Class {
diff --git a/source/blender/depsgraph/intern/stubs.h b/source/blender/depsgraph/intern/stubs.h
index 555055c..e4060fe 100644
--- a/source/blender/depsgraph/intern/stubs.h
+++ b/source/blender/depsgraph/intern/stubs.h
@@ -8,34 +8,36 @@
 #ifndef __DEPSGRAPH_FN_STUBS_H__
 #define __DEPSGRAPH_FN_STUBS_H__
 
+struct PointerRNA;
+
 #pragma message("DEPSGRAPH PORTING XXX: There are still some undefined stubs")
 
-void BKE_animsys_eval_driver(void *context, void *item);
+void BKE_animsys_eval_driver(void *context, PointerRNA *item);
 
-void BKE_constraints_evaluate(void *context, void *item);
-void BKE_pose_iktree_evaluate(void *context, void *item);
-void BKE_pose_splineik_evaluate(void *context, void *item);
-void BKE_pose_eval_bone(void *context, void *item);
+void BKE_constraints_evaluate(void *context, PointerRNA *item);
+void BKE_pose_iktree_evaluate(void *context, PointerRNA *item);
+void BKE_pose_splineik_evaluate(void *context, PointerRNA *item);
+void BKE_pose_eval_bone(void *context, PointerRNA *item);
 
-void BKE_pose_rebuild_op(void *context, void *item);
-void BKE_pose_eval_init(void *context, void *item);
-void BKE_pose_eval_flush(void *context, void *item);
+void BKE_pose_rebuild_op(void *context, PointerRNA *item);
+void BKE_pose_eval_init(void *context, PointerRNA *item);
+void BKE_pose_eval_flush(void *context, PointerRNA *item);
 
-void BKE_particle_system_eval(void *context, void *item);
+void BKE_particle_system_eval(void *context, PointerRNA *item);
 
-void BKE_rigidbody_rebuild_sim(void *context, void *item); // BKE_rigidbody_rebuild_sim
-void BKE_rigidbody_eval_simulation(void *context, void *item); // BKE_rigidbody_do_simulation
-void BKE_rigidbody_object_sync_transforms(void *context, void *item); // BKE_rigidbody_sync_transforms
+void BKE_rigidbody_rebuild_sim(void *context, PointerRNA *item); // BKE_rigidbody_rebuild_sim
+void BKE_rigidbody_eval_simulation(void *context, PointerRNA *item); // BKE_rigidbody_do_simulation
+void BKE_rigidbody_object_sync_transforms(void *context, PointerRNA *item); // BKE_rigidbody_sync_transforms
 
-void BKE_object_eval_local_transform(void *context, void *item);
-void BKE_object_eval_parent(void *context, void *item);
-void BKE_object_eval_modifier(void *context, void *item);
+void BKE_object_eval_local_transform(void *context, PointerRNA *item);
+void BKE_object_eval_parent(void *context, PointerRNA *item);
+void BKE_object_eval_modifier(void *context, PointerRNA *item);
 
-void BKE_mesh_eval_geometry(void *context, void *item);  // wrapper around makeDerivedMesh() - which gets BMesh, etc. data...
-void BKE_mball_eval_geometry(void *context, void *item); // BKE_displist_make_mball
-void BKE_curve_eval_geometry(void *context, void *item); // BKE_displist_make_curveTypes
-void BKE_curve_eval_path(void *context, void *item);
-void BKE_lattice_eval_geometry(void *context, void *item); // BKE_lattice_modifiers_calc
+void BKE_mesh_eval_geometry(void *context, PointerRNA *item);  // wrapper around makeDerivedMesh() - which gets BMesh, etc. data...
+void BKE_mball_eval_geometry(void *context, PointerRNA *item); // BKE_displist_make_mball
+void BKE_curve_eval_geometry(void *context, PointerRNA *item); // BKE_displist_make_curveTypes
+void BKE_curve_eval_path(void *context, PointerRNA *item);
+void BKE_lattice_eval_geometry(void *context, PointerRNA *item); // BKE_lattice_modifiers_calc
 
 #endif //__DEPSGRAPH_FN_STUBS_H__
 
diff --git a/source/blender/depsgraph/util/depsgraph_util_task.cpp b/source/blender/depsgraph/util/depsgraph_util_task.cpp
index ca82881..f351544 100644
--- a/source/blender/depsgraph/util/depsgraph_util_task.cpp
+++ b/source/blender/depsgraph/util/depsgraph_util_task.cpp
@@ -75,7 +75,7 @@ void DepsgraphTask::run()
 	
 	/* get "item" */
 	// XXX: not everything will use this - some may want something else!
-	void *item = &node->ptr;
+	PointerRNA *item = &node->ptr;
 	
 	/* take note of current time */
 	double start_time = PIL_check_seconds_timer();




More information about the Bf-blender-cvs mailing list