Represents and provides the methods for a node's in port. 
The InPort is a port at the top of a node that accepts incoming connections from another node's OutPort. These are used in order to define a node-graph path between nodes and is the basis of rigging within the application.
 
 Identify all In Ports on a Node 
from ToonBoom import harmony                                 
sess = harmony.session()                                     
proj = sess.project                                          
scene = proj.scene                                           
peg = scene.nodes["Top/Peg"]                                 
ports_in = peg.ports_in                                      
for idx,port in enumerate(ports_in):
  connection = "NONE"                                        
  if port.source_node:                                       
    connection = port.source_node.path
  print( "Port %s : %s"%(idx, connection) )
 
Connect Some Nodes 
from ToonBoom import harmony                                 
sess = harmony.session()                                     
proj = sess.project                                          
scene = proj.scene                                           
top = scene.top                                              
proj.history.begin( "Test Node Connection" )
peg  = top.nodes.create( "PEG", "PEG001" )
read = top.nodes.create( "READ", "DRAWING001" )
read.ports_in[0].source = peg.ports_out[0]                   
proj.history.end()
|  | 
| bool | linked | 
|  | True if the port is a dynamic port. 
 | 
|  | 
| bool | matte_port | 
|  | Identifies if the port is a matte port. 
 | 
|  | 
| OMC::Cable * | cable | 
|  | Provide the cable connected to a port. 
 | 
|  | 
| OMC::Cable * | cable_flat | 
|  | Provide the flattened, read-only cable connected to a port. Ignoring all mutli-port modules and groups. 
 | 
|  | 
| OMC::Port * | source | 
|  | Get and set the source port that is connected to this port. 
 | 
|  | 
| OMC::Node * | source_node | 
|  | Get and set the source node that is connected to this port. 
 | 
|  | 
| OMC::Port * | source_flat | 
|  | Get the flat source port that is connected to this port. 
 | 
|  | 
| OMC::Node * | source_node_flat | 
|  | Get the flat source node that is connected to this port. 
 | 
|  | 
| uint | id | 
|  | The internal ID of the port. 
 | 
|  | 
| QString | type | 
|  | The type of the port. 
 | 
|  | 
| uint | index | 
|  | The index of the port on the node. 
 | 
|  | 
| OMC::Obj | node | 
|  | The node that owns this port. 
 | 
|  | 
| OMC::Obj | node_related | 
|  | The node that this port leads to for multiport nodes and groups - the owner node for most node-types, but the the multi-port node for a group, or vice versa. 
 | 
|  | 
| bool | inport | 
|  | Whether the port is an inport. 
 | 
|  | 
| bool | outport | 
|  | Whether the port is an outport. 
 | 
|  | 
| OMC::Obj | port_related | 
|  | The port that this port relates to – itself for most node-types, but the corresponding port on the multi-port node for groups, or vice versa. 
 | 
|  |