diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-15 16:59:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-15 16:59:38 +0300 |
commit | 77497175fa1f2f3aacf4ab966df9d7223d4034cc (patch) | |
tree | 34e143b88d2f9857e6926a1d156b8d8c3243d7b2 /source/blender/editors/transform/transform_generics.c | |
parent | 90d80ddaa28908048e428fd08c4c771c015a0d66 (diff) |
Cleanup/refactor: no new general arg-less macros enforcing var names please!
We do have an history of those pieces of evil in our code, would be nice
to get fully rid of it, but at the very least let's not add more of them
in new code. :)
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 6d3b2408542..a0eee4296c1 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -329,7 +329,7 @@ static void recalcData_actedit(TransInfo *t) /* NOTE: sync this with the code in ANIM_animdata_get_context() */ ac.scene = t->scene; ac.scene_layer = t->scene_layer; - ac.obact = OBACT_NEW; + ac.obact = OBACT_NEW(sl); ac.sa = t->sa; ac.ar = t->ar; ac.sl = (t->sa) ? t->sa->spacedata.first : NULL; @@ -379,7 +379,7 @@ static void recalcData_graphedit(TransInfo *t) /* NOTE: sync this with the code in ANIM_animdata_get_context() */ ac.scene = t->scene; ac.scene_layer = t->scene_layer; - ac.obact = OBACT_NEW; + ac.obact = OBACT_NEW(sl); ac.sa = t->sa; ac.ar = t->ar; ac.sl = (t->sa) ? t->sa->spacedata.first : NULL; @@ -1793,7 +1793,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3]) } else if (t->flag & T_POSE) { SceneLayer *sl = t->scene_layer; - Object *ob = OBACT_NEW; + Object *ob = OBACT_NEW(sl); if (ob) { bPoseChannel *pchan = BKE_pose_channel_active(ob); if (pchan && (!select_only || (pchan->bone->flag & BONE_SELECTED))) { @@ -1813,8 +1813,8 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3]) else { /* object mode */ SceneLayer *sl = t->scene_layer; - Object *ob = OBACT_NEW; - Base *base = BASACT_NEW; + Object *ob = OBACT_NEW(sl); + Base *base = BASACT_NEW(sl); if (ob && ((!select_only) || ((base->flag & BASE_SELECTED) != 0))) { copy_v3_v3(r_center, ob->obmat[3]); ok = true; |