UNSOLVED Create Gradient Attribute for Nodes pragmatically.

Hello,

I have created a gradient attribute but instead of getting a proper Gradient UI that C4D uses, I am getting this one.

cd9993f4-e193-4c83-abaf-b1658689ef91-image.png

I noticed that it can be achieved by settings Replace Complex UI parameter to 200001011 but I could not find a way to set this parameter pragmatically except that from the resource editor. At first, I thought that this parameter would be on datadescription_ui.h, but it was missing from there or maybe it is located in another file.
Is there any way to set that parameter pragmatically, or any other way to show my Gradient parameters' UI as it normally should be?

Thank you.

hi,

the ID you are looking for is maxon::DESCRIPTION::UI::NET::MAXON::UI::VARIADICPORT::COMPLEXCUSTOMUI but i was not able to make it work, even if i defined the port as variadic and add the commands. So I asked the dev what i am missing.

Cheers,
Manuel

Hello,
Thanks for the reply. After setting the right ID as you said, I was able to get the UI look I was looking for, but same as you I can't make it work properly. Here is the part of the code I have used for this.

maxon::BaseArray<maxon::Id> var_commands;

var_commands.Append(maxon::Id("addvariadicport"));
var_commands.Append(maxon::Id("removevariadicport"));

node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::DATATYPE, maxon::Id("net.maxon.render.portbundle.gradient")) iferr_return;

node.Set(maxon::DATADESCRIPTION_CATEGORY_UI, maxon::DESCRIPTION::UI::BASE::GUITYPEID, maxon::Id("net.maxon.ui.variadicport")) iferr_return;

node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::ISVARIADIC, TRUE) iferr_return;

node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::VARIADICCOUNT, 2) iferr_return;

node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::VARIADICCOMMANDS, var_commands) iferr_return;

node.Set(maxon::DATADESCRIPTION_CATEGORY_UI, maxon::DESCRIPTION::UI::NET::MAXON::UI::VARIADICPORT::COMPLEXCUSTOMUI, 200001011);