Blender Git Commit Log

Git Commits -> Revision 0feca5f

November 12, 2020, 11:20 (GMT)
Geometry Nodes: initial object socket support

The fundamental difference between object sockets and the
other existing data sockets is that an object is an ID data block.
Changing the value of an object socket also changes the depsgraph.

The modifier has to analyse the node tree to figure out which other
objects it depends on. Currently, this is done very simply by just
looping over all sockets and collecting the objects. In the future
this can be improved by also figuring out what components of
an object are needed.

Instead of passing object pointers around in the node tree, we actually
use a handle. This handle is just a number internally that identifies
a specific object. The conversion between handles and object pointers
is done using a map that is provided by the modifier.

This approach has a couple of benefits. It protects us a bit from passing
around pointers that are not known to the modifier and therefore are
not in the depsgraph. Furthermore, the object pointer can change
while the handle stays the same. This is not important right now, but
is not unlikely to become useful in the future.

The API for how nodes access object pointers is not ideal yet and
will be improved in the future.

Commit Details:

Full Hash: 0feca5f07da1d04b3c4bd72c96090389aab6f301
Parent Commit: 2984fb2
Lines Changed: +109, -15

3 Modified Paths:

/source/blender/makesrna/intern/rna_nodetree.c (+1, -0) (Diff)
/source/blender/modifiers/intern/MOD_nodes.cc (+93, -14) (Diff)
/source/blender/nodes/NOD_geometry_exec.hh (+15, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021