C++ DAT menu parameter selection not properly represented with cookEveryFrame

When creating a Custom DAT Operator in C++ and adding a menu parameter, as such:

void CustomDAT::setupParameters(OP_ParameterManager* manager, void* reserved)
{
	{
		OP_StringParameter	sp;
		sp.name = "Shape";
		sp.label = "Shape";
		sp.defaultValue = "Sine";
		const char* names[] = { "Sine", "Square", "Ramp" };
		const char* labels[] = { "Sine", "Square", "Ramp" };
		OP_ParAppendResult res = manager->appendMenu(sp, 3, names, labels);
		assert(res == OP_ParAppendResult::Success);
	}
}

And also requiring the DAT to cook every frame, as such:

void CustomDAT::getGeneralInfo(DAT_GeneralInfo* ginfo, const OP_Inputs* inputs, void* reserved)
{
	ginfo->cookEveryFrame = true;
}

There is some weird behaviour in the selection of the active menu item in TD. The menu parameter technically does work and returns the correct value with:

inputs->getParString("Shape")

But the active selection is not properly represented in the UI. It does show as selected in the dropdown, but not in the selection box:

image

I’m not sure if the behaviour is the same with other operator types, but for the DAT it’s fixed when not requiring to cook every frame.

Please find a sample project below:
DAT.zip (17.8 KB)

Hey @navFooh

There are currently a couple of known issues with parameter menus and cooking, they are logged and being looked at.

I logged your issue for a developer to look into it, but chances are it is related.

Thanks for the sample.

Best,
Michel

Hi @JetXS,

My pleasure, thanks for investigating!

Best,
Thijs

This will be fixed in the next Official. It is a display bug only, so shouldn’t affect cooking. Clicking to a different node and clicking back will fix the display. Thank you for the report.

Hi @selina,

Thanks for the fix.

Kind regards,
Thijs