Im trying to fire a python function using a button created with MEL. So I just wanted to know whether or not im understanding the docs correctly, so I just used a simple print call to test whether or not im correct in my assumption; this is what I tried out:
button -label "TransX" -w 100 -c python ("print 'Hello You!'");
However this won't fire at all (or if it does, it's doing something different than printing it in the script editor :/)
Even more curious to me was that if I wrapped it up in ticks like this:
button -label "TransX" -w 100 -c `python ("print 'Hello You!'")`;
it fired immediately (upon sourcing) and not while pressing the button. If anyone could explain that behaviour, that would be neat.
So what it boils down to is this: 1.How do I run a python function using mel properly? 2.Why the heck does the wrapping in ticks fire the python immediately?
Thx for your help :)