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:
authorEitan <EitanSomething>2021-08-16 11:55:10 +0300
committerHimanshi Kalra <himanshikalra98@gmail.com>2021-08-16 12:01:50 +0300
commitfecec1644ce54ea386eaeed5ca6748d4a7b2737b (patch)
tree7e2bc2fe09d43bdefbba1a264a315123e8a2e33e /source/blender/makesrna/intern/rna_nodetree.c
parentddecd7aaca880586c2762c5a85d90ee8b44cd0a1 (diff)
Geometry Nodes: Add UV Smooth, Boundary Smooth options to subdivision node
Replaces the boolean option with enum menus for consistency with the subdivision modifier (rB66151b5de3ff,rB3d3b6d94e6e). Adds all UV interpolation options. Original patch by Eitan. Updated by Himanshi Kalra <calra>. {F9883204} Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D10417
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index b360d3b6672..7d5fffcc6c9 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -9095,6 +9095,26 @@ static void def_geo_triangulate(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
+static void def_geo_subdivision_surface(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeGeometrySubdivisionSurface", "storage");
+ prop = RNA_def_property(srna, "uv_smooth", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "uv_smooth");
+ RNA_def_property_enum_items(prop, rna_enum_subdivision_uv_smooth_items);
+ RNA_def_property_enum_default(prop, SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES);
+ RNA_def_property_ui_text(prop, "UV Smooth", "Controls how smoothing is applied to UVs");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "boundary_smooth", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "boundary_smooth");
+ RNA_def_property_enum_items(prop, rna_enum_subdivision_boundary_smooth_items);
+ RNA_def_property_enum_default(prop, SUBSURF_BOUNDARY_SMOOTH_ALL);
+ RNA_def_property_ui_text(prop, "Boundary Smooth", "Controls how open boundaries are smoothed");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+}
+
static void def_geo_attribute_randomize(StructRNA *srna)
{
PropertyRNA *prop;