[Bf-blender-cvs] [ad58b620b29] functions: make surface hooks work in function deform/points modifiers

Jacques Lucke noreply at git.blender.org
Sat Dec 28 12:23:23 CET 2019


Commit: ad58b620b296a0b471e814b95b9d11276383ea7c
Author: Jacques Lucke
Date:   Sat Dec 28 12:23:17 2019 +0100
Branches: functions
https://developer.blender.org/rBad58b620b296a0b471e814b95b9d11276383ea7c

make surface hooks work in function deform/points modifiers

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

M	source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
M	source/blender/modifiers/intern/MOD_functionpoints_cxx.cc

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

diff --git a/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc b/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
index 7bc20514d6c..e9d6d5d56fb 100644
--- a/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
+++ b/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
@@ -8,6 +8,7 @@
 #include "BLI_math_cxx.h"
 
 #include "BKE_modifier.h"
+#include "BKE_id_data_cache.h"
 
 #include "DEG_depsgraph_query.h"
 
@@ -69,9 +70,12 @@ void MOD_functiondeform_do(FunctionDeformModifierData *fdmd,
   BKE::IDHandleLookup id_handle_lookup;
   FN::add_ids_used_by_nodes(id_handle_lookup, inlined_tree);
 
+  BKE::IDDataCache id_data_cache;
+
   MFContextBuilder context_builder;
   context_builder.add_global_context(id_handle_lookup);
   context_builder.add_global_context(time_context);
+  context_builder.add_global_context(id_data_cache);
   context_builder.add_element_context(vertex_positions_context,
                                       FN::MFElementContextIndices::FromDirectMapping());
 
diff --git a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
index fd3a73934e3..0da552ae03c 100644
--- a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
+++ b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
@@ -4,6 +4,7 @@
 
 #include "BKE_mesh.h"
 #include "BKE_modifier.h"
+#include "BKE_id_data_cache.h"
 
 #include "BLI_math.h"
 
@@ -59,9 +60,12 @@ Mesh *MOD_functionpoints_do(FunctionPointsModifierData *fpmd,
   BKE::IDHandleLookup id_handle_lookup;
   FN::add_ids_used_by_nodes(id_handle_lookup, inlined_tree);
 
+  BKE::IDDataCache id_data_cache;
+
   FN::MFContextBuilder context_builder;
   context_builder.add_global_context(id_handle_lookup);
   context_builder.add_global_context(time_context);
+  context_builder.add_global_context(id_data_cache);
 
   function->call(BLI::IndexMask(1), params_builder, context_builder);



More information about the Bf-blender-cvs mailing list