Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-10-29 21:49:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-10-29 21:49:36 +0300
commit98527a71061735a20b712a2c4d552c0c966e5798 (patch)
tree8535a11f417538d2cb0e0b48a5783e329356dd62 /source/blender/editors/transform/transform_orientations.c
parent88b38c30a1c1b799890b2644391af103fcaeae34 (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/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index e790b38dd67..933d3303437 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -518,6 +518,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
Object *obedit = CTX_data_active_object(C);
float normal[3]={0.0, 0.0, 0.0};
float plane[3]={0.0, 0.0, 0.0};
+
switch(t->current_orientation) {
case V3D_MANIP_GLOBAL:
@@ -530,7 +531,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
gimbalAxis(ob, t->spacemtx);
break;
case V3D_MANIP_NORMAL:
- if(obedit || ob->mode & OB_MODE_POSE) {
+ if(obedit || (ob && ob->mode & OB_MODE_POSE)) {
float mat[3][3];
int type;
@@ -579,7 +580,12 @@ void initTransformOrientation(bContext *C, TransInfo *t)
/* no break we define 'normal' as 'local' in Object mode */
case V3D_MANIP_LOCAL:
strcpy(t->spacename, "local");
- Mat3CpyMat4(t->spacemtx, ob->obmat);
+
+ if(ob)
+ Mat3CpyMat4(t->spacemtx, ob->obmat);
+ else
+ Mat3One(t->spacemtx);
+
Mat3Ortho(t->spacemtx);
break;