Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-04-20 13:56:16 +0300
committerJacques Lucke <jacques@blender.org>2020-04-20 13:56:16 +0300
commit2b2d3c14fe1a29da0ec01198cec2c0593c38391a (patch)
tree672442c9086cf193de3378e735ceaf8fbe362d99 /source/blender/blenkernel/intern/lib_query.c
parent8d53e59e32a3c704f0c42e11370cc7812b71b294 (diff)
Simulations: Embed simulation node tree in simulation data block
This adds an embedded node tree to the simulation data block dna. The UI in the `Simulation Editor` has been updated to show a list of simulation data blocks, instead of individual node trees. The new `SpaceNodeEditor.simulation` property wraps the existing `SpaceNodeEditor.id` property. It allows scripts to get and set the simulation data block that is being edited. Reviewers: brecht, mont29 Differential Revision: https://developer.blender.org/D7301
Diffstat (limited to 'source/blender/blenkernel/intern/lib_query.c')
-rw-r--r--source/blender/blenkernel/intern/lib_query.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c
index 302ed065e5d..17d26e777b6 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -1286,6 +1286,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:
@@ -1295,7 +1304,6 @@ static void library_foreach_ID_link(Main *bmain,
case ID_PAL:
case ID_PC:
case ID_CF:
- case ID_SIM:
break;
/* Deprecated. */