The node graph I'm creating has other graph instances which represent custom built materials.
I need to expose the parameters from each of these instances, to the parent graph.
To do this, I'm iterating through all the parameters of the instanced graph and creating dynamic parameters:
dyn_val = aNode.setDynamicParameters
Now on the dynamic value, I need to create a function:
dyn_val.createFunctionNode(aFunction)
So far so good, except aFunction requires a FunctionEnum value.
To build this value, I'm attempting to extract the existing type name on the parameter, which will then be concatenated for use with FunctionEnum to retrieve the value:
param_type = aParam.getType()
# 16
The problem is that it returns the ParamTypeEnum value rather than the name (INTEGER1, in this case), and there doesn't appear to be a way to get the name.
This process would work fine if you're creating parameters while creating graph instances and explicitly define the types, but it falls apart when attempting to expose existing parameters.
I feel like I'm missing something here.
Is this the correct way of exposing parameters from instances?
Is there reverse mapping for enums?