diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-11-25 19:04:22 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-11-30 17:52:44 +0300 |
commit | 9081b80d15b3446f80ef76d10287de7d1281bd74 (patch) | |
tree | 452128b770b7bb1d6f2a646fa0fd37a0cc1866f1 /release/scripts/startup/bl_ui | |
parent | f280300b6ac9a6cacfc91bee79ac7a10bd048d39 (diff) |
GPencil: New operator to reset Vertex Colors
This operators reset the vertex color information of the strokes.
If nothing is selected, all strokes are reset. If any is selected, only selected strokes are reset.
Also added a new menu Paint in Vertex Color mode.
Differential Revision: https://developer.blender.org/D9647
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index e0c28983544..07a7d815c53 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -870,13 +870,15 @@ class VIEW3D_MT_editor_menus(Menu): if gp_edit: if obj and obj.mode == 'PAINT_GPENCIL': - layout.menu("VIEW3D_MT_paint_gpencil") + layout.menu("VIEW3D_MT_draw_gpencil") elif obj and obj.mode == 'EDIT_GPENCIL': layout.menu("VIEW3D_MT_edit_gpencil") layout.menu("VIEW3D_MT_edit_gpencil_stroke") layout.menu("VIEW3D_MT_edit_gpencil_point") elif obj and obj.mode == 'WEIGHT_GPENCIL': layout.menu("VIEW3D_MT_weight_gpencil") + if obj and obj.mode == 'VERTEX_GPENCIL': + layout.menu("VIEW3D_MT_paint_gpencil") elif edit_object: layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower()) @@ -1820,6 +1822,15 @@ class VIEW3D_MT_select_edit_armature(Menu): layout.operator("object.select_pattern", text="Select Pattern...") +class VIEW3D_MT_paint_gpencil(Menu): + bl_label = "Paint" + + def draw(self, context): + layout = self.layout + + layout.operator("gpencil.stroke_reset_vertex_color") + + class VIEW3D_MT_select_gpencil(Menu): bl_label = "Select" @@ -4853,7 +4864,7 @@ class VIEW3D_MT_gpencil_simplify(Menu): layout.operator("gpencil.stroke_sample", text="Sample") -class VIEW3D_MT_paint_gpencil(Menu): +class VIEW3D_MT_draw_gpencil(Menu): bl_label = "Draw" def draw(self, _context): @@ -7588,6 +7599,7 @@ classes = ( VIEW3D_MT_edit_mesh_split, VIEW3D_MT_edit_mesh_showhide, VIEW3D_MT_paint_gpencil, + VIEW3D_MT_draw_gpencil, VIEW3D_MT_assign_material, VIEW3D_MT_edit_gpencil, VIEW3D_MT_edit_gpencil_stroke, |