Grease Pencil: Add Sample Color operator to Vertex Color Mode
This PR adds the `sample_color` operator to Grease Pencil Vertex Paint Mode. Pull Request: https://projects.blender.org/blender/blender/pulls/146951
This commit is contained in:
committed by
casey-bianco-davis
parent
152405489d
commit
9496d941fd
@@ -4331,6 +4331,7 @@ def km_grease_pencil_vertex_paint(params):
|
||||
{"properties": [("data_path", "scene.tool_settings.use_gpencil_vertex_select_mask_segment")]}),
|
||||
# Flip primary and secondary color
|
||||
("paint.brush_colors_flip", {"type": 'X', "value": 'PRESS'}, None),
|
||||
("paint.sample_color", {"type": 'X', "value": 'PRESS', "shift": True}, {"properties": [("merged", False)]}),
|
||||
|
||||
# Edit Lines overlay
|
||||
("wm.context_toggle", {"type": 'Q', "value": 'PRESS', "shift": True},
|
||||
|
||||
@@ -2239,6 +2239,8 @@ class VIEW3D_MT_paint_vertex_grease_pencil(Menu):
|
||||
layout.operator("grease_pencil.vertex_color_levels", text="Levels")
|
||||
layout.operator("grease_pencil.vertex_color_hsv", text="Hue/Saturation/Value")
|
||||
layout.operator("grease_pencil.vertex_color_brightness_contrast", text="Brightness/Contrast")
|
||||
layout.separator()
|
||||
layout.operator("paint.sample_color").merged = False
|
||||
|
||||
|
||||
class VIEW3D_MT_select_paint_mask(Menu):
|
||||
|
||||
@@ -483,7 +483,8 @@ static wmOperatorStatus sample_color_modal(bContext *C, wmOperator *op, const wm
|
||||
static bool sample_color_poll(bContext *C)
|
||||
{
|
||||
return (image_paint_poll_ignore_tool(C) || vertex_paint_poll_ignore_tool(C) ||
|
||||
blender::ed::greasepencil::grease_pencil_painting_poll(C));
|
||||
blender::ed::greasepencil::grease_pencil_painting_poll(C) ||
|
||||
blender::ed::greasepencil::grease_pencil_vertex_painting_poll(C));
|
||||
}
|
||||
|
||||
void PAINT_OT_sample_color(wmOperatorType *ot)
|
||||
|
||||
Reference in New Issue
Block a user