Skip to content

Add Number2D QML control type#1849

Open
bmatherly wants to merge 1 commit into
masterfrom
cropofx
Open

Add Number2D QML control type#1849
bmatherly wants to merge 1 commit into
masterfrom
cropofx

Conversation

@bmatherly

Copy link
Copy Markdown
Member

This enables size/position controls for OFX addon filters

Tested with CropOFX

This shows some progress with supporting 2D types. There are still some issues when testing with CropOFX

  • The size is correctly initialized to the project resolution. But when you click on the "default" button, it goes to 1x1 because that is the default signaled by the plugin.
  • In Shotcut, you have to click "Black Outside" to see the effect. But in Natron, you do not have to - it just works
  • The format control is not hidden/disabled when the "Extent" is not "Format" - in Natron it is by way of the "secret" property
  • VUI does not work yet.

Depends on mltframework/mlt#1257

This enables size/position controls for OFX addon filters

Tested with CropOFX
" filter.set(p, (isNaN(_nx) ? 0 : _nx * profile.width) + ' ' + "
"(isNaN(_ny) ? 0 : _ny * profile.height) + ' 0 0 1');\n"
" } else if (type === 'rect' && widget === 'size') {\n"
" // OFX plugins that use kParamDoubleTypeXY (size/extent)\n"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unfortunate workaround. I have not figured out how Natron knows when to use normalized dimensions and when not to. The CropOFX filter only works if we use absolute dimensions - but it isn't signaling that?

@ddennedy

ddennedy commented Jun 11, 2026

Copy link
Copy Markdown
Member

But when you click on the "default" button, it goes to 1x1 because that is the default signaled by the plugin.

That might be normalized?

"Black Outside" to see the effect. But in Natron, you do not have to - it just works

That sounds like Natron is doing some automatic alpha visualization or implicit composing with a black background. This is not important to address now.

The format control is not hidden

low priority

VUI does not work yet

That is not surprising since it is not generated. It seems a big effort to map our rectangle control to this combination of params.

For OpenFX, I do not expect a generated UI to be as good as an authored one without months of continual improvements. I just want the experimentation to be less mysterious in the near term. I added the ability to load filter UIs from AppData so if someone running --experimental vets an add-on they can share the UI with others. They can copy the generated one and manually refine it. When it becomes refined, proven, and popular it can be added to the Shotcut source for everyone out-of-the-box and translated. So, 3 levels if you see what I mean: experimental -> shared -> official. Even for external ones like I have done for NTSC-rs and Supermassive (VST2). Eventually, there might be an extension installer and support for UIs embedded in the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants