Why are you using tm=1?  You just wanted templated nodes?  I don't
understand what you're trying to accomplish.

Are you trying to add an attribute to a node so you can quickly retrieve it
later?

nodes = MC.ls("*.myAttribute", o=1) or []

This is a pretty common strategy for retrieving nodes you've 'tagged' for
some purpose.


On Tue, Oct 23, 2012 at 3:13 PM, Berg Jones <[email protected]> wrote:

> To clarify, this is the approach i took, but it doesnt seem to work with
> selecting an object.
>
>
> import maya.cmds as cmds
> import maya.mel as mel
>
> getName = cmds.ls(sl=0, tm=1) #####nothing selected, returns a lot of
> values
> print getName
>
> [........u'uber_surface1', u'delightGeoAttribs1', u'uber_surface2',
> u'delightGeoAttribs2']
>
> but
>
> getName = cmds.ls(sl=1, tm=1) #####obj selected, doesnt return
> print getName
>
> []
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>



-- 
John Patrick
404-242-2675
[email protected]
http://www.canyourigit.com

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to