This is by design, the select command operates on the root namespace unless
another one is specified. You can read more here:
http://download.autodesk.com/us/maya/2011help/CommandsPython/select.html
I usually get around this by just using ls, since there is a 'recursive'
flag that searches all namespaces.
So you could use this instead:
joints = cmds.ls('*_ent', r=1)
cmds.select(joints)
Hope that helps!
On Wed, Dec 19, 2018 at 6:41 PM kiteh <[email protected]> wrote:
> In my scene, there are the following joints:
>
> - testing:joint1_ent
> - testing:joint2
> - testing:joint3_ent
> - testing:joint4
> - testing:joint5
>
> So I am trying to grab the 2 joints that ends with `_ent` and I used the
> following code:
>
> If I wrote my `cmds.select` as:
> cmds.select('*_ent')
> cmds.select('*_ent*')
> It does not works and returns me `# ValueError: No object matches name:
> *_ent #` or `# ValueError: No object matches name: *_ent* #
>
> However, if I wrote it as `cmds.select('*:*_ent')`, only will these 2
> joints be selected.
>
> Additionally, I also tried to select by using the namespace..
> # Does not works
> cmds.select('testing*') # ValueError: No object matches name: testing* #
> #Works if I added in the colon
> cmds.select('testing:*')
>
> If someone could kindly advise me, is this by design? I asked, because
> say, using the abive same 5 joints (but without the namespace), if I do a
> `cmds.select('joint*')`, it will returns me all the 5 joints. And hence my
> confusion here...
>
>
>
> --
> 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/e97fef96-c074-498e-a02d-13f7979c3be5%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/e97fef96-c074-498e-a02d-13f7979c3be5%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/CAM-feifg7HG8qgUmOYTez8H2-%3Dyr-ediwfD3BAyvB%2Bus3Hnxnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.