Get All Nodes inside an Xpresso Tag?
-
Hi,
Is there a way to get all nodes inside the xpresso tag?
I tried checking the documentation and the forum and I don't get any relevant hits.It's for the workaround on this thread (https://developers.maxon.net/forum/topic/12246/how-do-i-return-the-connected-port-from-the-input-port/1)
Regards,
Ben -
Ah my bad. It's just the same for objects in object manager.
Here is the code for reference:import c4d def GetAllNodes(gvNode=None, nodeList=None): if nodeList is None: nodeList = list() gvNode = nodemaster.GetRoot() while gvNode: nodeList.append(gvNode) GetAllNodes(gvNode.GetDown(), nodeList) gvNode = gvNode.GetNext() if len(nodeList) > 1: nodeList = nodeList[1:] # Remove the Xgroup return nodeList geo_obj = doc.SearchObject("Cube") exp_tag = geo_obj.GetTag(1001149) #Get Expresso nodemaster = exp_tag.GetNodeMaster() node_list = GetAllNodes()
-
Hi yes, GvNode are BaseList2D and GeListNode, like material, object, tags.
There is the same discussion going on, so you may find it interesting Issue collecting all the shaders in a material.Cheers,
Maxime.