diff options
author | Dalai Felinto <dalai@blender.org> | 2021-01-22 12:49:20 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2021-01-22 13:47:47 +0300 |
commit | 526373b89705b0401f41d31e7176498531f3f986 (patch) | |
tree | 5d17cb892cf1e89f634d2514ba217b15cd5e2a0c /source/blender/makesrna | |
parent | d179e1c6e460474e398e2831ecfd3924a12f5210 (diff) |
Cleanup - Point Instance: Use own DNA struct
We will need to expand this node soon to add weight/count for different
elements inside the collection. For that it is better to have the node
to use its own DNA.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1a83dcf674c..355b1360ab0 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -8648,16 +8648,17 @@ static void def_geo_point_instance(StructRNA *srna) }; PropertyRNA *prop; + RNA_def_struct_sdna_from(srna, "NodeGeometryPointInstance", "storage"); prop = RNA_def_property(srna, "instance_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_sdna(prop, NULL, "instance_type"); RNA_def_property_enum_items(prop, instance_type_items); RNA_def_property_enum_default(prop, GEO_NODE_POINT_INSTANCE_TYPE_OBJECT); RNA_def_property_ui_text(prop, "Instance Type", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); prop = RNA_def_property(srna, "use_whole_collection", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_negative_sdna(prop, NULL, "custom2", 1); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GEO_NODE_POINT_INSTANCE_WHOLE_COLLECTION); RNA_def_property_ui_text(prop, "Whole Collection", "Instance entire collection on each point"); RNA_def_property_update(prop, 0, "rna_Node_socket_update"); } |