[Bf-blender-cvs] [9fe592ab8f3] master: Fix (unreported) transfer mesh data operator not enabling autosmooth.
Bastien Montagne
noreply at git.blender.org
Mon Aug 5 18:44:37 CEST 2019
Commit: 9fe592ab8f3e29662b0beeac124196e1d1d24a75
Author: Bastien Montagne
Date: Mon Aug 5 18:43:03 2019 +0200
Branches: master
https://developer.blender.org/rB9fe592ab8f3e29662b0beeac124196e1d1d24a75
Fix (unreported) transfer mesh data operator not enabling autosmooth.
When we transfer custom normals and allow for data creation, we should
also enable autosmooth on destination meshes.
===================================================================
M source/blender/editors/object/object_data_transfer.c
===================================================================
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index 79aafc6978f..0a5db782892 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -495,12 +495,16 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
NULL,
false,
op->reports)) {
+
+ if (data_type == DT_TYPE_LNOR && use_create) {
+ ((Mesh *)ob_dst->data)->flag |= ME_AUTOSMOOTH;
+ }
+
+ DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
changed = true;
}
}
- DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
-
if (reverse_transfer) {
SWAP(Object *, ob_src, ob_dst);
}
More information about the Bf-blender-cvs
mailing list