diff options
author | Jacques Lucke <jacques@blender.org> | 2020-12-02 15:28:08 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-12-02 17:38:47 +0300 |
commit | ae0aa4b94c4a9b5b166fbc0b5394dcc47455091d (patch) | |
tree | b2d8eeb30fa148bec0ff9f91a3bd1cf965d9a168 /source/blender/depsgraph/DEG_depsgraph_query.h | |
parent | 6be56c13e96048cbc494ba5473a8deaf2cf5a6f8 (diff) |
Geometry Nodes: support geometry components in depsgraph object iterator
Objects can evaluate to a geometry set instead of a single ID (only point cloud
objects for now). In the depsgraph object iterator, the evaluated geometry
components are expanded into temporary objects.
It's important to note that instanced objects can also contain geometry
components. Therefore, they have to be split up into multiple objects
as well in some cases.
At a high level the iterator works like so:
```
for object in depsgraph:
for component in object:
yield object_from_component(component)
for dupli in make_duplis_list(object):
for component in dupli:
yield object_from_component(component)
```
DEG_iterator_objects_next has been cleaned up, to make this structure
a bit more apparent.
This should not change anything for objects that are not point clouds.
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_query.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index 7eb5f1ccec1..f877e99b16b 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -145,6 +145,16 @@ typedef struct DEGObjectIterData { eEvaluationMode eval_mode; + /* **** Iteration over geometry components **** */ + + /* The object whose components we currently iterate over. + * This might point to #temp_dupli_object. */ + struct Object *geometry_component_owner; + /* Some identifier that is used to determine which geometry component should be returned next. */ + int geometry_component_id; + /* Temporary storage for an object that is created from a component. */ + struct Object temp_geometry_component_object; + /* **** Iteration over dupli-list. *** */ /* Object which created the dupli-list. */ |