forked from bartvdbraak/blender
fix [#36153] Crash when choosing a brush.
This commit is contained in:
parent
2a417a597d
commit
8a95fccbba
@ -3534,7 +3534,14 @@ int sculpt_mode_poll(bContext *C)
|
||||
|
||||
int sculpt_mode_poll_view3d(bContext *C)
|
||||
{
|
||||
return (sculpt_mode_poll(C) && CTX_wm_region_view3d(C));
|
||||
return (sculpt_mode_poll(C) &&
|
||||
CTX_wm_region_view3d(C));
|
||||
}
|
||||
|
||||
int sculpt_poll_view3d(bContext *C)
|
||||
{
|
||||
return (sculpt_poll(C) &&
|
||||
CTX_wm_region_view3d(C));
|
||||
}
|
||||
|
||||
int sculpt_poll(bContext *C)
|
||||
@ -4951,7 +4958,7 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
BKE_paint_init(&ts->sculpt->paint, PAINT_CURSOR_SCULPT);
|
||||
|
||||
paint_cursor_start(C, sculpt_mode_poll_view3d);
|
||||
paint_cursor_start(C, sculpt_poll_view3d);
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene);
|
||||
|
@ -56,7 +56,9 @@ struct MultiresModifierData *sculpt_multires_active(struct Scene *scene, struct
|
||||
|
||||
int sculpt_mode_poll(struct bContext *C);
|
||||
int sculpt_mode_poll_view3d(struct bContext *C);
|
||||
/* checks for a brush, not just sculpt mode */
|
||||
int sculpt_poll(struct bContext *C);
|
||||
int sculpt_poll_view3d(struct bContext *C);
|
||||
void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob,
|
||||
int need_pmap, int need_mask);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user