diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-02-09 16:49:07 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-09 16:49:56 +0300 |
commit | 0b473168cd291615d81ad31ce8254a90ce4f2738 (patch) | |
tree | 16a92a02a35a260386f71df53ace3a3ac66ea6ca /source/blender/editors/transform/transform_orientations.c | |
parent | 8ff7f14c76df2cd2d214e3b5f8078a213a262a6b (diff) |
Fix widget not showing up
(and more Scene.base > SceneLayer.object_bases changes in transforma code)
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 62360c8972a..9c9cf2dba50 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -586,10 +586,10 @@ static unsigned int bm_mesh_faces_select_get_n(BMesh *bm, BMVert **elems, const int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3], const short around) { - Scene *scene = CTX_data_scene(C); + SceneLayer *sl = CTX_data_scene_layer(C); Object *obedit = CTX_data_edit_object(C); - BaseLegacy *base; - Object *ob = OBACT; + Base *base; + Object *ob = OBACT_NEW; int result = ORIENTATION_NONE; const bool activeOnly = (around == V3D_AROUND_ACTIVE); @@ -1017,15 +1017,16 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3 else { /* we need the one selected object, if its not active */ View3D *v3d = CTX_wm_view3d(C); - ob = OBACT; - if (ob && (ob->flag & SELECT)) { + base = BASACT_NEW; + ob = OBACT_NEW; + if (base && ((base->flag & BASE_SELECTED) != 0)) { /* pass */ } else { /* first selected */ ob = NULL; - for (base = scene->base.first; base; base = base->next) { - if (TESTBASELIB(v3d, base)) { + for (base = sl->object_bases.first; base; base = base->next) { + if (TESTBASELIB_NEW(base)) { ob = base->object; break; } |