Cleanup: use 'use_' prefix for RNA naming in grease pencil modifiers

This commit is contained in:
Campbell Barton 2021-10-27 17:19:00 +11:00
parent 526e60d4f0
commit 55dda9fdb3
4 changed files with 9 additions and 8 deletions

View File

@ -703,7 +703,8 @@ static void composition_panel_draw(const bContext *UNUSED(C), Panel *panel)
uiLayoutSetActive(col, !show_in_front);
uiItemR(col, ptr, "stroke_depth_offset", UI_ITEM_R_SLIDER, IFACE_("Depth Offset"), ICON_NONE);
uiItemR(col, ptr, "offset_towards_custom_camera", 0, IFACE_("Towards Custom Camera"), ICON_NONE);
uiItemR(
col, ptr, "use_offset_towards_custom_camera", 0, IFACE_("Towards Custom Camera"), ICON_NONE);
}
static void panelRegister(ARegionType *region_type)

View File

@ -240,10 +240,10 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
uiItemR(layout, ptr, "hardness", 0, NULL, ICON_NONE);
}
else {
const bool is_normalized = RNA_boolean_get(ptr, "normalize_opacity");
const bool is_normalized = RNA_boolean_get(ptr, "use_normalized_opacity");
const bool is_weighted = RNA_boolean_get(ptr, "use_weight_factor");
uiItemR(layout, ptr, "normalize_opacity", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_normalized_opacity", 0, NULL, ICON_NONE);
const char *text = (is_normalized) ? IFACE_("Strength") : IFACE_("Opacity Factor");
uiLayout *row = uiLayoutRow(layout, true);

View File

@ -191,8 +191,8 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
uiLayoutSetPropSep(layout, true);
uiItemR(layout, ptr, "normalize_thickness", 0, NULL, ICON_NONE);
if (RNA_boolean_get(ptr, "normalize_thickness")) {
uiItemR(layout, ptr, "use_normalized_thickness", 0, NULL, ICON_NONE);
if (RNA_boolean_get(ptr, "use_normalized_thickness")) {
uiItemR(layout, ptr, "thickness", 0, NULL, ICON_NONE);
}
else {

View File

@ -1309,7 +1309,7 @@ static void rna_def_modifier_gpencilthick(BlenderRNA *brna)
prop, "Custom Curve", "Use a custom curve to define thickness change along the strokes");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "normalize_thickness", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_normalized_thickness", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_THICK_NORMALIZE);
RNA_def_property_ui_text(prop, "Uniform Thickness", "Replace the stroke thickness");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@ -1865,7 +1865,7 @@ static void rna_def_modifier_gpencilopacity(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "normalize_opacity", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_normalized_opacity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_OPACITY_NORMALIZE);
RNA_def_property_ui_text(prop, "Uniform Opacity", "Replace the stroke opacity");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_opacity_update");
@ -3215,7 +3215,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_property_range(prop, -0.1, FLT_MAX);
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "offset_towards_custom_camera", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_offset_towards_custom_camera", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_GPENCIL_OFFSET_TOWARDS_CUSTOM_CAMERA);
RNA_def_property_ui_text(prop,
"Offset Towards Custom Camera",