Fix #124990: GP Draw mode always adds black color to a palette
Caused by fe0e2907b3
Prior to that commit, adding palette colors was only working because
`BKE_paintmode_get_active_from_context` was falling through to
`PaintMode::Texture2D` which then would do its thing in
`palette_color_add_exec`
To resolve, now respect `PaintMode::GPencil` as well there.
Pull Request: https://projects.blender.org/blender/blender/pulls/125062
This commit is contained in:
committed by
Philipp Oeser
parent
61b8397174
commit
71e1d795b3
@@ -180,7 +180,8 @@ static int palette_color_add_exec(bContext *C, wmOperator * /*op*/)
|
||||
PaintMode::Texture3D,
|
||||
PaintMode::Texture2D,
|
||||
PaintMode::Vertex,
|
||||
PaintMode::Sculpt))
|
||||
PaintMode::Sculpt,
|
||||
PaintMode::GPencil))
|
||||
{
|
||||
copy_v3_v3(color->rgb, BKE_brush_color_get(scene, brush));
|
||||
color->value = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user