Blender Git Loki

Git Commits -> Revision 5a96466

Revision 5a96466 by Kévin Dietrich (master)
May 2, 2021, 23:20 (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: 5a964664d6cf54deb3d5590f8581683f865af747
Parent Commit: 5ffab01
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