diff options
author | Joseph Eagar <joeedh@gmail.com> | 2009-09-15 19:32:09 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2009-09-15 19:32:09 +0400 |
commit | 86b474a344c452c47666af82c6a8077bea0635e2 (patch) | |
tree | 6abdc219e5ad7240d75c3c7af3ec5009648cc55a /source/blender/editors | |
parent | 2601aa9cf37bed73b2808536f05506f367d87952 (diff) |
made subsurf object mode conversion faster, though still needs a bit more work
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 6d5138ff11a..e5b8d59d515 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -915,9 +915,20 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], } } - VECCOPY(normal, ob->obmat[2]); - VECCOPY(plane, ob->obmat[1]); - result = ORIENTATION_NORMAL; + if (!ob) { + normal[0] = 0.0f; + normal[1] = 0.0f; + normal[2] = 1.0f; + plane[0] = 1.0f; + plane[1] = 0.0f; + plane[2] = 0.0f; + + result = ORIENTATION_NORMAL; + } else { + VECCOPY(normal, ob->obmat[2]); + VECCOPY(plane, ob->obmat[1]); + result = ORIENTATION_NORMAL; + } } return result; |