[Bf-blender-cvs] [c44fdcfab2d] functions: fix node identifier when node is in a group

Jacques Lucke noreply at git.blender.org
Wed Dec 4 17:10:43 CET 2019


Commit: c44fdcfab2dbeb00e116c94bf3d2c38fe1179a13
Author: Jacques Lucke
Date:   Wed Dec 4 17:10:31 2019 +0100
Branches: functions
https://developer.blender.org/rBc44fdcfab2dbeb00e116c94bf3d2c38fe1179a13

fix node identifier when node is in a group

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

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 021026d9717..20cfce2d073 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -559,8 +559,14 @@ class XNodeInfluencesBuilder {
 
   std::string node_identifier()
   {
-    /* TODO: mix parent names into the identifier */
-    return m_xnode.name();
+    std::stringstream ss;
+    for (const BKE::XParentNode *parent = m_xnode.parent(); parent; parent = parent->parent()) {
+      ss << "/" << parent->vnode().name();
+    }
+    ss << "/" << m_xnode.name();
+
+    std::string identifier = ss.str();
+    return identifier;
   }
 
   IDHandleLookup &id_handle_lookup()



More information about the Bf-blender-cvs mailing list