Getting values and fcurves for the port parameters of an ICE node


ICE nodes have ports, and the ports have parameters. It’s the parameters that you work with in an ICE node PPG.

For simple types such as float, integer and boolean, you can access the port parameter value through ICENodeInputPort.Value. However, for more complex types, like a 3D vector, you need to go through the ICENodeInputPort.Parameters.

In either case (simple or complex types), to get an Fcurve, you get a parameter and then use Parameter.Source.

For example, suppose you have a Scalar node:
ports_params_Scalar
To get the value from a Scalar node, you’d do this:

si = Application
node = si.Dictionary.GetObject( "pointcloud.pointcloud.ICETree.ScalarNode" )
port = node.InputPorts(0)

# For scalars, you can just use the port.Value property
print port.Value

# Or you could go through the Parameters
print port.Parameters(0).Value
# 0.428628623486
# 0.428628623486

# It's a little confusing because the port and the parameter have the same name:
print port.FullName
print port.Parameters(0).FullName
# pointcloud.pointcloud.ICETree.ScalarNode.value
# pointcloud.pointcloud.ICETree.ScalarNode.value


# Now get the Fcurve
fcv = param.Source

Now consider the case of a 3D Vector node, where you have one port (value) and three parameters (value_x, value_y, and value_z):
ports_params_3DVector
In this case, you cannot use ICENodeInputPort.Value, so you have to go through the parameters collection:

si = Application
node = si.Dictionary.GetObject( "pointcloud.pointcloud.ICETree.3DVectorNode" )
port = node.InputPorts(0)
print port.FullName # pointcloud.pointcloud.ICETree.3DVectorNode.value
param = port.Parameters( 0 )
print param.FullName # pointcloud.pointcloud.ICETree.3DVectorNode.value_x
print param.Value # 0.933080613613

# Now get the Fcurve
fcv = param.Source

hat tip: Alan Fregtman

Firewall, ports, and licensing


Autodesk licensing uses the ports 2080 and 27000-27009, so check that your firewall does not block these ports. Check the firewalls both on the workstations and on the license server.

If 2080 is blocked, you’ll see this error in the FLEXLM_DIAGNOSTICS output:

FLEXnet Licensing error:-15,570. System Error: 10035 “WinSock: Operation would block”

Changing the vendor port number from 2080


A network license (.lic) file includes this line

VENDOR adskflex port=2080

which suggests [to me] that you can change the port number.

So I changed the port number in the .lic, saved the file, and restarted the license server.
But adskflex still used 2080:

8:33:58 (lmgrd) License file(s): C:\Program Files\Autodesk Network License Manager\SFTIMA2010.lic
8:33:58 (lmgrd) lmgrd tcp-port 27000
8:33:58 (lmgrd) Starting vendor daemons ... 
8:33:58 (lmgrd) Starting vendor daemon at port 2080
8:33:58 (lmgrd) Using vendor daemon port 2080 specified in license file

That last log entry “Using vendor daemon port 2080 specified in license file” makes it look like I didn’t save my changes, but I know I did. My license file says 2082, not 2080.

After a little research, I found this KB article, which explains that the port 2080 is officially registered to Autodesk through the IANA, and you should “reassign the port in the conflicting application, or unblock the port”.

If for some reason you must use a different port, delete the “port=2080” from your license file. The adskflex vendor daemon will automatically find an available TPC/IP port.