View Full Version : select all nurb curves that have the label "abc*"
MegaManZZ 11-05-2010, 07:05 PM Is there a way to select all the nurbs curves in the scene that have the label "abc*" .
* being a wildcard.
|
|
RedNine
11-05-2010, 07:32 PM
Not straight out of Maya no. You can do searching in the outliner but not on nodeTypes. Take a look on my blog, theres a link to the Red9StudioPack of tools that has a powerful search tool in it for just this type of thing. Allows you to search on multiple filters at the same time, basically its an intersection search so:
NodeType + NodeName + NodeAttr = found nodes
Red
ginodauri
11-05-2010, 09:08 PM
import maya.cmds as mc
import fnmatch
curves=mc.ls(type="nurbsCurve")
filterCurves=fnmatch.filter(curves,"abc*")
[mc.select(i,add=1) for i in filterCurves]
MegaManZZ
11-05-2010, 10:17 PM
python looks liek it's the way to go
NaughtyNathan
11-05-2010, 11:53 PM
you are all insane.
select `ls -type "nurbsCurve" "abc*"`; // MEL
cmds.select(cmds.ls('abc*',type='nurbsCurve')) # python:nathaN
ginodauri
11-06-2010, 12:22 AM
Excellent :)
I know that this is possible in pymel , they mentioned this in documentation.
I thought it was added functionality for maya ls command.
mduvekot
11-06-2010, 12:51 AM
You can do this in the Outliner. Go to Show > Objects > NURBS Objects and then limit the listing by entering *abc* in the Outliner's text filter.
ewerybody
11-08-2010, 03:49 PM
you are all insane.lol:beer:
But he is probably looking for something like:select (listRelatives("-parent",listRelatives("-shapes","-type","nurbsCurve",`ls -tr "abc*"`)))means:
transforms of ( nurbsCurve shapes of ( transf named abc* ) )
pycode:mc.select(mc.listRelatives(mc.listRelatives(mc.ls('abc*',tr=1),shapes=1, type='nurbsCurve'),parent=1))
CGTalk Moderation
11-08-2010, 03:49 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.