diff options
author | Antonioya <blendergit@gmail.com> | 2018-08-02 20:35:29 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-08-02 20:35:29 +0300 |
commit | 836db3aee80008def4edb5c32c1cd7eccddc862f (patch) | |
tree | 3c7476480e61726d607c895e675290761c8b292e /release/scripts/startup | |
parent | 45751065c0e13242e08ef0d0b3dbecf9b4a05baa (diff) |
Add Assign Material option to Special menu (W key)
Also some renames and cleanups.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 55 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 62 |
2 files changed, 62 insertions, 55 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 9f2edefc3c2..336e4acfd8f 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -582,59 +582,6 @@ class GPENCIL_MT_separate(Menu): layout.operator("gpencil.stroke_separate", text="Active Layer").mode = 'LAYER' -class GPENCIL_MT_gpencil_edit_specials(Menu): - bl_label = "GPencil Specials" - - def draw(self, context): - layout = self.layout - is_3d_view = context.space_data.type == 'VIEW_3D' - - layout.operator_context = 'INVOKE_REGION_WIN' - - layout.operator("gpencil.stroke_subdivide", text="Subdivide") - layout.operator("gpencil.stroke_simplify_fixed", text="Simplify") - layout.operator("gpencil.stroke_simplify", text="Simplify Adaptative") - - layout.separator() - layout.menu("GPENCIL_MT_separate", text="Separate") - - layout.separator() - layout.operator("gpencil.stroke_split", text="Split") - - layout.separator() - - layout.operator("gpencil.stroke_join", text="Join").type = 'JOIN' - layout.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' - layout.operator("gpencil.stroke_flip", text="Flip Direction") - - layout.separator() - layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame") - layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame All Layers").mode = 'ALL' - - if is_3d_view: - layout.separator() - layout.operator("gpencil.reproject") - - -class GPENCIL_MT_gpencil_sculpt_specials(Menu): - bl_label = "GPencil Specials" - - def draw(self, context): - layout = self.layout - is_3d_view = context.space_data.type == 'VIEW_3D' - - layout.operator_context = 'INVOKE_REGION_WIN' - - layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame") - layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame All Layers").mode = 'ALL' - - layout.separator() - - layout.operator("gpencil.stroke_subdivide", text="Subdivide") - layout.operator("gpencil.stroke_simplify_fixed", text="Simplify") - layout.operator("gpencil.stroke_simplify", text="Simplify Adaptative") - - class GPENCIL_MT_gpencil_draw_specials(Menu): bl_label = "GPencil Draw Specials" @@ -859,8 +806,6 @@ classes = ( GPENCIL_MT_snap, GPENCIL_MT_separate, - GPENCIL_MT_gpencil_edit_specials, - GPENCIL_MT_gpencil_sculpt_specials, GPENCIL_MT_gpencil_draw_specials, GPENCIL_MT_gpencil_draw_delete, diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index a6d66f20494..349832cedf2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3539,6 +3539,7 @@ class VIEW3D_MT_paint_gpencil(Menu): layout.operator("gpencil.delete", text="Delete Frame").type = 'FRAME' layout.operator("gpencil.active_frames_delete_all") + class VIEW3D_MT_assign_material(Menu): bl_label = "Assign Material" @@ -3549,6 +3550,7 @@ class VIEW3D_MT_assign_material(Menu): for mat in ob.data.materials: layout.operator("gpencil.stroke_change_color", text=mat.name).material = mat.name + class VIEW3D_MT_edit_gpencil(Menu): bl_label = "Strokes" @@ -4898,6 +4900,64 @@ class VIEW3D_PT_gpencil_multi_frame(Panel): layout.template_curve_mapping(settings, "multiframe_falloff_curve", brush=True) +class VIEW3D_MT_gpencil_edit_specials(Menu): + bl_label = "Grease Pencil Specials" + + def draw(self, context): + layout = self.layout + is_3d_view = context.space_data.type == 'VIEW_3D' + + layout.operator_context = 'INVOKE_REGION_WIN' + + layout.menu("VIEW3D_MT_assign_material") + layout.separator() + + layout.operator("gpencil.stroke_subdivide", text="Subdivide") + layout.operator("gpencil.stroke_simplify_fixed", text="Simplify") + layout.operator("gpencil.stroke_simplify", text="Simplify Adaptative") + + layout.separator() + layout.menu("GPENCIL_MT_separate", text="Separate") + + layout.separator() + layout.operator("gpencil.stroke_split", text="Split") + + layout.separator() + + layout.operator("gpencil.stroke_join", text="Join").type = 'JOIN' + layout.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' + layout.operator("gpencil.stroke_flip", text="Flip Direction") + + layout.separator() + layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame") + layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame All Layers").mode = 'ALL' + + if is_3d_view: + layout.separator() + layout.operator("gpencil.reproject") + + +class VIEW3D_MT_gpencil_sculpt_specials(Menu): + bl_label = "Grease Pencil Specials" + + def draw(self, context): + layout = self.layout + is_3d_view = context.space_data.type == 'VIEW_3D' + + layout.operator_context = 'INVOKE_REGION_WIN' + layout.menu("VIEW3D_MT_assign_material") + layout.separator() + + layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame") + layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame All Layers").mode = 'ALL' + + layout.separator() + + layout.operator("gpencil.stroke_subdivide", text="Subdivide") + layout.operator("gpencil.stroke_simplify_fixed", text="Simplify") + layout.operator("gpencil.stroke_simplify", text="Simplify Adaptative") + + classes = ( VIEW3D_HT_header, VIEW3D_MT_editor_menus, @@ -5041,6 +5101,8 @@ classes = ( VIEW3D_PT_object_type_visibility, VIEW3D_PT_grease_pencil, VIEW3D_PT_gpencil_multi_frame, + VIEW3D_MT_gpencil_edit_specials, + VIEW3D_MT_gpencil_sculpt_specials, VIEW3D_PT_quad_view, VIEW3D_PT_view3d_stereo, VIEW3D_PT_shading, |