hey all,
i am currently trying to write a cleanup script for MJPolyTools. Many of the modelers at our studio like this set of modeling tools, but there seems to be a problem with these scripts leaving a lot of poly operation nodes lying about. A deleteHistory simply doesn't get rid of these nodes as they appear to be downstream of the poly...
anyway, i was looking for a command that will give me a list of downstream nodes of any given node/s that works recursively (sp?) down to the end of the stream (can't think of what else to call it?!?)
all help greatly appreciated..!
grant
"listConnections" or "listRelatives" commands???
listConnections only returns direct connections (connections 1 level down), not everything down stream of the given node. It looks as tho i may have to write a recursive function using the listConnection and just pass the result back through listConnections until i have all connected nodes...that is unless someone has some bright idea of how to do this easier??
cheers,
grant
Will listRelatives not work?
I know it has an -allDescendents flag you can use, and you can specify the type you want, but does that not return the node types you are looking for I'd guess?
"Will listRelatives not work? "
No, unfortunately. Tho i see where your coming from... The listRelatives command works by returning (DAG object) member of a hierarchy. The nodes i'm chasing down are dependancy graph nodes (not DAG object) that are not part of a hierarchy but only relate to the original object throught connections...thus why listConnections works and listRelatives does not...
thanks for the follow up tho!
And what about the listHistory command?
ah yes...
when used with the -f (list future instead of history) gives most of the nodes i was after.
thanks muchly...!