Has this happened to you?
I am learning MEL.
ScaleConstraint will not take any arguments. ParentConstraints are working fine.
Editor Code:
ScaleConstraint "box1" "pCylinder1";
Result:
ScaleConstraint “box1” “pCylinder1”;
doCreateScaleConstraintArgList 1 { “0”,“1”,“1”,“1”,“0”,“0”,“0”,“1”,"",“1” };
scaleConstraint -offset 1 1 1 -weight 1;
// Error: line 0: Target list was empty or contained no valid targets. //
What am I doing wrong?
I think the problem is that you’re calling ScaleConstraint when you’re meaning to call scaleConstraint. The former with the capital “S” is a run time command and those do not accept any arguments.
The whatIs command is very useful if you’re trying to work out what is being called, especially when you’re at the stage of performing actions through the GUI with “echo all commands” turned on and reading through the output to try and build your own scripts.
For example:
whatIs ScaleConstraint;
//Result: Run Time Command
whatIs scaleConstraint;
//Result: Command
whatIs autoUpdateAttrEd
// Result: Mel procedure found in: C:/Program Files/Autodesk/Maya2013/scripts/others/showEditor.mel
In short, your example should work if you change it to:
scaleConstraint "box1" "pCylinder1";
I tried that… Still wont work till I manually select the two objects…
It works fine in maya 2011 and 2013. Which version are you using? Also, what error message do you get back when using the normal command instead of that run time command?
I am running Maya 2014. I made a mistake the second time. It did work. I was typing the wrong object name… >_<’’
Thank you so much Warheart!