Message 1 of 3
'For' loop .....Problem???????

Not applicable
06-14-2010
07:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have a little bit problem with for loops
Im having 5joints spine IK chain.
when I run following code it give error
// Error: Illegal operation "+" on data of type string[].
my simple code is
/////////////////////////////////////////////////////////////////////////
string $ikHandle []=`ls -sl`;
string $ikBone []=`ikHandle -q -jl $ikHandle`;
string $mdScale =`shadingNode -asUtility multiplyDivide`;
for ($eachBone in $ikBone)
{
connectAttr -force ($mdScale + ".outputX") ($ikBone + ".scaleX")
}
///////////////////////////////////////////////////////////////////////////
I just want to connect outputX of multiplyDivide node to each bone in a loop
But Maya gives me this error!!
Can anybody please solve my problem?
Im having 5joints spine IK chain.
when I run following code it give error
// Error: Illegal operation "+" on data of type string[].
my simple code is
/////////////////////////////////////////////////////////////////////////
string $ikHandle []=`ls -sl`;
string $ikBone []=`ikHandle -q -jl $ikHandle`;
string $mdScale =`shadingNode -asUtility multiplyDivide`;
for ($eachBone in $ikBone)
{
connectAttr -force ($mdScale + ".outputX") ($ikBone + ".scaleX")
}
///////////////////////////////////////////////////////////////////////////
I just want to connect outputX of multiplyDivide node to each bone in a loop
But Maya gives me this error!!
Can anybody please solve my problem?