diff options
author | Pablo Vazquez <venomgfx@gmail.com> | 2018-07-31 13:46:50 +0300 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2018-07-31 13:46:58 +0300 |
commit | d58dd3de3d7bf26f501af328a855214ced6b04d5 (patch) | |
tree | a429675c756a91916e6216e3f1015a1cae85f693 /release/scripts/startup/bl_ui/properties_grease_pencil_common.py | |
parent | 31fcd40efd3a98113cec837282c6dd2e1d34caa1 (diff) |
UI: Annotations panel tweak
"New Note" and "New" datablock do the same, only show one.
Minor code comments cleanup.
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 | 32 |
1 files changed, 10 insertions, 22 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 7c3e7364ed1..65e7abe24a4 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -321,8 +321,6 @@ class GreasePencilAppearancePanel: col.row().prop(brush, "cursor_color_sub", text="Subtract") -############################### - class GPENCIL_MT_pie_tool_palette(Menu): """A pie menu for quick access to Grease Pencil tools""" bl_label = "Grease Pencil Tools" @@ -508,7 +506,7 @@ class GPENCIL_MT_pie_tools_more(Menu): class GPENCIL_MT_pie_sculpt(Menu): - """A pie menu for accessing Grease Pencil stroke sculpting settings""" + """A pie menu for accessing Grease Pencil stroke sculpt settings""" bl_label = "Grease Pencil Sculpt" @classmethod @@ -557,9 +555,6 @@ class GPENCIL_MT_pie_sculpt(Menu): row.prop_enum(settings, "tool", value='RANDOMIZE') -############################### - - class GPENCIL_MT_snap(Menu): bl_label = "Snap" @@ -657,7 +652,7 @@ class GPENCIL_MT_gpencil_draw_specials(Menu): layout.operator("gpencil.primitive", text="Rectangle", icon='UV_FACESEL').type = 'BOX' layout.operator("gpencil.primitive", text="Circle", icon='ANTIALIASED').type = 'CIRCLE' - # colors + # Colors. layout.separator() layout.operator("gpencil.colorpick", text="Colors", icon="GROUP_VCOL") @@ -720,23 +715,20 @@ class GreasePencilDataPanel: @staticmethod def draw(self, context): layout = self.layout - #layout.use_property_split = True layout.use_property_decorate = False - # owner of Grease Pencil data + # Grease Pencil owner. gpd_owner = context.gpencil_data_owner gpd = context.gpencil_data - # Owner Selector + # Owner selector. if context.space_data.type == 'CLIP_EDITOR': layout.row().prop(context.space_data, "grease_pencil_source", expand=True) - # Grease Pencil data selector + layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink") - # Grease Pencil data... - if (gpd is None) or (not gpd.layers): - layout.operator("gpencil.layer_add", text="New Note") - else: + # List of layers/notes. + if gpd or gpd.layers: self.draw_layers(context, layout, gpd) def draw_layers(self, context, layout, gpd): @@ -783,7 +775,6 @@ class GreasePencilDataPanel: row.operator("gpencil.active_frame_delete", text="", icon='X') - class GreasePencilOnionPanel: @staticmethod def draw_settings(layout, gp): @@ -794,7 +785,7 @@ class GreasePencilOnionPanel: row = col.row() row.prop(gp, "onion_factor", text="Opacity", slider=True) - # - Before Frames + # Frames before. sub = layout.column(align=True) row = sub.row(align=True) row.active = gp.use_ghost_custom_colors @@ -804,7 +795,7 @@ class GreasePencilOnionPanel: row.active = gp.onion_mode in ('ABSOLUTE', 'RELATIVE') row.prop(gp, "ghost_before_range", text="Frames Before") - # - After Frames + # Frames after. sub = layout.column(align=True) row = sub.row(align=True) row.active = gp.use_ghost_custom_colors @@ -817,7 +808,7 @@ class GreasePencilOnionPanel: layout.prop(gp, "use_ghost_custom_colors", text="Use Custom Color") layout.prop(gp, "use_ghosts_always", text="View In Render") - # - fade and loop + # Fade and loop. row = layout.row() row.active = gp.use_onion_skinning row.prop(gp, "use_onion_fade", text="Fade") @@ -827,8 +818,6 @@ class GreasePencilOnionPanel: subrow.prop(gp, "use_onion_loop", text="Loop") -############################### - class GreasePencilToolsPanel: # For use in "2D" Editors without their own toolbar # subclass must set @@ -869,7 +858,6 @@ class GreasePencilToolsPanel: gpencil_stroke_placement_settings(context, layout) -############################### classes = ( GPENCIL_MT_pie_tool_palette, |