you want the ICENodePort class...

http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/ICENodePort.html,topicNumber=si_om_ICENodePort_html

example code...

from siutils import si
si = si() # win32com.client.Dispatch('XSI.Application')
from siutils import log # LogMessage
from siutils import disp # win32com.client.Dispatch
from siutils import C # win32com.client.constants

for op in si.Selection(0).ActivePrimitive.ConstructionHistory:
    if op.Type == "ICETree":
        ICETree = op
        lastPort = list(ICETree.InputPorts)[-1]
        if lastPort.IsConnected:
            si.AddPortToICENode( lastPort,
"siNodePortDataInsertionLocationAfter" )
            lastPort = list(ICETree.InputPorts)[-1]
        log(lastPort.Name)


On Tue, Jun 18, 2013 at 11:10 AM, James Vecore <[email protected]>wrote:

> 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****
>
> ** **
>

Reply via email to