comment assert and ensure meshes are always calculated with CD_MASK_BAREMESH, scene...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 4 Jan 2011 12:31:42 +0000 (12:31 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 4 Jan 2011 12:31:42 +0000 (12:31 +0000)
source/blender/blenkernel/intern/object.c

index 07fee83a405dd3a7d9235aadf85b9f61369feecf..a2b6163321b4c889f4585075fee9cecec808de86 100644 (file)
@@ -2549,6 +2549,7 @@ void object_handle_update(Scene *scene, Object *ob)
                        switch(ob->type) {
                        case OB_MESH:
                                {
+#if 0                          // XXX, comment for 2.56a release, background wont set 'scene->customdata_mask'
                                        EditMesh *em = (ob == scene->obedit)? BKE_mesh_get_editmesh(ob->data): NULL;
                                        BKE_assert((scene->customdata_mask & CD_MASK_BAREMESH) == CD_MASK_BAREMESH);
                                        if(em) {
@@ -2556,6 +2557,16 @@ void object_handle_update(Scene *scene, Object *ob)
                                                BKE_mesh_end_editmesh(ob->data, em);
                                        } else
                                                makeDerivedMesh(scene, ob, NULL, scene->customdata_mask);
+
+#else                          /* ensure CD_MASK_BAREMESH for now */
+                                       EditMesh *em = (ob == scene->obedit)? BKE_mesh_get_editmesh(ob->data): NULL;
+                                       if(em) {
+                                               makeDerivedMesh(scene, ob, em,  scene->customdata_mask | CD_MASK_BAREMESH); /* was CD_MASK_BAREMESH */
+                                               BKE_mesh_end_editmesh(ob->data, em);
+                                       } else
+                                               makeDerivedMesh(scene, ob, NULL, scene->customdata_mask | CD_MASK_BAREMESH);
+#endif
+
                                }
                                break;