Commit: 3fab8acfd8b4fab15b04c0b37a44070d00e3ff08
Author: Jacques Lucke
Date:   Wed Apr 1 11:54:19 2020 +0200
Branches: temp-test-point-cloud-simulation-depsgraph-integration
https://developer.blender.org/rB3fab8acfd8b4fab15b04c0b37a44070d00e3ff08

Embed simulation node tree in simulation data block

This also shows the node tree in the Simulation Editor.
There is a new operator to add a simulation.

One debatable aspect of this patch is how I integrated the 
`SpaceNodeEditor.simulation`
property in RNA. I decided to wrap the existing `id` property, because the 
description
says `Data-block whose nodes are being edited`, which is exactly what is 
happening here.

Differential Revision: https://developer.blender.org/D7301

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

M       release/scripts/startup/bl_ui/space_node.py
M       source/blender/makesdna/DNA_space_types.h

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

diff --git a/release/scripts/startup/bl_ui/space_node.py 
b/release/scripts/startup/bl_ui/space_node.py
index 6b0aa2929d9..b5926692324 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -155,6 +155,9 @@ class NODE_HT_header(Header):
             row = layout.row(align=True)
             row.prop(snode, "simulation", text="")
             row.operator("simulation.new", text="", icon='ADD')
+            simulation = snode.simulation
+            if simulation:
+                row.prop(snode.simulation, "use_fake_user", text="")
 
         else:
             # Custom node tree is edited as independent ID block
diff --git a/source/blender/makesdna/DNA_space_types.h 
b/source/blender/makesdna/DNA_space_types.h
index d57fa8c9de1..3020e5a1708 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -1352,7 +1352,6 @@ typedef struct SpaceNode {
 
   /** Context, no need to save in file? well... pinning... */
   struct ID *id, *from;
-
   /** Menunr: browse id block in header. */
   short flag;
   char _pad1[2];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to