diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-10-12 21:15:22 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-10-12 21:15:22 +0300 |
commit | 29a281f9ef5b3a577e6d658892a704b509d718ef (patch) | |
tree | b7232f9021ef47c435a7c52cc12f6850f249d89b /source/blender/editors/armature/pose_edit.c | |
parent | bb7f4f5714430beda44403f0bd75c368e8f86a39 (diff) |
Multi-Objects: ARMATURE_OT_armature_layers for pose
That said, I think we should not support multi-object for either edit or pose armatures.
Diffstat (limited to 'source/blender/editors/armature/pose_edit.c')
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 5dfca081cfb..e080acc78ed 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -987,6 +987,7 @@ static int armature_layers_invoke(bContext *C, wmOperator *op, const wmEvent *ev static int armature_layers_exec(bContext *C, wmOperator *op) { ViewLayer *view_layer = CTX_data_view_layer(C); + Object *ob_active = CTX_data_active_object(C); PointerRNA ptr; bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ bool changed = false; @@ -995,7 +996,7 @@ static int armature_layers_exec(bContext *C, wmOperator *op) RNA_boolean_get_array(op->ptr, "layers", layers); uint objects_len = 0; - Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len); + Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(view_layer, &objects_len, ob_active->mode); for (uint ob_index = 0; ob_index < objects_len; ob_index++) { Object *ob = objects[ob_index]; bArmature *arm = armature_layers_get_data(&ob); |