I’m looking for a way to inspect the connections between ice nodes from Python. I’m trying to write a tool that will generate and update an ice graph on demand based on some parameters. I need to be able to inspect an existing ice graph and most importantly the connections between nodes in the ICE graph. I can’t seem to find how to do this in the docs. All I see related to node connections is ConnectICENode. Ideally I would like something like this AreICENodesConnected(outputPort, inputPort) or a way to enumerate connections but I don’t see anything available.
Am I missing something or is this just not possible from the Scripting API?
Thanks,
-James
James Vecore | Pluto | A Creative Content Place | hellopluto.com | 248.723.3333 | 586.295.9473 mobile
Thanks for the reply Steve.
I should have been more specific in my question. IsConnect does tell if the port is connected and I had picked that up from the docs, but I don’t see a way to traverse backwards to the icenode that is feeding an input node. For example, lets say I have a GetData node (Node A) and a custom ICECompound (Node B). Node A is connected to an known input port in Node B. So if I have a reference to Node B and the input port I’m interested in, how could find out that Node A is what is connected to that port? If you take the inputPort.Value you will get None if the value is a complex type (and the docs say these are not supported). The docs reference using ICENodePort.Parameters for types that are not supported by ICENodeInputPort.Value. However, inputPort.Parameters.Count == 0 and enumerating over it gives:
# WARNING : 3407 - Values cannot be accessed on connected ports: <Port: input_null>
I also searched all the commands with “ICE” in them and didn’t see anything that makes sense for my scenario.
Any Ideas?
-James
Ah perfect, Thanks!
Not sure how I missed that one. I was digging through commands and must have overlooked those Properties.
Thank you,