I left out a snippet of code in my command, so Haggi was right, my bad...
In my code I was trying to parse in a string in my command arg for
runTimeCommand such as:
picker.control("mySel")
so in respect to mel I was trying to use the escape characters for the
double quotes
-c "picker.control(\"mySel\")"
Needless to say that didn't work either, but I took Justin's advice rewrote
the command as
mel.eval('''runTimeCommand -ann "Herrow" -cat "User" -cl "python" -c "from
tools.anim import picker;reload(picker);picker('mySel')" customCmd;''')
Realising that mel probably doesnt see the single quotes and python does.
So for now, that works
Cool thanks guys
-Jeremy
On Thursday, 12 June 2014 17:06:27 UTC+10, Jeremy YeoKhoo wrote:
>
> Hey guys, I am having string literal issues with my following piece of
> code.
>
> mel.eval('runTimeCommand -annotation "Herrow" -category "User"
> -commandLanguage "python" -command ("from tools.anim import
> picker\nreload(picker)") customCmd;')
>
> I am having escaping with the parentheses, I think. Could someone throw me
> a line please :)
>
> Thanks
> -Jeremy
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/09feb904-5bbd-4845-8202-3b739ca9e457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.