You can lookup the available types here:
http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/Nodes/index.html

In this case, you’re looking for “camera”. You can also see it in the
attribute editor, next to it’s name.

Pro tip: for fancy code-formatting via the list or gmail, like this:

import maya.cmds as cmds
selection=cmds.select(cmds.listRelatives(cmds.ls(type='transform'),
p=True, path=True), r=True)
cmds.delete()

Try Markdown Here <http://markdown-here.com/>

Best,
Marcus
​

On 1 October 2014 12:22, <[email protected]> wrote:

> Hello all,
>
> im trying to write some python to delete all annotations i have in my maya
> scene. The problem is i don't know what flag to put as 'type' so i can
> select all to delete.
>
> i did cmds.objectType and found it was a 'transform' type. but this
> keyword doesn't work as a flag. so a bit confused
>
> here is my current code:
>
> #######################################
> import maya.cmds as cmds
>
> selection=cmds.select(cmds.listRelatives(cmds.ls(type='transform'),
> p=True, path=True), r=True)
>
> cmds.delete()
> ######################################
>
> if anyone could tell me the correct flag to delete the annotations i have
> created it would be awesome,
>
> thanks,
> Sam
>
> --
> 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/c3e4b964-2c39-42cb-9a98-2c4cbbad2c8d%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

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

Reply via email to