manipMoveContext align by 2 axises

68 views
Skip to first unread message

vux...@gmail.com

unread,
Mar 19, 2018, 10:49:19 AM3/19/18
to Python Programming for Autodesk Maya
Hi. How to orient move manipulator by two arbitrary axises?
In manipMoveCOntext documentation I see only orientation by one axis (alignAlong(aa) arg) or by object (orientObject(oo) arg)

Michael Boon

unread,
Mar 19, 2018, 6:24:46 PM3/19/18
to Python Programming for Autodesk Maya
I haven't had a lot of luck setting the activeHandle and then using the alignAlong parameter (maybe that's not how it's meant to be used, I'm not sure). I have found orientAxes and orientObject both seem to work well though.

import maya.cmds as cmds
curctx
= cmds.currentCtx()
if cmds.superCtx(curctx, ex=True):
    ctx
= cmds.superCtx(curctx, q=True)
# This appears to work
cmds
.manipMoveContext(ctx, e=True, orientAxes=[0,20,-45], mode=6)
# So does this
cmds
.manipMoveContext(ctx, e=True, orientObject='pConeShape1', mode=6)
Reply all
Reply to author
Forward
0 new messages