PDA

View Full Version : Pipe Variables from Python to MEL


GiantG
03-28-2009, 10:47 PM
Hi.

I wanna use this MEL Code inside Python:
$name = "myName";
createAnnotation $name;

I Pyhton i try this:
name = "myName"
mel.eval("createAnnotation name;")


but "name" is inside MEL a String and inside Python a Variable.
So Python names the Annotation "name" instead of "myName"

Any idea?

thxs
Guido

cbamber85
03-29-2009, 08:45 AM
name = "hello"
mel.eval("createAnnotation " + name + ";")
I like the old C based formatting, but there are many ways of doing the above.

GiantG
03-29-2009, 08:50 AM
omg! i just overlook this simple way. was too late last night...

thxs...

CGTalk Moderation
03-29-2009, 08:50 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.