thanks a lot for the advice !
Le dimanche 23 avril 2017 21:27:19 UTC+2, Andres Weber a écrit :
>
> Is PL_ also supposed to be a string? Seems like you just missed your
> quotation marks at the beginning and post string that surround the
> arguments. Also...I'd recommend not hard baking these sorts of things in,
> but passing as an argument...
>
> Aka:
>
> lookThroughModelPanel ("PL_" + $SceneName + "_CAM:Cam_Rig:camera_Model")
> "modelPanel4";
>
> Have a look at this guy's post about this and a good tip in the future is to
> google the function name since there's tons of posts online about these these
> days:
> http://nathananozie.blogspot.com/2012/08/python-and-mel-side-by-side.html
>
> You should also look at a refresher of variables/string concatenation just so
> you can learn a little bit more about how to use them in MEL:
> https://accad.osu.edu/~aprice/courses/694/variables.html
>
>
> On Sunday, April 23, 2017 at 8:42:17 AM UTC-4, gnn wrote:
>>
>> Hello,
>>
>> I'm trying to replace by a string variable a part of a mel command...and
>> use this inside of a python script...
>>
>> thank a lot for helping me
>>
>>
>>
>> string $SceneName = "100";
>> lookThroughModelPanel PL_" + $SceneName + "_CAM:Cam_Rig:camera_Model
>> modelPanel4;
>>
>>
--
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/0a3a7341-9eed-4869-aa52-668a35c4c484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.