Fix T40610. This is a critical bug caused by own bugfix that does not

allow editing any object type without bounding boxes.

This should be included in the final release!
This commit is contained in:
Antonis Ryakiotakis 2014-06-14 14:30:22 +03:00
parent 9073a81bce
commit 781de742eb
Notes: blender-bot 2023-02-14 10:30:36 +01:00
Referenced by issue #40633, 2.71 crashes when I try to duplicate a bone
Referenced by issue #40610, Immediate crash on bones.
1 changed files with 4 additions and 1 deletions

View File

@ -507,6 +507,7 @@ static void initSnappingMode(TransInfo *t)
if (t->tsnap.applySnap != NULL && // A snapping function actually exist
(obedit != NULL && ELEM5(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE, OB_MBALL)) ) // Temporary limited to edit mode meshes, armature, curves, mballs
{
BoundBox *bb_init;
/* Exclude editmesh if using proportional edit */
if ((obedit->type == OB_MESH) && (t->flag & T_PROP_EDIT)) {
t->tsnap.modeSelect = SNAP_NOT_OBEDIT;
@ -517,7 +518,9 @@ static void initSnappingMode(TransInfo *t)
/* store the original bounding box -
* we could slightly increase the size in screen space but leaving as TODO */
t->tsnap.BB_init = *BKE_object_boundbox_get(obedit);
bb_init = BKE_object_boundbox_get(obedit);
if (bb_init)
t->tsnap.BB_init = *bb_init;
}
/* Particles edit mode*/
else if (t->tsnap.applySnap != NULL && // A snapping function actually exist