[Bf-blender-cvs] [c469c72405d] blender2.8: Cleanup: grease pencil RNA naming

Campbell Barton noreply at git.blender.org
Wed Oct 31 02:03:06 CET 2018


Commit: c469c72405d97ea5eab85c36a1ace04a57b2c447
Author: Campbell Barton
Date:   Wed Oct 31 09:27:40 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBc469c72405d97ea5eab85c36a1ace04a57b2c447

Cleanup: grease pencil RNA naming

Follow naming conventions for boolean's,

Also rename enable_settings -> use_settings_postprocess.

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

M	release/scripts/startup/bl_operators/presets.py
M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/makesrna/intern/rna_brush.c

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

diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py
index 9d64c02d1ca..17ba9420f00 100644
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@ -675,7 +675,7 @@ class AddPresetGpencilBrush(AddPresetBase, Operator):
         "settings.active_smooth_factor",
         "settings.angle",
         "settings.angle_factor",
-        "settings.use_stabilizer",
+        "settings.use_settings_stabilizer",
         "brush.smooth_stroke_radius",
         "brush.smooth_stroke_factor",
         "settings.pen_smooth_factor",
@@ -684,7 +684,7 @@ class AddPresetGpencilBrush(AddPresetBase, Operator):
         "settings.pen_thick_smooth_steps",
         "settings.pen_subdivision_steps",
         "settings.random_subdiv",
-        "settings.enable_random",
+        "settings.use_settings_random",
         "settings.random_pressure",
         "settings.random_strength",
         "settings.uv_random",
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 9f6a98bc787..f9c009b4728 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -342,7 +342,7 @@ class GreasePencilAppearancePanel:
             layout.prop(gp_settings, "use_cursor", text="Show Brush")
 
             if gp_settings.tool == 'DRAW':
-                layout.prop(gp_settings, "disable_lasso", text="Hide fill color while drawing")
+                layout.prop(gp_settings, "show_lasso", text="Show fill color while drawing")
 
             if gp_settings.tool == 'FILL':
                 layout.prop(brush, "cursor_color_add", text="Color")
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 3c7e7309fa4..04b64325771 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1361,7 +1361,7 @@ class _defs_gpencil_paint:
             icon_value=icon_id,
         )
 
-        row.prop(gp_settings, "pin_material", text="")
+        row.prop(gp_settings, "use_material_pin", text="")
 
     @staticmethod
     def draw_settings_common(context, layout, tool):
@@ -1388,7 +1388,7 @@ class _defs_gpencil_paint:
 
                 row = layout.row(align=True)
                 row.prop(gp_settings, "fill_draw_mode", text="")
-                row.prop(gp_settings, "fill_show_boundary", text="", icon='GRID')
+                row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID')
 
             else:  # bgpsettings.tool == 'DRAW':
                 row = layout.row(align=True)
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 5f3052fd3dc..e8fffe0c309 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1371,7 +1371,7 @@ 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.tool == 'ERASE':
-                sub.prop(gp_settings, "default_eraser", text="")
+                sub.prop(gp_settings, "use_default_eraser", text="")
 
             # Brush details
             if gp_settings.tool == 'ERASE':
@@ -1399,13 +1399,13 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
 
                 row = layout.row(align=True)
                 row.prop(gp_settings, "fill_draw_mode", text="Boundary Draw Mode")
-                row.prop(gp_settings, "fill_show_boundary", text="", icon='GRID')
+                row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID')
 
                 col = layout.column(align=True)
                 col.enabled = gp_settings.fill_draw_mode != 'STROKE'
-                col.prop(gp_settings, "fill_hide", text="Ignore Transparent Strokes")
+                col.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes")
                 sub = col.row(align=True)
-                sub.enabled = gp_settings.fill_hide
+                sub.enabled = not gp_settings.show_fill
                 sub.prop(gp_settings, "fill_threshold", text="Threshold")
             else:  # bgpsettings.tool == 'DRAW':
                 row = layout.row(align=True)
@@ -1460,7 +1460,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
 class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel):
     bl_context = ".greasepencil_paint"
     bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_option'
-    bl_label = "Stabilizer"
+    bl_label = "Stabilizer Settings"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -1473,7 +1473,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel):
     def draw_header(self, context):
         brush = context.active_gpencil_brush
         gp_settings = brush.gpencil_settings
-        self.layout.prop(gp_settings, "use_stabilizer", text="")
+        self.layout.prop(gp_settings, "use_settings_stabilizer", text="")
 
     @staticmethod
     def draw(self, context):
@@ -1483,7 +1483,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel):
 
         brush = context.active_gpencil_brush
         gp_settings = brush.gpencil_settings
-        layout.active = gp_settings.use_stabilizer
+        layout.active = gp_settings.use_settings_stabilizer
 
         layout.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
         layout.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
@@ -1505,7 +1505,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_settings(View3DPanel, Panel):
     def draw_header(self, context):
         brush = context.active_gpencil_brush
         gp_settings = brush.gpencil_settings
-        self.layout.prop(gp_settings, "enable_settings", text="")
+        self.layout.prop(gp_settings, "use_settings_postprocess", text="")
 
     @staticmethod
     def draw(self, context):
@@ -1515,7 +1515,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_settings(View3DPanel, Panel):
 
         brush = context.active_gpencil_brush
         gp_settings = brush.gpencil_settings
-        layout.active = gp_settings.enable_settings
+        layout.active = gp_settings.use_settings_postprocess
 
         col = layout.column(align=True)
         col.prop(gp_settings, "pen_smooth_factor")
@@ -1546,7 +1546,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
     def draw_header(self, context):
         brush = context.active_gpencil_brush
         gp_settings = brush.gpencil_settings
-        self.layout.prop(gp_settings, "enable_random", text="")
+        self.layout.prop(gp_settings, "use_settings_random", text="")
 
     @staticmethod
     def draw(self, context):
@@ -1556,7 +1556,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
 
         brush = context.active_gpencil_brush
         gp_settings = brush.gpencil_settings
-        layout.active = gp_settings.enable_random
+        layout.active = gp_settings.use_settings_random
 
         layout.prop(gp_settings, "random_pressure", text="Pressure", slider=True)
         layout.prop(gp_settings, "random_strength", text="Strength", slider=True)
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index f3d02c2f905..2366c5186e3 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1217,10 +1217,10 @@ 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, NULL);
 
-	prop = RNA_def_property(srna, "use_stabilizer", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "use_settings_stabilizer", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_STABILIZE_MOUSE);
 	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_ui_text(prop, "Stabilizer",
+	RNA_def_property_ui_text(prop, "Use Stabilizer",
 		"Draw lines with a delay to allow smooth strokes. Press Shift key to override while drawing");
 	RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
 
@@ -1258,19 +1258,19 @@ 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, "fill_show_boundary", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_fill_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, "fill_hide", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_HIDE);
+	prop = RNA_def_property(srna, "show_fill", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_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");
+	RNA_def_property_ui_text(prop, "Show Fill", "Show transparent lines to use as boundary for filling");
 	RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
 
-	prop = RNA_def_property(srna, "default_eraser", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "use_default_eraser", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_DEFAULT_ERASER);
 	RNA_def_property_boolean_default(prop, true);
 	RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
@@ -1278,25 +1278,25 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
 	RNA_def_parameter_c

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list