[Bf-blender-cvs] [84407d5] object_nodes: Use a _bvm postfix to distinguish the "gen_XXX_function" and "eval" API methods by backend.

Lukas Tönne noreply at git.blender.org
Mon Apr 4 17:35:20 CEST 2016


Commit: 84407d57c0f64377e322833f0eb3f1ed46c275ae
Author: Lukas Tönne
Date:   Fri Apr 1 10:22:12 2016 +0200
Branches: object_nodes
https://developer.blender.org/rB84407d57c0f64377e322833f0eb3f1ed46c275ae

Use a _bvm postfix to distinguish the "gen_XXX_function" and "eval" API methods by backend.

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

M	source/blender/blenkernel/intern/DerivedMesh.c
M	source/blender/blenkernel/intern/effect.c
M	source/blender/blenkernel/intern/object_dupli.c
M	source/blender/blenvm/BVM_api.h
M	source/blender/blenvm/intern/bvm_api.cc
M	source/blender/render/intern/source/render_texture.c

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

diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 183c888..6db7a80 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1703,7 +1703,7 @@ static DerivedMesh *mesh_calc_modifier_nodes(Scene *UNUSED(scene), Object *ob, b
 	
 	struct BVMFunction *fn = BVM_function_bvm_cache_acquire(ntree);
 	if (!fn) {
-		fn = BVM_gen_modifier_function(ntree);
+		fn = BVM_gen_modifier_function_bvm(ntree);
 		BVM_function_bvm_cache_set(ntree, fn);
 	}
 	
@@ -1712,7 +1712,7 @@ static DerivedMesh *mesh_calc_modifier_nodes(Scene *UNUSED(scene), Object *ob, b
 		BVM_globals_add_nodetree_relations(globals, ntree);
 		
 		struct BVMEvalContext *context = BVM_context_create();
-		dm = BVM_eval_modifier(globals, context, fn, ob, me);
+		dm = BVM_eval_modifier_bvm(globals, context, fn, ob, me);
 		BVM_context_free(context);
 		
 		BVM_globals_free(globals);
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 7e36e18..cc51502 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -215,7 +215,7 @@ static void add_object_nodes_to_effectors(EffectorContext *effctx, Scene *scene,
 					BVM_globals_add_nodetree_relations(effctx->eval_globals, ff_ntree);
 					
 					EffectorCache *eff = new_effector_cache(effctx, scene, ob, NULL, ob->pd);
-					eff->function = BVM_gen_forcefield_function(ff_ntree);
+					eff->function = BVM_gen_forcefield_function_bvm(ff_ntree);
 				}
 				
 				break;
@@ -1028,7 +1028,7 @@ void pdDoEffectors(struct EffectorContext *effctx, ListBase *colliders, Effector
 
 		for (; p<tot; p+=step) {
 			if (eff->function) {
-				BVM_eval_forcefield(effctx->eval_globals, eval_context, eff->function, eff->ob, point, force, impulse);
+				BVM_eval_forcefield_bvm(effctx->eval_globals, eval_context, eff->function, eff->ob, point, force, impulse);
 			}
 			else if (get_effector_data(eff, &efd, point, 0)) {
 				efd.falloff= effector_falloff(eff, &efd, point, weights);
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 4953436..773e23b 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -1155,7 +1155,7 @@ static void make_duplis_nodetree(struct bNodeTree *ntree, const DupliContext *du
 {
 	struct BVMFunction *fn = BVM_function_bvm_cache_acquire(ntree);
 	if (!fn) {
-		fn = BVM_gen_dupli_function(ntree);
+		fn = BVM_gen_dupli_function_bvm(ntree);
 		BVM_function_bvm_cache_set(ntree, fn);
 	}
 	
@@ -1164,7 +1164,7 @@ static void make_duplis_nodetree(struct bNodeTree *ntree, const DupliContext *du
 		BVM_globals_add_nodetree_relations(globals, ntree);
 		
 		struct BVMEvalContext *context = BVM_context_create();
-		BVM_eval_dupli(globals, context, fn, dupctx->object, get_dupli_container(dupctx));
+		BVM_eval_dupli_bvm(globals, context, fn, dupctx->object, get_dupli_container(dupctx));
 		BVM_context_free(context);
 		
 		BVM_globals_free(globals);
diff --git a/source/blender/blenvm/BVM_api.h b/source/blender/blenvm/BVM_api.h
index 3363e29..30ce919 100644
--- a/source/blender/blenvm/BVM_api.h
+++ b/source/blender/blenvm/BVM_api.h
@@ -134,10 +134,10 @@ void BVM_function_llvm_cache_clear(void);
 struct Object;
 struct EffectedPoint;
 
-struct BVMFunction *BVM_gen_forcefield_function(struct bNodeTree *btree);
+struct BVMFunction *BVM_gen_forcefield_function_bvm(struct bNodeTree *btree);
 void BVM_debug_forcefield_nodes(struct bNodeTree *btree, FILE *debug_file, const char *label, BVMDebugMode mode);
 
-void BVM_eval_forcefield(struct BVMEvalGlobals *globals, struct BVMEvalContext *context, struct BVMFunction *fn,
+void BVM_eval_forcefield_bvm(struct BVMEvalGlobals *globals, struct BVMEvalContext *context, struct BVMFunction *fn,
                          struct Object *effob, const struct EffectedPoint *point, float force[3], float impulse[3]);
 
 /* ------------------------------------------------------------------------- */
@@ -145,10 +145,10 @@ void BVM_eval_forcefield(struct BVMEvalGlobals *globals, struct BVMEvalContext *
 struct Tex;
 struct TexResult;
 
-struct BVMFunction *BVM_gen_texture_function(struct bNodeTree *btree);
+struct BVMFunction *BVM_gen_texture_function_bvm(struct bNodeTree *btree);
 void BVM_debug_texture_nodes(struct bNodeTree *btree, FILE *debug_file, const char *label, BVMDebugMode mode);
 
-void BVM_eval_texture(struct BVMEvalContext *context, struct BVMFunction *fn,
+void BVM_eval_texture_bvm(struct BVMEvalContext *context, struct BVMFunction *fn,
                       struct TexResult *target,
                       float coord[3], float dxt[3], float dyt[3], int osatex,
                       short which_output, int cfra, int preview);
@@ -158,10 +158,10 @@ void BVM_eval_texture(struct BVMEvalContext *context, struct BVMFunction *fn,
 struct DerivedMesh;
 struct Mesh;
 
-struct BVMFunction *BVM_gen_modifier_function(struct bNodeTree *btree);
+struct BVMFunction *BVM_gen_modifier_function_bvm(struct bNodeTree *btree);
 void BVM_debug_modifier_nodes(struct bNodeTree *btree, FILE *debug_file, const char *label, BVMDebugMode mode);
 
-struct DerivedMesh *BVM_eval_modifier(struct BVMEvalGlobals *globals,
+struct DerivedMesh *BVM_eval_modifier_bvm(struct BVMEvalGlobals *globals,
                                       struct BVMEvalContext *context,
                                       struct BVMFunction *fn,
                                       struct Object *ob,
@@ -171,10 +171,10 @@ struct DerivedMesh *BVM_eval_modifier(struct BVMEvalGlobals *globals,
 
 struct DupliContainer;
 
-struct BVMFunction *BVM_gen_dupli_function(struct bNodeTree *btree);
+struct BVMFunction *BVM_gen_dupli_function_bvm(struct bNodeTree *btree);
 void BVM_debug_dupli_nodes(struct bNodeTree *btree, FILE *debug_file, const char *label, BVMDebugMode mode);
 
-void BVM_eval_dupli(struct BVMEvalGlobals *globals,
+void BVM_eval_dupli_bvm(struct BVMEvalGlobals *globals,
                     struct BVMEvalContext *context,
                     struct BVMFunction *fn,
                     struct Object *object,
diff --git a/source/blender/blenvm/intern/bvm_api.cc b/source/blender/blenvm/intern/bvm_api.cc
index 44dd173..b451362 100644
--- a/source/blender/blenvm/intern/bvm_api.cc
+++ b/source/blender/blenvm/intern/bvm_api.cc
@@ -421,7 +421,7 @@ static void init_forcefield_graph(blenvm::NodeGraph &graph)
 	graph.add_output("impulse", "FLOAT3", zero);
 }
 
-struct BVMFunction *BVM_gen_forcefield_function(bNodeTree *btree)
+struct BVMFunction *BVM_gen_forcefield_function_bvm(bNodeTree *btree)
 {
 	using namespace blenvm;
 	
@@ -462,8 +462,9 @@ void BVM_debug_forcefield_nodes(bNodeTree *btree, FILE *debug_file, const char *
 	}
 }
 
-void BVM_eval_forcefield(struct BVMEvalGlobals *globals, struct BVMEvalContext *ctx, struct BVMFunction *fn,
-                         struct Object *effob, const EffectedPoint *point, float force[3], float impulse[3])
+void BVM_eval_forcefield_bvm(struct BVMEvalGlobals *globals, struct BVMEvalContext *ctx, struct BVMFunction *fn,
+                             struct Object *effob, const EffectedPoint *point,
+                             float force[3], float impulse[3])
 {
 	using namespace blenvm;
 	
@@ -961,7 +962,7 @@ static void init_texture_graph(blenvm::NodeGraph &graph)
 	graph.add_output("normal", "FLOAT3", N);
 }
 
-struct BVMFunction *BVM_gen_texture_function(bNodeTree *btree)
+struct BVMFunction *BVM_gen_texture_function_bvm(bNodeTree *btree)
 {
 	using namespace blenvm;
 	
@@ -1002,10 +1003,10 @@ void BVM_debug_texture_nodes(bNodeTree *btree, FILE *debug_file, const char *lab
 	}
 }
 
-void BVM_eval_texture(struct BVMEvalContext *ctx, struct BVMFunction *fn,
-                      struct TexResult *target,
-                      float coord[3], float dxt[3], float dyt[3], int osatex,
-                      short which_output, int cfra, int UNUSED(preview))
+void BVM_eval_texture_bvm(struct BVMEvalContext *ctx, struct BVMFunction *fn,
+                          struct TexResult *target,
+                          float coord[3], float dxt[3], float dyt[3], int osatex,
+                          short which_output, int cfra, int UNUSED(preview))
 {
 	using namespace blenvm;
 	
@@ -1044,7 +1045,7 @@ static void init_modifier_graph(blenvm::NodeGraph &graph)
 	graph.add_output("mesh", "MESH", __empty_mesh__);
 }
 
-struct BVMFunction *BVM_gen_modifier_function(struct bNodeTree *btree)
+struct BVMFunction *BVM_gen_modifier_function_bvm(struct bNodeTree *btree)
 {
 	using namespace blenvm;
 	
@@ -1085,11 +1086,11 @@ void BVM_debug_modifier_nodes(struct bNodeTree *btree, FILE *debug_file, const c
 	}
 }
 
-struct DerivedMesh *BVM_eval_modifier(struct BVMEvalGlobals *globals,
-                                      struct BVMEvalContext *ctx,
-                                      struct BVMFunction *fn,
-                                      struct Object *object,
-                                      struct Mesh *base_mesh)
+struct DerivedMesh *BVM_eval_modifier_bvm(struct BVMEvalGlobals *globals,
+                                          struct BVMEvalContext *ctx,
+                                          struct BVMFunction *fn,
+                                          struct Object *object,
+                                          struct Mesh *base_mesh)
 {
 	using namespace blenvm;
 
@@ -1118,7 +1119,7 @@ static void init_dupli_graph(blenvm::NodeGraph &graph)
 	graph.add_output("dupli.result", "DUPLIS", __empty_duplilist__);
 }
 
-struct BVMFunction *BVM_gen_dupli_function(struct bNodeTree *btree)
+struct BVMFunction *BVM_gen_dupli_function_bvm(struct bNodeTree *btree)
 {
 	using namespace blenvm;
 	
@@ -1160,11 +1161,11 @@ void BVM_debug_dupli_nodes(struct bNodeTree *btree, FILE *debug_file, const char
 	}
 }
 
-void BVM_eval_dupli(struct BVMEvalGlobals *globals,
-                    struct BVMEvalContext *ctx,
-                    struct BVMFunction *fn,
-                    struct Object *object,
-                    struct DupliContainer *duplicont)
+void BVM_eval_dupli_bvm(

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list