diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index c2c937a75f8..3d90d566315 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4404,25 +4404,39 @@ static void def_sh_tex_musgrave(StructRNA *srna) static void def_sh_tex_voronoi(StructRNA *srna) { - static const EnumPropertyItem prop_coloring_items[] = { - {SHD_VORONOI_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity"}, - {SHD_VORONOI_CELLS, "CELLS", 0, "Cells", "Color cells by position"}, - {0, NULL, 0, NULL, NULL}, - }; - static EnumPropertyItem prop_distance_items[] = { - {SHD_VORONOI_DISTANCE, "DISTANCE", 0, "Distance", "Distance"}, - {SHD_VORONOI_MANHATTAN, "MANHATTAN", 0, "Manhattan", "Manhattan (city block) distance"}, + {SHD_VORONOI_EUCLIDEAN, "EUCLIDEAN", 0, "Euclidean", "Euclidean distance"}, + {SHD_VORONOI_MANHATTAN, "MANHATTAN", 0, "Manhattan", "Manhattan distance"}, {SHD_VORONOI_CHEBYCHEV, "CHEBYCHEV", 0, "Chebychev", "Chebychev distance"}, {SHD_VORONOI_MINKOWSKI, "MINKOWSKI", 0, "Minkowski", "Minkowski distance"}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_feature_items[] = { - {SHD_VORONOI_F1, "F1", 0, "Closest", "Closest point"}, - {SHD_VORONOI_F2, "F2", 0, "2nd Closest", "2nd closest point"}, - {SHD_VORONOI_F3, "F3", 0, "3rd Closest", "3rd closest point"}, - {SHD_VORONOI_F4, "F4", 0, "4th Closest", "4th closest point"}, - {SHD_VORONOI_F2F1, "F2F1", 0, "Crackle", "Difference between 2nd and 1st closest point"}, + {SHD_VORONOI_F1, + "F1", + 0, + "F1", + "Computes the distance to the closest point as well as its position and color"}, + {SHD_VORONOI_F2, + "F2", + 0, + "F2", + "Computes the distance to the second closest point as well as its position and color"}, + {SHD_VORONOI_SMOOTH_F1, + "SMOOTH_F1", + 0, + "Smooth F1", + "Smoothed version of F1. Weighted sum of neighbour voronoi cells"}, + {SHD_VORONOI_DISTANCE_TO_EDGE, + "DISTANCE_TO_EDGE", + 0, + "Distance To Edge", + "Computes the distance to the edge of the vornoi cell"}, + {SHD_VORONOI_N_SPHERE_RADIUS, + "N_SPHERE_RADIUS", + 0, + "N-Sphere Radius", + "Computes the radius of the n-sphere inscribed in the voronoi cell"}, {0, NULL, 0, NULL, NULL}}; PropertyRNA *prop; @@ -4430,11 +4444,11 @@ static void def_sh_tex_voronoi(StructRNA *srna) RNA_def_struct_sdna_from(srna, "NodeTexVoronoi", "storage"); def_sh_tex(srna); - prop = RNA_def_property(srna, "coloring", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "coloring"); - RNA_def_property_enum_items(prop, prop_coloring_items); - RNA_def_property_ui_text(prop, "Coloring", ""); - RNA_def_property_update(prop, 0, "rna_Node_update"); + prop = RNA_def_property(srna, "voronoi_dimensions", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "dimensions"); + RNA_def_property_enum_items(prop, rna_enum_node_tex_dimensions_items); + RNA_def_property_ui_text(prop, "Dimensions", ""); + RNA_def_property_update(prop, 0, "rna_ShaderNode_socket_update"); prop = RNA_def_property(srna, "distance", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "distance"); @@ -4446,7 +4460,7 @@ static void def_sh_tex_voronoi(StructRNA *srna) RNA_def_property_enum_sdna(prop, NULL, "feature"); RNA_def_property_enum_items(prop, prop_feature_items); RNA_def_property_ui_text(prop, "Feature Output", ""); - RNA_def_property_update(prop, 0, "rna_Node_update"); + RNA_def_property_update(prop, 0, "rna_ShaderNode_socket_update"); } static void def_sh_tex_wave(StructRNA *srna) |