diff options
author | Jacques Lucke <jacques@blender.org> | 2020-04-20 13:56:16 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-04-20 13:56:16 +0300 |
commit | 2b2d3c14fe1a29da0ec01198cec2c0593c38391a (patch) | |
tree | 672442c9086cf193de3378e735ceaf8fbe362d99 /source/blender/makesrna/intern/rna_simulation.c | |
parent | 8d53e59e32a3c704f0c42e11370cc7812b71b294 (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/makesrna/intern/rna_simulation.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_simulation.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_simulation.c b/source/blender/makesrna/intern/rna_simulation.c index 2ffda8a4ea8..789ea299feb 100644 --- a/source/blender/makesrna/intern/rna_simulation.c +++ b/source/blender/makesrna/intern/rna_simulation.c @@ -34,11 +34,16 @@ static void rna_def_simulation(BlenderRNA *brna) { StructRNA *srna; + PropertyRNA *prop; srna = RNA_def_struct(brna, "Simulation", "ID"); RNA_def_struct_ui_text(srna, "Simulation", "Simulation data-block"); RNA_def_struct_ui_icon(srna, ICON_PHYSICS); /* TODO: Use correct icon. */ + prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); + RNA_def_property_ui_text(prop, "Node Tree", "Node tree defining the simulation"); + /* common */ rna_def_animdata_common(srna); } |