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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-31 00:54:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-31 03:51:15 +0300
commit3224b79289b5284719607fbb09b23d9d36d046cc (patch)
tree8e1e107d561bef9a9451561ff029eaaf3b9046ba
parent40412e357966c84a3283c685bb796e07f17f5039 (diff)
Cleanup: remove redundant 'gpencil_' prefix
Also rename 'gpencil_brush_type' -> 'tool' & correct typo.
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py4
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py14
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py34
-rw-r--r--source/blender/makesrna/intern/rna_brush.c14
4 files changed, 33 insertions, 33 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index a4d62f1757c..9f6a98bc787 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -341,10 +341,10 @@ class GreasePencilAppearancePanel:
layout.prop(gp_settings, "use_cursor", text="Show Brush")
- if gp_settings.gpencil_brush_type == 'DRAW':
+ if gp_settings.tool == 'DRAW':
layout.prop(gp_settings, "disable_lasso", text="Hide fill color while drawing")
- if gp_settings.gpencil_brush_type == 'FILL':
+ if gp_settings.tool == 'FILL':
layout.prop(brush, "cursor_color_add", text="Color")
elif ob.mode in {'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}:
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index c698327e5d9..3c7e7309fa4 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1370,7 +1370,7 @@ class _defs_gpencil_paint:
brush = context.active_gpencil_brush
gp_settings = brush.gpencil_settings
- if gp_settings.gpencil_brush_type == 'ERASE':
+ if gp_settings.tool == 'ERASE':
row = layout.row(align=True)
row.prop(brush, "size", text="Radius")
row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE')
@@ -1378,19 +1378,19 @@ class _defs_gpencil_paint:
row = layout.row(align=True)
row.prop(gp_settings, "pen_strength", slider=True)
row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE')
- elif gp_settings.gpencil_brush_type == 'FILL':
+ elif gp_settings.tool == 'FILL':
row = layout.row()
- row.prop(gp_settings, "gpencil_fill_leak", text="Leak Size")
+ row.prop(gp_settings, "fill_leak", text="Leak Size")
row.prop(brush, "size", text="Thickness")
- row.prop(gp_settings, "gpencil_fill_simplyfy_level", text="Simplify")
+ row.prop(gp_settings, "fill_simplify_level", text="Simplify")
_defs_gpencil_paint.draw_color_selector(context, layout)
row = layout.row(align=True)
- row.prop(gp_settings, "gpencil_fill_draw_mode", text="")
- row.prop(gp_settings, "gpencil_fill_show_boundary", text="", icon='GRID')
+ row.prop(gp_settings, "fill_draw_mode", text="")
+ row.prop(gp_settings, "fill_show_boundary", text="", icon='GRID')
- else: # bgpsettings.gpencil_brush_type == 'DRAW':
+ else: # bgpsettings.tool == 'DRAW':
row = layout.row(align=True)
row.prop(brush, "size", text="Radius")
row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE')
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 1b5d78f093c..5f3052fd3dc 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1370,11 +1370,11 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
if brush is not None:
# XXX: Items in "sub" currently show up beside the brush selector in a separate column
- if gp_settings.gpencil_brush_type == 'ERASE':
+ if gp_settings.tool == 'ERASE':
sub.prop(gp_settings, "default_eraser", text="")
# Brush details
- if gp_settings.gpencil_brush_type == 'ERASE':
+ if gp_settings.tool == 'ERASE':
row = layout.row(align=True)
row.prop(brush, "size", text="Radius")
row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE')
@@ -1387,27 +1387,27 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
row.prop(gp_settings, "eraser_strength_factor")
row = layout.row(align=True)
row.prop(gp_settings, "eraser_thickness_factor")
- elif gp_settings.gpencil_brush_type == 'FILL':
+ elif gp_settings.tool == 'FILL':
col = layout.column(align=True)
- col.prop(gp_settings, "gpencil_fill_leak", text="Leak Size")
+ col.prop(gp_settings, "fill_leak", text="Leak Size")
col.separator()
col.prop(brush, "size", text="Thickness")
- col.prop(gp_settings, "gpencil_fill_simplyfy_level", text="Simplify")
+ col.prop(gp_settings, "fill_simplify_level", text="Simplify")
col = layout.row(align=True)
col.template_ID(gp_settings, "material")
row = layout.row(align=True)
- row.prop(gp_settings, "gpencil_fill_draw_mode", text="Boundary Draw Mode")
- row.prop(gp_settings, "gpencil_fill_show_boundary", text="", icon='GRID')
+ row.prop(gp_settings, "fill_draw_mode", text="Boundary Draw Mode")
+ row.prop(gp_settings, "fill_show_boundary", text="", icon='GRID')
col = layout.column(align=True)
- col.enabled = gp_settings.gpencil_fill_draw_mode != 'STROKE'
- col.prop(gp_settings, "gpencil_fill_hide", text="Ignore Transparent Strokes")
+ col.enabled = gp_settings.fill_draw_mode != 'STROKE'
+ col.prop(gp_settings, "fill_hide", text="Ignore Transparent Strokes")
sub = col.row(align=True)
- sub.enabled = gp_settings.gpencil_fill_hide
- sub.prop(gp_settings, "gpencil_fill_threshold", text="Threshold")
- else: # bgpsettings.gpencil_brush_type == 'DRAW':
+ sub.enabled = gp_settings.fill_hide
+ sub.prop(gp_settings, "fill_threshold", text="Threshold")
+ else: # bgpsettings.tool == 'DRAW':
row = layout.row(align=True)
row.prop(brush, "size", text="Radius")
row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE')
@@ -1430,7 +1430,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
brush = context.active_gpencil_brush
gp_settings = brush.gpencil_settings
- return brush is not None and gp_settings.gpencil_brush_type != 'ERASE'
+ return brush is not None and gp_settings.tool != 'ERASE'
def draw_header_preset(self, context):
VIEW3D_PT_gpencil_brush_presets.draw_panel_header(self.layout)
@@ -1468,7 +1468,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel):
brush = context.active_gpencil_brush
gp_settings = brush.gpencil_settings
- return brush is not None and gp_settings.gpencil_brush_type == 'DRAW'
+ return brush is not None and gp_settings.tool == 'DRAW'
def draw_header(self, context):
brush = context.active_gpencil_brush
@@ -1500,7 +1500,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_settings(View3DPanel, Panel):
brush = context.active_gpencil_brush
gp_settings = brush.gpencil_settings
- return brush is not None and gp_settings.gpencil_brush_type != 'ERASE'
+ return brush is not None and gp_settings.tool != 'ERASE'
def draw_header(self, context):
brush = context.active_gpencil_brush
@@ -1541,7 +1541,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
brush = context.active_gpencil_brush
gp_settings = brush.gpencil_settings
- return brush is not None and gp_settings.gpencil_brush_type != 'ERASE'
+ return brush is not None and gp_settings.tool != 'ERASE'
def draw_header(self, context):
brush = context.active_gpencil_brush
@@ -1578,7 +1578,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
brush = context.active_gpencil_brush
gp_settings = brush.gpencil_settings
- return brush is not None and gp_settings.gpencil_brush_type != 'ERASE'
+ return brush is not None and gp_settings.tool != 'ERASE'
@staticmethod
def draw(self, context):
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 53fdf9793ff..f3d02c2f905 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1121,7 +1121,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
/* fill threshold for transparence */
- prop = RNA_def_property(srna, "gpencil_fill_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fill_threshold");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold",
@@ -1130,7 +1130,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
/* fill leak size */
- prop = RNA_def_property(srna, "gpencil_fill_leak", PROP_INT, PROP_PIXEL);
+ prop = RNA_def_property(srna, "fill_leak", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "fill_leak");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Leak Size",
@@ -1139,7 +1139,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
/* fill simplify steps */
- prop = RNA_def_property(srna, "gpencil_fill_simplyfy_level", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "fill_simplify_level", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fill_simplylvl");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Simplify",
@@ -1230,7 +1230,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Enable Cursor", "Enable cursor on screen");
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
- prop = RNA_def_property(srna, "gpencil_brush_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "brush_type");
RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_types_items);
RNA_def_property_ui_text(prop, "Type", "Category of the brush");
@@ -1243,7 +1243,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_eraser_mode_update");
- prop = RNA_def_property(srna, "gpencil_fill_draw_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "fill_draw_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "fill_draw_mode");
RNA_def_property_enum_items(prop, rna_enum_gpencil_fill_draw_modes_items);
RNA_def_property_ui_text(prop, "Mode", "Mode to draw boundary limits");
@@ -1258,13 +1258,13 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_Brush_material_update");
- prop = RNA_def_property(srna, "gpencil_fill_show_boundary", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "fill_show_boundary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_SHOW_HELPLINES);
RNA_def_property_boolean_default(prop, true);
RNA_def_property_ui_text(prop, "Show Lines", "Show help lines for filling to see boundaries");
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
- prop = RNA_def_property(srna, "gpencil_fill_hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "fill_hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_HIDE);
RNA_def_property_boolean_default(prop, true);
RNA_def_property_ui_text(prop, "Hide", "Hide transparent lines to use as boundary for filling");