I am implementing a custom C++ Xpresso node, where the majority of the parameters/ports are to be generated dynamically via GetDDescription().
The dynamically added elements correctly show up in the attribute manager, but my problem is that they do not show up as ports that can be added to the node in the Xpresso editor.
A minimal example of the GetDDescription() that exhibits this problem looks like this:
Bool NodeTest::GetDDescription(GeListNode * node, Description * description, DESCFLAGS_DESC & flags) {
if (!description->LoadDescription(node->GetType()))
return false;
flags |= DESCFLAGS_DESC::LOADED;
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG);
bc.SetInt32(DESC_ANIMATE, DESC_ANIMATE_ON);
String param_name = String("Dynamic int");
bc.SetString(DESC_NAME, param_name);
bc.SetString(DESC_SHORT_NAME, param_name);
bc.SetBool(DESC_INPORT, true);
bc.SetBool(DESC_EDITPORT, true);
description->SetParameter(DescLevel(1000, DTYPE_LONG, 0), bc, DescLevel(ID_GVPORTS));
return GvOperatorData::GetDDescription(node, description, flags);
}
Here, the "NodeTest" class is derived from GvOperatorData. When I implement a similar version of GetDDescription() for other plugin types, e.g., a BaseShader, the dynamically added element correctly show up both in the active object manager and as Xpresso ports. Also, if I add non-dynamic elements to the "NodeTest" class via a description resource, everything works correctly. It is just for elements added dynamically to the GvOperatorData-derived plugin that I am experiencing this issue.
Any suggestions? Are there any special steps I need to take to make the elements appear as Xpresso ports?
Best regards
/Filip