Commit: eddb4d0af423b094d89266064e66b4133546ce7a
Author: Jacques Lucke
Date:   Tue Jul 16 16:12:56 2019 +0200
Branches: functions
https://developer.blender.org/rBeddb4d0af423b094d89266064e66b4133546ce7a

use evaluated node tree

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

M       source/blender/modifiers/intern/MOD_functiondeform.c
M       source/blender/modifiers/intern/MOD_functionpoints.c
M       source/blender/simulations/bparticles/c_wrapper.cpp

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

diff --git a/source/blender/modifiers/intern/MOD_functiondeform.c 
b/source/blender/modifiers/intern/MOD_functiondeform.c
index 37de15da8c3..dbc2280f234 100644
--- a/source/blender/modifiers/intern/MOD_functiondeform.c
+++ b/source/blender/modifiers/intern/MOD_functiondeform.c
@@ -55,8 +55,6 @@
 
 static FnFunction get_current_function(FunctionDeformModifierData *fdmd)
 {
-  bNodeTree *tree = (bNodeTree *)DEG_get_original_id((ID 
*)fdmd->function_tree);
-
   FnType float_ty = FN_type_borrow_float();
   FnType int32_ty = FN_type_borrow_int32();
   FnType float3_ty = FN_type_borrow_float3();
@@ -64,7 +62,7 @@ static FnFunction 
get_current_function(FunctionDeformModifierData *fdmd)
   FnType inputs[] = {float3_ty, int32_ty, float_ty, NULL};
   FnType outputs[] = {float3_ty, NULL};
 
-  return FN_function_get_with_signature(tree, inputs, outputs);
+  return FN_function_get_with_signature(fdmd->function_tree, inputs, outputs);
 }
 
 static void do_deformation(FunctionDeformModifierData *fdmd, float 
(*vertexCos)[3], int numVerts)
diff --git a/source/blender/modifiers/intern/MOD_functionpoints.c 
b/source/blender/modifiers/intern/MOD_functionpoints.c
index 52d29cbe26a..4deed0567aa 100644
--- a/source/blender/modifiers/intern/MOD_functionpoints.c
+++ b/source/blender/modifiers/intern/MOD_functionpoints.c
@@ -55,8 +55,6 @@
 
 static FnFunction get_current_function(FunctionPointsModifierData *fpmd)
 {
-  bNodeTree *tree = (bNodeTree *)DEG_get_original_id((ID 
*)fpmd->function_tree);
-
   FnType float_ty = FN_type_borrow_float();
   FnType int32_ty = FN_type_borrow_int32();
   FnType float3_list_ty = FN_type_borrow_float3_list();
@@ -64,7 +62,7 @@ static FnFunction 
get_current_function(FunctionPointsModifierData *fpmd)
   FnType inputs[] = {float_ty, int32_ty, NULL};
   FnType outputs[] = {float3_list_ty, NULL};
 
-  return FN_function_get_with_signature(tree, inputs, outputs);
+  return FN_function_get_with_signature(fpmd->function_tree, inputs, outputs);
 }
 
 static Mesh *build_point_mesh(FunctionPointsModifierData *fpmd)
diff --git a/source/blender/simulations/bparticles/c_wrapper.cpp 
b/source/blender/simulations/bparticles/c_wrapper.cpp
index 7f1e6a822a4..bed5190941e 100644
--- a/source/blender/simulations/bparticles/c_wrapper.cpp
+++ b/source/blender/simulations/bparticles/c_wrapper.cpp
@@ -77,8 +77,7 @@ void BParticles_simulate_modifier(BParticlesModifierData 
*bpmd,
 
   WorldState &world_state = *unwrap(world_state_c);
 
-  bNodeTree *btree = (bNodeTree *)DEG_get_original_id((ID 
*)bpmd->bparticles_tree);
-  IndexedNodeTree indexed_tree(btree);
+  IndexedNodeTree indexed_tree(bpmd->bparticles_tree);
 
   auto step_description = step_description_from_node_tree(indexed_tree, 
world_state, 1.0f / 24.0f);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to