diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 19:43:10 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 19:44:24 +0300 |
commit | 18f06186778ea67583a362a611b1efa8c9da5fbd (patch) | |
tree | 70f2fd8b2d9f9f0d9c47899d2ea210d1b9d8a71a /source/blender/blenkernel/intern/layer_utils.c | |
parent | 9ed522db735b1d798a5d68c6bf547e8123d33a4b (diff) |
Fix T58412: in weight paint + pose mode certain armature operations crash.
The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active
object is in the correct mode, which is wrong in this case. It also
only considered objects of the same type as active, which had to be
replaced with an explicit type parameter.
Diffstat (limited to 'source/blender/blenkernel/intern/layer_utils.c')
-rw-r--r-- | source/blender/blenkernel/intern/layer_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/layer_utils.c b/source/blender/blenkernel/intern/layer_utils.c index 2d446af9ac8..fb25ca3ece4 100644 --- a/source/blender/blenkernel/intern/layer_utils.c +++ b/source/blender/blenkernel/intern/layer_utils.c @@ -44,7 +44,7 @@ Base **BKE_view_layer_array_from_bases_in_mode_params( const struct ObjectsInModeParams *params) { if (params->no_dup_data) { - FOREACH_BASE_IN_MODE_BEGIN(view_layer, v3d, params->object_mode, base_iter) { + FOREACH_BASE_IN_MODE_BEGIN(view_layer, v3d, -1, params->object_mode, base_iter) { ID *id = base_iter->object->data; if (id) { id->tag |= LIB_TAG_DOIT; @@ -55,7 +55,7 @@ Base **BKE_view_layer_array_from_bases_in_mode_params( Base **base_array = NULL; BLI_array_declare(base_array); - FOREACH_BASE_IN_MODE_BEGIN(view_layer, v3d, params->object_mode, base_iter) { + FOREACH_BASE_IN_MODE_BEGIN(view_layer, v3d, -1, params->object_mode, base_iter) { if (params->filter_fn) { if (!params->filter_fn(base_iter->object, params->filter_userdata)) { continue; |