Commit: 09bc3a0aac04b3f0513ec511324ae6bb79bd3fa1
Author: Jacques Lucke
Date: Wed Jul 17 11:20:47 2019 +0200
Branches: functions
https://developer.blender.org/rB09bc3a0aac04b3f0513ec511324ae6bb79bd3fa1
Revert "use evaluated node tree"
This reverts commit eddb4d0af423b094d89266064e66b4133546ce7a.
Sometimes the evaluated node trees are not updated when the real
node tree changes. Use original trees until this is fixed.
===================================================================
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 dbc2280f234..37de15da8c3 100644
--- a/source/blender/modifiers/intern/MOD_functiondeform.c
+++ b/source/blender/modifiers/intern/MOD_functiondeform.c
@@ -55,6 +55,8 @@
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();
@@ -62,7 +64,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(fdmd->function_tree, inputs, outputs);
+ return FN_function_get_with_signature(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 4deed0567aa..52d29cbe26a 100644
--- a/source/blender/modifiers/intern/MOD_functionpoints.c
+++ b/source/blender/modifiers/intern/MOD_functionpoints.c
@@ -55,6 +55,8 @@
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();
@@ -62,7 +64,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(fpmd->function_tree, inputs, outputs);
+ return FN_function_get_with_signature(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 c885672fb76..2080afbb288 100644
--- a/source/blender/simulations/bparticles/c_wrapper.cpp
+++ b/source/blender/simulations/bparticles/c_wrapper.cpp
@@ -77,7 +77,8 @@ void BParticles_simulate_modifier(BParticlesModifierData
*bpmd,
WorldState &world_state = *unwrap(world_state_c);
- IndexedNodeTree indexed_tree(bpmd->bparticles_tree);
+ bNodeTree *btree = (bNodeTree *)DEG_get_original_id((ID
*)bpmd->bparticles_tree);
+ IndexedNodeTree indexed_tree(btree);
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