diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-04 11:29:45 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-04 11:29:45 +0400 |
commit | 46cd2a6a38a67c7dfc3e5a8880b6f7f055e50a8a (patch) | |
tree | eb678691d0d90b24d8c756ce99ba20f8a2b51aa7 /source/blender/editors/space_view3d | |
parent | 4414f38cbfa22d875039c4660af2954f6d7cdfc3 (diff) |
Fix #31093: Brush's "Paint curve presets" in Image paint in UV\Image Editor doesn't work if weight paint mode is active
Some operators like curve presets, color sample and some more were using object's
mode to distinguish in which mode user is currently painting. Such approach fails
in cases when there's paint mode active in 3D viewport and Image Editor.
Changed logic here to use some context's state like active space which helps
distinguishing current paint mode more accurate.
Ported all areas which uses paint_get_active() to new paint_get_active_from_context().
There're still some calls to paint_get_active(), but that shouldn't be harmful due
to that places indeed have object's mode as priority when getting paint mode.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 8ba0d75c786..d632314f3ca 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -498,7 +498,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event) static void viewops_data_free(bContext *C, wmOperator *op) { ARegion *ar; - Paint *p = paint_get_active(CTX_data_scene(C)); + Paint *p = paint_get_active_from_context(C); if (op->customdata) { ViewOpsData *vod = op->customdata; |