Hrm...then that presents a problem because the command is supposed to call
a definition that takes in that value. How could I achieve that if I had to
take away the quotes? Am i reading your example wrong? It's 3 single quotes
yes? I tried different combinations to no avail.
Thanks so much for continuing to reply though, it's a great help
This is the code I'm still using.
python("import ZebraRig\nZebraRig.doLeftSwitch('''+$refname+''')");
I''ve see the eval command being used in parasing a mel string into a
python command but I'm still figuring out how i could do it.
Thank you
On Sunday, October 14, 2012 7:13:41 AM UTC-7, Justin Israel wrote:
> The + $refName + should be outside of all quotes so that it is a mel
> operation of adding strings. You probably left it inside of quotes and are
> letting python see that literally for evaluation.
>
> On Oct 14, 2012, at 12:40 AM, Bay <[email protected] <javascript:>>
> wrote:
>
> Thank you so much for the reply. It looks like the syntax error i've
> been getting is indeed the python's script inability to read a mel variable
> but the problem with your solution is now it take +$refrname+ literally,
> rather than the value in it but at least now I'm able to isolate the
> problem and know what I did wrong. Thanks alot !
>
>
> On Saturday, October 13, 2012 9:02:56 PM UTC-7, Justin Israel wrote:
>
>> You could just concatenate the strings to make is a literal string:
>>
>> python("import ZebraRig\nZebraRig.doLeftSwitch('" + $refname + "')");
>>
>> Note the single quotes to wrap around the literal value of $refname
>>
>>
>>
>> On Oct 13, 2012, at 8:13 PM, Bay <[email protected]> wrote:
>>
>> > python("import ZebraRig\nZebraRig.doLeftSwitch($refname)");
>>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe