diff options
Diffstat (limited to 'source/blender/editors/object/object_data_transfer.c')
-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; |