fix another crash from missing update in Auto-Merge from r52911
authorCampbell Barton <ideasman42@gmail.com>
Thu, 13 Dec 2012 00:41:23 +0000 (00:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 13 Dec 2012 00:41:23 +0000 (00:41 +0000)
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/transform/transform_conversions.c
source/blender/makesrna/intern/rna_object.c

index 6adcede9699d3b878546f9032b330359d656fe9e..a8f6ccc6c2cb6834875b795e91319d07fdb9d25a 100644 (file)
@@ -107,21 +107,23 @@ void EDBM_select_mirrored(Object *UNUSED(obedit), BMEditMesh *em, int extend)
 
 void EDBM_automerge(Scene *scene, Object *obedit, int update)
 {
-       BMEditMesh *em;
        
        if ((scene->toolsettings->automerge) &&
            (obedit && obedit->type == OB_MESH))
        {
-               em = BMEdit_FromObject(obedit);
-               if (!em)
+               int ok;
+               BMEditMesh *em = BMEdit_FromObject(obedit);
+
+               if (!em) {
                        return;
+               }
+
+               ok = BMO_op_callf(em->bm, BMO_FLAG_DEFAULTS,
+                                 "automerge verts=%hv dist=%f",
+                                 BM_ELEM_SELECT, scene->toolsettings->doublimit);
 
-               BMO_op_callf(em->bm, BMO_FLAG_DEFAULTS,
-                            "automerge verts=%hv dist=%f",
-                            BM_ELEM_SELECT, scene->toolsettings->doublimit);
-               if (update) {
-                       DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
-                       BMEdit_RecalcTessellation(em);
+               if (LIKELY(ok) && update) {
+                       EDBM_update_generic(em, TRUE, TRUE);
                }
        }
 }
index dc33b851db8e4f1c105870c2a4b46f95a4f498de..ea852fdb098a89d53c2b7336ba97664be6882eb2 100644 (file)
@@ -5131,7 +5131,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
                                         * during cleanup - psy-fi */
                                        freeSlideTempFaces(sld);
                                }
-                               EDBM_automerge(t->scene, t->obedit, 1);
+                               EDBM_automerge(t->scene, t->obedit, TRUE);
                        }
                        else {
                                if (t->mode == TFM_EDGE_SLIDE) {
index df7c4d7853177dcb05dbe20ef47d914e6a7f83e9..c49bdf032fc61dfca2af1ed0512b9594f34802a4 100644 (file)
@@ -94,6 +94,7 @@ static EnumPropertyItem parent_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
+#ifndef RNA_RUNTIME
 static EnumPropertyItem dupli_items[] = {
        {0, "NONE", 0, "None", ""},
        {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame"},
@@ -102,6 +103,7 @@ static EnumPropertyItem dupli_items[] = {
        {OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing"},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 static EnumPropertyItem collision_bounds_items[] = {
        {OB_BOUND_BOX, "BOX", 0, "Box", ""},