diff options
author | Johnny Matthews (guitargeek) <johnny.matthews@gmail.com> | 2021-10-03 15:54:05 +0300 |
---|---|---|
committer | Johnny Matthews (guitargeek) <johnny.matthews@gmail.com> | 2021-10-03 16:03:46 +0300 |
commit | fb34cdc7daa5bdefde561645def81405b9c6f26c (patch) | |
tree | 62581bfc36f279fb72bb4936f93a5458f262e711 /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 0998856c923f28b1cf2199b945e3eb70cbface96 (diff) |
Geometry Nodes: Points to Volume Fields Update
This update of the Points to Volume node allows a field to populate the
radius input of the node and removes the implicit realization of
instances.
Differential Revision: https://developer.blender.org/D12531
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index df1be412bc4..7b3463ef241 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -9987,7 +9987,7 @@ static void def_geo_object_info(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } -static void def_geo_points_to_volume(StructRNA *srna) +static void def_geo_legacy_points_to_volume(StructRNA *srna) { PropertyRNA *prop; @@ -10018,6 +10018,32 @@ 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_points_to_volume(StructRNA *srna) +{ + PropertyRNA *prop; + + static EnumPropertyItem resolution_mode_items[] = { + {GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_AMOUNT, + "VOXEL_AMOUNT", + 0, + "Amount", + "Specify the approximate number of voxels along the diagonal"}, + {GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_SIZE, + "VOXEL_SIZE", + 0, + "Size", + "Specify the voxel side length"}, + {0, NULL, 0, NULL, NULL}, + }; + + RNA_def_struct_sdna_from(srna, "NodeGeometryPointsToVolume", "storage"); + + prop = RNA_def_property(srna, "resolution_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, resolution_mode_items); + RNA_def_property_ui_text(prop, "Resolution Mode", "How the voxel size is specified"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); +} + static void def_geo_collection_info(StructRNA *srna) { PropertyRNA *prop; |