forked from bartvdbraak/blender
fix [#37031] bones are not selectable in weight paint mode anymore
This commit is contained in:
parent
afab39b9d6
commit
cb6e795a47
@ -74,6 +74,7 @@ bool paint_space_stroke_enabled(struct Brush *br, enum PaintMode mode);
|
||||
bool paint_supports_dynamic_size(struct Brush *br, enum PaintMode mode);
|
||||
bool paint_supports_dynamic_tex_coords(struct Brush *br, enum PaintMode mode);
|
||||
bool paint_supports_smooth_stroke(struct Brush *br, enum PaintMode mode);
|
||||
bool paint_supports_texture(enum PaintMode mode);
|
||||
bool paint_supports_jitter(enum PaintMode mode);
|
||||
|
||||
struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf);
|
||||
|
@ -728,9 +728,16 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
|
||||
|
||||
static int stencil_control_poll(bContext *C)
|
||||
{
|
||||
Paint *paint = BKE_paint_get_active_from_context(C);
|
||||
Brush *br = BKE_paint_brush(paint);
|
||||
PaintMode mode = BKE_paintmode_get_active_from_context(C);
|
||||
|
||||
Paint *paint;
|
||||
Brush *br;
|
||||
|
||||
if (!paint_supports_texture(mode))
|
||||
return false;
|
||||
|
||||
paint = BKE_paint_get_active_from_context(C);
|
||||
br = BKE_paint_brush(paint);
|
||||
return (br &&
|
||||
(br->mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL ||
|
||||
br->mask_mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL));
|
||||
|
@ -572,6 +572,12 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool paint_supports_texture(PaintMode mode)
|
||||
{
|
||||
/* ommit: PAINT_WEIGHT, PAINT_SCULPT_UV, PAINT_INVALID */
|
||||
return ELEM4(mode, PAINT_SCULPT, PAINT_VERTEX, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D);
|
||||
}
|
||||
|
||||
/* return true if the brush size can change during paint (normally used for pressure) */
|
||||
bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user