diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-10-29 21:49:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-10-29 21:49:36 +0300 |
commit | 98527a71061735a20b712a2c4d552c0c966e5798 (patch) | |
tree | 8535a11f417538d2cb0e0b48a5783e329356dd62 /source/blender/editors/armature | |
parent | 88b38c30a1c1b799890b2644391af103fcaeae34 (diff) |
various small fixes
- undo stops all running jobs (operator redo was crashing with threaded render)
- adding new armatures was crashing if there was no valid view3d
- transform with an active hidden object would crash
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 1e94e1b440c..c5b01f1cab0 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -2242,7 +2242,7 @@ void add_primitive_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d) VECCOPY(bone->head, curs); - if ( (U.flag & USER_ADD_VIEWALIGNED) ) + if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) VecAddf(bone->tail, bone->head, imat[1]); // bone with unit length 1 else VecAddf(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z @@ -3423,7 +3423,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) Mat4Invert(obedit->imat, obedit->obmat); Mat4MulVecfl(obedit->imat, curs); - if (U.flag & USER_ADD_VIEWALIGNED) + if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) Mat3CpyMat4(obmat, rv3d->viewmat); else Mat3One(obmat); @@ -3438,7 +3438,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) VECCOPY(bone->head, curs); - if(U.flag & USER_ADD_VIEWALIGNED) + if(rv3d && (U.flag & USER_ADD_VIEWALIGNED)) VecAddf(bone->tail, bone->head, imat[1]); // bone with unit length 1 else VecAddf(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z |