[Bf-blender-cvs] [5bb1a05d9ed] temp-test-point-cloud-simulation-depsgraph-integration: handle node tree in lib_query.c

Jacques Lucke noreply at git.blender.org
Wed Apr 15 18:27:12 CEST 2020


Commit: 5bb1a05d9ed2b5776683ab5b81d649449f655c17
Author: Jacques Lucke
Date:   Mon Apr 6 15:20:25 2020 +0200
Branches: temp-test-point-cloud-simulation-depsgraph-integration
https://developer.blender.org/rB5bb1a05d9ed2b5776683ab5b81d649449f655c17

handle node tree in lib_query.c

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

M	source/blender/blenkernel/intern/lib_query.c

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

diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c
index 90525fdde3c..adc7d205301 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -1285,6 +1285,15 @@ static void library_foreach_ID_link(Main *bmain,
         }
         break;
       }
+      case ID_SIM: {
+        Simulation *simulation = (Simulation *)id;
+        if (simulation->nodetree) {
+          /* nodetree **are owned by IDs**, treat them as mere sub-data and not real ID! */
+          library_foreach_ID_as_subdata_link(
+              (ID **)&simulation->nodetree, callback, user_data, flag, &data);
+        }
+        break;
+      }
 
       /* Nothing needed for those... */
       case ID_IM:
@@ -1294,8 +1303,6 @@ static void library_foreach_ID_link(Main *bmain,
       case ID_PAL:
       case ID_PC:
       case ID_CF:
-      case ID_SIM:
-        break;
 
       /* Deprecated. */
       case ID_IP:



More information about the Bf-blender-cvs mailing list