Thank you all, I chanced upon a method and compiled the following code:

def node_type_iteration(path_lists):
    for path in set(path_lists):
        current_object = cmds.listRelatives(path, parent = True, fullPath = 
True ) or []
        while current_object:
            # Set the condition here...
            if cmds.nodeType(current_object[0]) == "customType":
                return current_object[0]
            else:
                current_object = cmds.listRelatives( current_object, parent 
= True, fullPath = True )
        return None


-- 
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/22cd722a-e097-4366-9791-f4afa7ab491a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to