Blender Git Loki

Git Commits -> Revision 2577e31

May 6, 2021, 09:25 (GMT)
Cycles: add reference counting to Nodes

This adds a reference count to Nodes which is incremented or decremented
whenever they are added to or removed from a socket, which will help us
track used Nodes throughout the scene graph generically without having to
add an explicit count or flag on specific Node types. This is especially
useful to track Nodes defined through Procedurals out of Cycles' control.

This also modifies the order in which nodes are deleted to ensure that
upon deletion, a Node does not attempt to decrement the reference
count of another Node which was already freed or deleted.

This is not currently used, but will be in the next commit.

Reviewed By: brecht

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

Commit Details:

Full Hash: 2577e31889d4f813580b355f05e3400602731f01
Parent Commit: 988fb85
Committed By: Stefan Werner
Lines Changed: +152, -16

7 Modified Paths:

/intern/cycles/blender/blender_object.cpp (+4, -2) (Diff)
/intern/cycles/graph/node.cpp (+77, -1) (Diff)
/intern/cycles/graph/node.h (+36, -0) (Diff)
/intern/cycles/render/background.cpp (+1, -0) (Diff)
/intern/cycles/render/geometry.cpp (+1, -0) (Diff)
/intern/cycles/render/light.cpp (+1, -0) (Diff)
/intern/cycles/render/scene.cpp (+32, -13) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021