[Bf-blender-cvs] [a05cbc9914a] master: RNA: rename recently added line-art properties

Campbell Barton noreply at git.blender.org
Mon Mar 22 08:13:48 CET 2021


Commit: a05cbc9914a76fa50c8367262dff507506e26c66
Author: Campbell Barton
Date:   Mon Mar 22 18:03:19 2021 +1100
Branches: master
https://developer.blender.org/rBa05cbc9914a76fa50c8367262dff507506e26c66

RNA: rename recently added line-art properties

- Use `use_` prefix for boolean properties.
- Use `_all` instead of `_everything`,
  following existing conventions and the properties UI text.
- Use `object_instances` instead of old term `dupli` / `duplication`.
- Use `clip_plane` instead of `clipping_boundaries`,
  matching the RegionView3D property naming.

===================================================================

M	source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M	source/blender/makesrna/intern/rna_gpencil_modifier.c

===================================================================

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 6054111cfbf..4597e82b2dc 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -279,15 +279,10 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemPointerR(
       layout, ptr, "target_material", &obj_data_ptr, "materials", NULL, ICON_SHADING_TEXTURE);
 
-  uiItemR(layout, ptr, "remove_doubles", 0, NULL, ICON_NONE);
-  uiItemR(layout,
-          ptr,
-          "allow_overlapping_edges",
-          0,
-          IFACE_("Overlapping Edges As Contour"),
-          ICON_NONE);
-  uiItemR(layout, ptr, "allow_duplication", 0, NULL, ICON_NONE);
-  uiItemR(layout, ptr, "allow_clipping_boundaries", 0, NULL, ICON_NONE);
+  uiItemR(layout, ptr, "use_remove_doubles", 0, NULL, ICON_NONE);
+  uiItemR(layout, ptr, "use_edge_overlap", 0, IFACE_("Overlapping Edges As Contour"), ICON_NONE);
+  uiItemR(layout, ptr, "use_object_instances", 0, NULL, ICON_NONE);
+  uiItemR(layout, ptr, "use_clip_plane_bias", 0, NULL, ICON_NONE);
 
   gpencil_modifier_panel_end(layout, ptr);
 }
@@ -381,14 +376,14 @@ static void chaining_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiLayoutSetEnabled(layout, !is_baked);
 
   uiLayout *col = uiLayoutColumnWithHeading(layout, true, IFACE_("Chain"));
-  uiItemR(col, ptr, "fuzzy_intersections", 0, NULL, ICON_NONE);
-  uiItemR(col, ptr, "fuzzy_everything", 0, NULL, ICON_NONE);
+  uiItemR(col, ptr, "use_fuzzy_intersections", 0, NULL, ICON_NONE);
+  uiItemR(col, ptr, "use_fuzzy_all", 0, NULL, ICON_NONE);
 
   uiItemR(layout, ptr, "chaining_image_threshold", 0, NULL, ICON_NONE);
 
   uiItemR(layout, ptr, "resample_length", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
-  uiItemR(layout, ptr, "angle_splitting_threshold", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+  uiItemR(layout, ptr, "split_angle", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 }
 
 static void vgroup_panel_draw(const bContext *UNUSED(C), Panel *panel)
@@ -409,15 +404,15 @@ static void vgroup_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemR(row, ptr, "source_vertex_group", 0, IFACE_("Filter Source"), ICON_GROUP_VERTEX);
   uiItemR(row, ptr, "invert_source_vertex_group", UI_ITEM_R_TOGGLE, "", ICON_ARROW_LEFTRIGHT);
 
-  uiItemR(col, ptr, "match_output_vertex_group", 0, NULL, ICON_NONE);
+  uiItemR(col, ptr, "use_output_vertex_group_match_by_name", 0, NULL, ICON_NONE);
 
-  const bool match_output = RNA_boolean_get(ptr, "match_output_vertex_group");
+  const bool match_output = RNA_boolean_get(ptr, "use_output_vertex_group_match_by_name");
   if (!match_output) {
     uiItemPointerR(
         col, ptr, "vertex_group", &ob_ptr, "vertex_groups", IFACE_("Target"), ICON_NONE);
   }
 
-  uiItemR(col, ptr, "soft_selection", 0, NULL, ICON_NONE);
+  uiItemR(col, ptr, "use_soft_selection", 0, NULL, ICON_NONE);
 }
 
 static void baking_panel_draw(const bContext *UNUSED(C), Panel *panel)
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index bb3dc5fd427..832c5cb37f8 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -2331,7 +2331,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   RNA_def_struct_sdna(srna, "LineartGpencilModifierData");
   RNA_def_struct_ui_icon(srna, ICON_MOD_EDGESPLIT);
 
-  prop = RNA_def_property(srna, "fuzzy_intersections", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_fuzzy_intersections", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_INTERSECTION_AS_CONTOUR);
   RNA_def_property_ui_text(prop,
                            "Intersection With Contour",
@@ -2339,21 +2339,21 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
                            "they can be chained together");
   RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "fuzzy_everything", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_fuzzy_all", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_EVERYTHING_AS_CONTOUR);
   RNA_def_property_ui_text(
       prop, "All Lines", "Treat all lines as the same line type so they can be chained together");
   RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "allow_duplication", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_object_instances", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_ALLOW_DUPLI_OBJECTS);
   RNA_def_property_ui_text(
       prop,
       "Instanced Objects",
-      "Allow particle objects and face/vertiex duplication to show in line art");
+      "Support particle objects and face/vertex instances to show in line art");
   RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "allow_overlapping_edges", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_edge_overlap", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_ALLOW_OVERLAPPING_EDGES);
   RNA_def_property_ui_text(
       prop,
@@ -2361,7 +2361,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
       "Allow edges in the same location (i.e. from edge split) to show properly. May run slower");
   RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "allow_clipping_boundaries", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_clip_plane_bias", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_ALLOW_CLIPPING_BOUNDARIES);
   RNA_def_property_ui_text(prop,
                            "Clipping Boundaries",
@@ -2375,7 +2375,8 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
       prop, "Crease Threshold", "Angles smaller than this will be treated as creases");
   RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "angle_splitting_threshold", PROP_FLOAT, PROP_ANGLE);
+  prop = RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_ANGLE);
+  RNA_def_property_float_sdna(prop, NULL, "angle_splitting_threshold");
   RNA_def_property_ui_text(
       prop, "Angle Splitting", "Angle in screen space below which a stroke is split in two");
   /*  Don't allow value very close to PI, or we get a lot of small segments.*/
@@ -2383,7 +2384,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   RNA_def_property_range(prop, 0.0f, DEG2RAD(180.0f));
   RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "remove_doubles", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_remove_doubles", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_REMOVE_DOUBLES);
   RNA_def_property_ui_text(
       prop, "Remove Doubles", "Remove doubles from the source geometry before generating stokes");
@@ -2495,12 +2496,12 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   RNA_def_property_ui_text(prop, "Invert Vertex Group", "Invert source vertex group values");
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "match_output_vertex_group", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_output_vertex_group_match_by_name", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_GPENCIL_MATCH_OUTPUT_VGROUP);
   RNA_def_property_ui_text(prop, "Match Output", "Match output vertex group based on name");
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
-  prop = RNA_def_property(srna, "soft_selection", PROP_BOOLEAN, PROP_NONE);
+  prop = RNA_def_property(srna, "use_soft_selection", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_GPENCIL_SOFT_SELECTION);
   RNA_def_property_ui_text(
       prop, "Clip", "Preserve original vertex weight instead of clipping to 0/1");



More information about the Bf-blender-cvs mailing list