Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 29-11-2017 , 04:39 PM
Registered User
Join Date: Nov 2017
Posts: 1

Variable to implement number in object name?

Hi everyone!

I have this simple task, where I want to offset the values on multiple animation curves on différent objects.
Objects names are: MPath01_uValue, MPath02_uValue, etc....

I use a for loop, so I would like to apply the offset on the MPath01_uValue in the first loop, then apply the offset on the MPath02_uValue, etc...

Can we make the 01, 02... in the names variable???
Don't know how, I'm still new to programming...
I tried to make an int $OffAnim = 1; place the variable in the name like: MPath0($OffAnim)_uValue which of course doesn't work at all!

any help please?

here's my script:

float $uvMin = 0;
float $uvMax = 1;
for( $OffAnim=1; $OffAnim<26; ++$OffAnim )
{
selectKey -add -k -f 0 MPath($OffAnim)_uValue ;
keyframe -animation keys -absolute -valueChange $uvMin ;
selectKey -add -k -f 1 MPath($OffAnim)_uValue ;
keyframe -animation keys -absolute -valueChange $uvMax ;
$uvMin = $uvMin + 0.04;
$uvMax = $uvMax + 0.04;
}

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads