Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-16 10:49:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-16 10:49:03 +0400
commit8a95fccbba997e548a748b70fb9503f7ea96eb4d (patch)
tree60c442c450f9b39f99ca02df06f9ed9a9dc821f8 /source/blender
parent2a417a597d524f24570d0b210edfe3925e81bf8a (diff)
fix [#36153] Crash when choosing a brush.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c11
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 8e2a29964ee..c7f8161c7ed 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -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);
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 1060999e13f..13f97c50dc7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -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);