if the item is unique in the namespace you can refer to it by its short
name:

import maya.cmds as mc
mc.select("ref_RN1:left_eye_geo",r=True)

you only need the long name if it's not unique.

select it in the scene and look in your script editor. that should give you
an idea.
if it has a "|" pipe in the name, then it's not unique. if there is no pipe
in the name it's unique.





On Sun, Mar 15, 2015 at 10:20 PM, Panupat Chongstitwattana <
[email protected]> wrote:

> If I store my object names without namespace and then reference them into
> a new scene.
>
> For example if this is the string I stored.
> rig_grp|geo_grp|head_grp|left_eye_geo
>
> And I know for certain my namespace would be "ref_RN1"
>
> Currently I would manipulate the stored string so it turns into
> ref_RN1:rig_grp|ref_RN1:geo_grp|ref_RN1:head_grp|ref_RN1:left_eye_geo
> But I'm curious if there's a cleaner or more proper way to do this?
>
> Tried use namespace(set=':ref_extra_RN1') but that doesn't seem to do
> anything
>
> Best regard.
>
> --
> 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/bb64548b-111e-483e-a609-e4d3015a8b15%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/bb64548b-111e-483e-a609-e4d3015a8b15%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CABPXW4hj3sWVSJ_ABXdvHiuDgPa5eYC2OugrLs_gmK0o2nJP5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to