Website Youtube GitHub

mGear Framework Forum

Mel through Synoptic

Hi all,

I was wondering if it is possible to execute mel commands through Synoptic buttons. Are there certain settings for this in qt Designer?

Thanks in advance!

Are you able to run Python in your Synoptic buttons? You can wrap MEL commands in maya.mel.eval

import maya.mel as mel
mel.eval('ls -sl;')

FINAL EDIT: Just saw it is included in the latest podcast on the new features, including the animPicker and custom buttons, consider it solved!

Thanks Chris,

Sorry for the late reply! I don’t know how to run Python through synoptic buttons. I tried adding a custom property in Qt Designer, but did not get it to work, I am just too unfamiliar with it as of now.

If it is easy to explain, I would really appreciate an explanation!

EDIT: To add to that, I was wondering if it may be possible to do it in the new animPicker instead. (of course we would not be using the new vierport menu) (edit of edit, saw we already upgraded to 3.4!)

1 Like

Hey @chrislesage ,
What you mentioned works perfectly, thanks again!

Although I’ve come across some interesting behaviour: every time I open the anim picker or minimize it (not maximize though) it runs the custom script, the buttons still works once the anim picker is open, but ofc this is not ideal.

Am I missing something, like an option or a line I need to add to the script?

Hi Thomas. I know nothing about the synoptic tools. I was only replying to your original question because it sounded like you were asking how to run MEL specifically.

You are mentioning “a custom property”, “the script”, and “the custom script”. If you share the code, and specifically where you added it, someone else may be able to help.

Thanks for the quick reply, awesome! Alright I’ll see if I can make some screenshots and summarize it in a new topic