diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-02-03 19:47:46 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2021-02-03 19:54:33 +0300 |
commit | 894cc9c91592041a47c33300d784eac4e6412162 (patch) | |
tree | ea5e6046feb7c51f98497f74148bb3807eb08d2e /source/blender/makesrna/intern | |
parent | 54a4eb5e17f8de65e94e17ffc269e8c5a6baff15 (diff) |
Geometry Nodes: Add Collection Info Node
Implements a node to get collection objects.
These objects are then passed along as instances in the node tree.
Follow up tasks:
Multiple nodes does not support instancing yet: T85159
Changing collection offset does not trigger a refresh: T85274
Reviewed By: Jacques, Dalai, Hans
Differential Revision: http://developer.blender.org/D10151
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index a5a73d9d8ca..ab6d4fa985c 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -8911,6 +8911,33 @@ static void def_geo_points_to_volume(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } +static void def_geo_collection_info(StructRNA *srna) +{ + PropertyRNA *prop; + + static const EnumPropertyItem rna_node_geometry_collection_info_transform_space_items[] = { + {GEO_NODE_TRANSFORM_SPACE_ORIGINAL, + "ORIGINAL", + 0, + "Original", + "Output the geometry relative to the collection offset"}, + {GEO_NODE_TRANSFORM_SPACE_RELATIVE, + "RELATIVE", + 0, + "Relative", + "Bring the input collection geometry into the modified object, maintaining the relative " + "position between the objects in the scene."}, + {0, NULL, 0, NULL, NULL}, + }; + + RNA_def_struct_sdna_from(srna, "NodeGeometryCollectionInfo", "storage"); + + prop = RNA_def_property(srna, "transform_space", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, rna_node_geometry_collection_info_transform_space_items); + RNA_def_property_ui_text(prop, "Transform Space", "The transformation of the geometry output"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + /* -------------------------------------------------------------------------- */ static void rna_def_shader_node(BlenderRNA *brna) |