diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2019-12-16 17:05:04 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2019-12-16 17:05:04 +0300 |
commit | ed32db06c1244d8428fd22ce418f19ac0a81e893 (patch) | |
tree | c99252b8068da22c30d4a0166b9c293b43d7dab6 /release/scripts/startup/bl_ui/properties_grease_pencil_common.py | |
parent | 451400f6e6b2911be7059e6d6bf53cc312a2a3c3 (diff) | |
parent | 8d16dc029e6c52b16666b4edfafa66794d64b1a4 (diff) |
Merge branch 'master' into fluid-mantaflowfluid-mantaflow
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_grease_pencil_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 14 |
1 files changed, 8 insertions, 6 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 59c18d4f108..de08713c3e3 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -160,6 +160,7 @@ class GreasePencilSculptOptionsPanel: layout.prop(settings, "use_edit_uv", text="Affect UV") + # GP Object Tool Settings class GreasePencilDisplayPanel: bl_label = "Brush Tip" @@ -175,16 +176,18 @@ class GreasePencilDisplayPanel: else: # GP Sculpt and Weight Paint always have Brush Tip panel. return True + return False def draw_header(self, context): - if self.is_popover: return + if self.is_popover: + return if context.mode == 'PAINT_GPENCIL': brush = context.tool_settings.gpencil_paint.brush gp_settings = brush.gpencil_settings self.layout.prop(gp_settings, "use_cursor", text="") - elif context.mode in ('SCULPT_GPENCIL', 'WEIGHT_GPENCIL'): + elif context.mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}: settings = context.tool_settings.gpencil_sculpt brush = settings.brush @@ -506,7 +509,7 @@ class GPENCIL_MT_move_to_layer(Menu): gpl_active = context.active_gpencil_layer tot_layers = len(gpd.layers) i = tot_layers - 1 - while(i >= 0): + while i >= 0: gpl = gpd.layers[i] if gpl.info == gpl_active.info: icon = 'GREASEPENCIL' @@ -716,12 +719,11 @@ class GreasePencilToolsPanel: bl_options = {'DEFAULT_CLOSED'} @classmethod - def poll(cls, context): + def poll(cls, _context): # XXX - disabled in 2.8 branch. + # return (context.gpencil_data is not None) return False - return (context.gpencil_data is not None) - def draw(self, context): layout = self.layout |