PDA

View Full Version : Using #1 to parse self-values in control -changeCommand


JakobWelner
03-10-2008, 12:13 AM
As tried to explain in the title, this thread is about a -for me previously unknown- functionality in some MEL GUI controls, that lets you parse the controls new value directly to it's own changeCommand using the "#1" keyword.

Example:
window;
columnLayout;
intField myField;
intField -cc "intField -e -v #1 myField";
showWindow;
This code gives you two intFields where the second one controls the firsts value, but instead of parsing the controls path in the -cc, query it's value and then edit the first control - as I have been doing for a while now (tedious and a waste of code) - , it uses a reserved keyword which the Maya manual speaks nothing of?

This is a feature I have been lusting for for a pretty long time so It was a pleasant surprise to suddenly find it but am I the only one who have never heard of it before and does anyone know why it is that there's nothing of it in the official manual or where I can read more about it?
Furthermore could it be that there is even more hidden functionality and how so do I get to know it?

CGTalk Moderation
03-10-2008, 12:13 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.