diff options
author | Bastien Montagne <bastien@blender.org> | 2020-07-27 19:15:56 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-07-27 19:15:56 +0300 |
commit | e54289cdf3503fcb874ae06990e7e7c7668bf5ca (patch) | |
tree | 5b3814a3e918887d94bd20fcd51e63a047282b30 /source | |
parent | 7fd68db84122e2b9373987393b17c6aa160ac549 (diff) | |
parent | 1ae8855f8e2dfd5aa710fa521be75be0c81a5971 (diff) |
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_data_transfer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index aebc77ec44b..5a0656ee916 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -420,8 +420,8 @@ static int data_transfer_exec(bContext *C, wmOperator *op) const float ray_radius = RNA_float_get(op->ptr, "ray_radius"); const float islands_precision = RNA_float_get(op->ptr, "islands_precision"); - const int layers_src = RNA_enum_get(op->ptr, "layers_select_src"); - const int layers_dst = RNA_enum_get(op->ptr, "layers_select_dst"); + int layers_src = RNA_enum_get(op->ptr, "layers_select_src"); + int layers_dst = RNA_enum_get(op->ptr, "layers_select_dst"); int layers_select_src[DT_MULTILAYER_INDEX_MAX] = {0}; int layers_select_dst[DT_MULTILAYER_INDEX_MAX] = {0}; const int fromto_idx = BKE_object_data_transfer_dttype_to_srcdst_index(data_type); @@ -447,6 +447,10 @@ static int data_transfer_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } + if (reverse_transfer) { + SWAP(int, layers_src, layers_dst); + } + if (fromto_idx != DT_MULTILAYER_INDEX_INVALID) { layers_select_src[fromto_idx] = layers_src; layers_select_dst[fromto_idx] = layers_dst; |