Hi,
In my Premiere Pro transition plugin I want to conditionaly hide a section/topic containing other params. I've added the logic to UpdateParamUI. It works for all param types except topics.
What I'm doing is (roughly):
PF_ParamUtilsSuite3* paramUtilsSuitePtr = ...;
int paramIndex = ...;
bool show = ...;
...
PF_ParamDef copy = params[paramIndex];
if (show) {
copy.ui_flags |= PF_PUI_INVISIBLE;
}
else {
copy.ui_flags &= ~PF_PUI_INVISIBLE;
}
copy.uu.change_flags = PF_ChangeFlag_CHANGED_VALUE;
params[paramIndex] = copy; // so other parts of the code executing before we return to Premiere see the new state
paramUtilsSuitePtr->PF_UpdateParamUI(in_data->effect_ref, paramIndex, ©);
As said, for e.g. buttons or sliders this works nicely.
Now topics. When I add a topic, initially visible, and then in UpdateParamUI run the above code twice (for both the topic start and end param), I get weird results:
- I drag the transition into a project
- I click the layer to open the ECP
- Result: the topic is nicely hidden, and all other params in it and surrounding it are shown
- I then click outside the layer (so the ECP doesn't show the layer's params)
- I click the layer again to open the ECP
- The ECP blows up...
The result is that the topic above it loses it's name (it becomes a nameless twirly), the topic itself still shows but also nameless, it's params are back again but also all nameless, and it is followed by a normal copy of itself where all labels still show. Changing the params in this visible copy also updates the corresponding values of the nameless shadow copy.
Then I read in another post on this forum that you'd also need to hide the params inside the topic, and that you should leave the topic's end param as is. The latter doesn't change the situation at all, and the former only results in the embedded params to now remain hidden, but the topic itself still acts up the same (both a nameless shadow copy as well as the effect on the topic above it).
Does anyone know how to properly hide a topic in Premiere Pro? I've tested this on 2018 (12.1.2) as well as 2019 (13.1.2), but both act up.
I've also looked at an old 2012 copy of the Supervisor sample. That one shows/hides 3 regular params, but in the ID list I see the sample once also had a topic param. Was this one removed from the sample due to topics not being hidable (anymore)?