cmds.ls('l_loleg',recursive=True) will work in a variety of scenarios. Without
having a grasp on the context or what your scripts are attempting to do, this
seems the most appropriate.
-JP
Sent from my iPhone
On Jun 10, 2012, at 12:15 PM, anim8err <[email protected]> wrote:
> seeks, thanks for your reply, but I was wondering how I should update my
> scripts to handle references.
>
> Let me ask the question another way, lets say I have a script that uses
> cmds.ls("l_loleg") to get the l_lowleg object of the character but the
> character is referenced in twice. Should I use
>
> nspace = 'char01:'
> cmds.ls(nspace+"l_loleg")
>
> or
> cmds.ls('*:l_loleg')
>
> or
> cmds.ls('l_loleg',recursive=True)
>
> or
> cmds.namespace(set='char01')
> cmds.namespace(relative=True)
> cmds.ls('l_loleg')
> cmds.namespace(relative=False)
>
> All of these should work, so I am just wondering what the best way to modify
> all my scripts.
>
> an8r
>
> On Monday, June 4, 2012 11:00:25 PM UTC-7, anim8err wrote:
> I have several existing mel and python scripts that I need to change to deal
> with references. Is there a way to deal with them like setting a namespace or
> should I just do string manipulation?
>
> Thanks.
>
> an8r
> --
> 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