[Bf-blender-cvs] [a1b0d7e9827] functions: print warning when inputs incorrectly depend on particles

Jacques Lucke noreply at git.blender.org
Sat Dec 14 14:46:54 CET 2019


Commit: a1b0d7e9827184bdf8ef02d9e6ab8b7b4f155129
Author: Jacques Lucke
Date:   Sat Dec 14 14:46:40 2019 +0100
Branches: functions
https://developer.blender.org/rBa1b0d7e9827184bdf8ef02d9e6ab8b7b4f155129

print warning when inputs incorrectly depend on particles

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

M	source/blender/simulations/bparticles/node_frontend.cpp

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

diff --git a/source/blender/simulations/bparticles/node_frontend.cpp b/source/blender/simulations/bparticles/node_frontend.cpp
index 94ad424aac0..78e2211babb 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -153,6 +153,10 @@ class InlinedTreeData {
     if (fn == nullptr) {
       return {};
     }
+    if (fn->uses_element_context<FN::ParticleAttributesContext>()) {
+      std::cout << "Inputs may not depend on particle attributes: " << xnode.name() << "\n";
+      return {};
+    }
 
     Vector<const CPPType *> computed_types;
     for (uint i : input_indices) {



More information about the Bf-blender-cvs mailing list