diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-02 22:10:35 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-02 22:10:35 +0300 |
commit | a6721c60d9bc0897e3ce0dc87264fbc705284397 (patch) | |
tree | 12dd77160bcfaa4b37e85a5e8ed29496bb6c0705 /source/blender/editors/transform/transform_orientations.c | |
parent | 16ca4b572e07aa0f83158c187a7c64b27675d4c9 (diff) |
2.5
From the anti-globalization department:
G.obedit terminated!
Wherever possible, use CTX_data_edit_object(C) to get this
now. It's stored in scene now, and the screen context has
it defined.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 7082f1a7459..3ce3b1a8127 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -77,10 +77,10 @@ void BIF_manageTransformOrientation(int confirm, int set) { Object *ob = OBACT; int index = -1; - if (G.obedit) { - if (G.obedit->type == OB_MESH) + if (t->obedit) { + if (t->obedit->type == OB_MESH) index = manageMeshSpace(confirm, set); - else if (G.obedit->type == OB_ARMATURE) + else if (t->obedit->type == OB_ARMATURE) index = manageBoneSpace(confirm, set); } else if (ob && (ob->flag & OB_POSEMODE)) { @@ -431,6 +431,7 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac Scene *scene = CTX_data_scene(C); ScrArea *sa = CTX_wm_area(C); View3D *v3d = sa->spacedata.first; + Object *obedit= CTX_data_edit_object(C); Base *base; Object *ob = OBACT; int result = ORIENTATION_NONE; @@ -438,7 +439,7 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac normal[0] = normal[1] = normal[2] = 0; plane[0] = plane[1] = plane[2] = 0; - if(G.obedit) + if(obedit) { float imat[3][3], mat[3][3]; @@ -448,7 +449,7 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac Mat3Inv(mat, imat); Mat3Transp(mat); - ob= G.obedit; + ob= obedit; if(ob->type==OB_MESH) { @@ -598,7 +599,7 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac } } } /* end editmesh */ - else if ELEM3(G.obedit->type, OB_CURVE, OB_SURF, OB_FONT) + else if ELEM3(obedit->type, OB_CURVE, OB_SURF, OB_FONT) { extern ListBase editNurb; /* BOOO! go away stupid extern */ Nurb *nu; @@ -644,7 +645,7 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac result = ORIENTATION_NORMAL; } } - else if(G.obedit->type==OB_MBALL) + else if(obedit->type==OB_MBALL) { /* editmball.c */ extern ListBase editelems; /* go away ! */ @@ -681,9 +682,9 @@ int getTransformOrientation(bContext *C, float normal[3], float plane[3], int ac result = ORIENTATION_NORMAL; } } - else if (G.obedit->type == OB_ARMATURE) + else if (obedit->type == OB_ARMATURE) { - bArmature *arm = G.obedit->data; + bArmature *arm = obedit->data; EditBone *ebone; for (ebone = G.edbo.first; ebone; ebone=ebone->next) { |