List/Print maya group content names

48 views
Skip to first unread message

brianbu...@gmail.com

unread,
Jun 19, 2015, 6:22:05 PM6/19/15
to python_in...@googlegroups.com
I'm in need of a method to print out the names of the geometry in a selected group node. Any ideas? Even if it is inside another group or complex group hierarchy. Example. I select a group node "Heart", print the names of the geo in this group.

-Brian

Justin Israel

unread,
Jun 19, 2015, 6:38:18 PM6/19/15
to python_in...@googlegroups.com
You could list all of the descendants of your selected object, and then filter that result by just geometry:

    cmds.ls(cmds.listRelatives(allDescendents=True), geometry=True)


On Sat, Jun 20, 2015 at 10:22 AM <brianbu...@gmail.com> wrote:
I'm in need of a method to print out the names of the geometry in a selected group node. Any ideas? Even if it is inside another group or complex group hierarchy.  Example. I select a group node "Heart", print the names of the geo in this group.

-Brian

--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f22393a4-8a51-449a-bed3-c8367a3c2a67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kurian O.S

unread,
Jun 19, 2015, 6:38:49 PM6/19/15
to python_in...@googlegroups.com
cmds.listRelatives(cmds.ls(sl=True)[0], ad=True, type="mesh") it will give you all the mesh under your selection

On Fri, Jun 19, 2015 at 2:51 PM, <brianbu...@gmail.com> wrote:
I'm in need of a method to print out the names of the geometry in a selected group node. Any ideas? Even if it is inside another group or complex group hierarchy.  Example. I select a group node "Heart", print the names of the geo in this group.

-Brian
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f22393a4-8a51-449a-bed3-c8367a3c2a67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
--:: Kurian ::--
Reply all
Reply to author
Forward
0 new messages