svn merge ^/trunk/blender -r42080:42095
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Nov 2011 17:14:27 +0000 (17:14 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Nov 2011 17:14:27 +0000 (17:14 +0000)
13 files changed:
1  2 
source/blender/blenkernel/intern/object.c
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_vgroup.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c
source/blender/modifiers/intern/MOD_weightvgproximity.c
source/blenderplayer/bad_level_call_stubs/stubs.c

index ed7a22b5e0bf59531177d722d35d305d7c5ee349,0b0a0039501f6dc7f0f936103dd3845e2c608bfa..5f689aafaca702e49dd4024b8a08f171702ccf65
@@@ -1801,6 -1785,10 +1801,7 @@@ static void give_parvert(Object *par, i
                                dm->getVertCo(dm, 0, vec);
                        }
                }
 -
 -              if(em)
 -                      BKE_mesh_end_editmesh(me, em);
+               else fprintf(stderr, "%s: DerivedMesh is needed to solve parenting, object position can be wrong now\n", __func__);
        }
        else if (ELEM(par->type, OB_CURVE, OB_SURF)) {
                Nurb *nu;
index ae6ec15e911275b318fbe9e2a3ff5713f8def930,3a4cd6135cfe2426a826ba16b91638a4c2e04216..ab4ff20d503b866c7aac71ac933e44a3e05629c6
@@@ -125,15 -124,20 +126,19 @@@ static int vertex_parent_set_exec(bCont
        
        if(obedit->type==OB_MESH) {
                Mesh *me= obedit->data;
 -              EditMesh *em;
 +              BMEditMesh *em;
  
 -              load_editMesh(scene, obedit);
 -              make_editMesh(scene, obedit);
 +              EDBM_LoadEditBMesh(scene, obedit);
 +              EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit);
  
 -              em= BKE_mesh_get_editmesh(me);
 +              em= me->edit_btmesh;
  
 -              makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH);
+               /* derivedMesh might be needed for solving parenting,
+                  so re-create it here */
 -              eve= em->verts.first;
 -              while(eve) {
 -                      if(eve->f & 1) {
++              makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH, 0);
 +              BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
 +                      if (BM_TestHFlag(eve, BM_SELECT)) {
                                if(v1==0) v1= nr;
                                else if(v2==0) v2= nr;
                                else if(v3==0) v3= nr;
Simple merge