Frage

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

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top