سؤال

How do you print an integer into a string in Maya MEL scripting?

هل كانت مفيدة؟

المحلول

It turns out you can just use + to concatenate string and integer objects in Maya Embedded Language.

For example:

int $i ;
string $s ;

    for( $i = 0; $i < 5; $i++ ) {
        $s = "ooh" + $i ;
        print $s ;
    }

There is also the format command

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top