Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / object / object_bake_api.c
index eb2d1117f1ece9bb32e961c81c5e3f59d468f0f0..0a4989ebad43c872b9aeb963c4020305a3e58d18 100644 (file)
@@ -627,7 +627,9 @@ static Mesh *bake_mesh_new_from_object(EvaluationContext *eval_ctx, Main *bmain,
                ED_object_editmode_load(ob);
 
        Mesh *me = BKE_mesh_new_from_object(eval_ctx, bmain, scene, ob, 1, 2, 0, 0);
-       BKE_mesh_split_faces(me, true);
+       if (me->flag & ME_AUTOSMOOTH) {
+               BKE_mesh_split_faces(me, true);
+       }
 
        return me;
 }