Alternate fix for bug [#34369], where invalid polygon normals could be saved in the...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 6 Mar 2013 03:58:38 +0000 (03:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 6 Mar 2013 03:58:38 +0000 (03:58 +0000)
This was from initial BMesh merge, but should not have been added in since face normals are calculated and stored in the DerivedMesh.

Toggling editmode would remove poly-normals so its unlikely anything relies on this custom-data.

source/blender/blenkernel/intern/customdata.c
source/blender/editors/object/object_modifier.c

index 787c854..e43f831 100644 (file)
@@ -1169,7 +1169,7 @@ const CustomDataMask CD_MASK_MESH =
     CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL |
     CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS |
     CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MPOLY | CD_MASK_MLOOP |
-    CD_MASK_MTEXPOLY | CD_MASK_NORMAL | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
+    CD_MASK_MTEXPOLY | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
     CD_MASK_GRID_PAINT_MASK | CD_MASK_MVERT_SKIN;
 const CustomDataMask CD_MASK_EDITMESH =
     CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MLOOPUV |
index 34c3dbd..8d29813 100644 (file)
@@ -620,8 +620,6 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
                        }
 
                        DM_to_mesh(dm, me, ob);
-                       /* so we don't reuse this normal layer, see: [#34369] */
-                       CustomData_free_layers(&me->pdata, CD_NORMAL, me->totpoly);
 
                        dm->release(dm);