Get all registered DAG node types

python
maya

#1

Hi everyone, I know the command to get every node types:

import maya.cmds as cmds

cmds.ls(nodeTypes=True)

But I was wondering how I could filter this list to only get DAG node types.

Thanks in advance,

Narann


#2

Have a look at the other flags for ls, especially allPaths, assemblies, and dagObjects.


#3

Thanks for the reply, but what I’m looking for is node types (not nodes) that can be set as children of a DAG node.

For example, node with animCurveTA type can’t be set as child of any transform nodes, but nodes with mesh types can. So I’m looking for a way to filter all node types to keep only those.


#4

Try this:
cmds.nodeType('dagNode', derived=True, isTypeName=True)

Also, if you want to test an individual node, you can do the following:
cmds.objectType(nodeName, isa='dagNode')


#5

This is perfect! :slight_smile:
Thanks a lot mate!