Hi guys!

Maybe it's a dumm question, but how do I parse raw strings as
arguments from mel code to python procedure...

I have a string in mel script containing an expression. I need to send
this string as e.g.:
python("function(" + $string + ")");

while ...

def function(variable):

...etc

but the string needs to be raw, otherwise it gives me an error. I was
trying to store the expression variable as
$string = "'" + $string + "'";

but that only gives me an error while reading single quoted string.

Any idea?

2. Do you know where I could get simple examples of python plugin
commands? I am trying to bring some python functionality to mel (like
split method on strings) for users in our pipeline that don't know
python or for modyfing large mel scripts (rather then rewriting them
into python). The previous question was to avoid scripting plugins and
just write simple python script with various functions and calling
those.
So either the user would:
1. call python method from imported file with parsed arguments
2. load a plugin and have another mel command

--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to