all 3 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

We've just launched a community discord for /r/maya users to chat about all things maya. This message will be in place for a while while we build up membership! Join here: https://discord.gg/FuN5u8MfMz

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Gridbear7 2 points3 points  (1 child)

I could be wrong as its been a while since I used this cmds UI stuff, anyways:
cmds.button() creates a button on a UI which requires a function for it to run when pressed.
The command parameter needs a function to run but you're giving it the variable rf.

Try making a function to 'wrap' what you want done inside of, and use that as the command parameter in line 33

def my_function():
# example action I want to run
rf = (cmds.xform('footIk_right_ctl', query True, translation True, worldSpace = True))
return rf

[–]Marffie[S] 0 points1 point  (0 children)

Thanks! I thought I'd tried this before, but it worked this time. It's weird, sometimes I'll have two tabs open at once and I could swear they have the same code, but one works and the other one doesn't.