Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-01-26 19:37:58 +0300
committerJacques Lucke <jacques@blender.org>2021-01-26 19:37:58 +0300
commitff7a557c67096fc8de870e5fb43caa17b649c538 (patch)
tree3138d40a331e476d4035c888e268d4605be1b6ba /source/blender/makesrna
parent89484e97548a026d0fdebe4822cb8e94c7209cf3 (diff)
Geometry Nodes: new Points to Volume node
This implements a new geometry node based on T84606. It is the first node that generates a `VolumeComponent`. Differential Revision: https://developer.blender.org/D10169
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 355b1360ab0..db9c774bf9b 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -8889,6 +8889,37 @@ 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)
+{
+ 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");
+
+ prop = RNA_def_property(srna, "input_type_radius", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
+ RNA_def_property_ui_text(prop, "Radius Input Type", "");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
+}
+
/* -------------------------------------------------------------------------- */
static void rna_def_shader_node(BlenderRNA *brna)