Skip to content

Cropofx#1257

Merged
ddennedy merged 3 commits into
masterfrom
cropofx
Jun 13, 2026
Merged

Cropofx#1257
ddennedy merged 3 commits into
masterfrom
cropofx

Conversation

@bmatherly

Copy link
Copy Markdown
Member

Map all 2D and 3D types to MLT rect

Testing with the size parameter for CropOFX
Comment thread src/framework/mlt_property.c

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the OpenFX module to represent OFX 2D/3D parameter types using MLT’s rect property type (and adjusts core property semantics/tests accordingly), aiming to simplify parameter handling and metadata generation.

Changes:

  • Treat mlt_prop_rect as distinct from opaque mlt_prop_data (including updating serialization and get_data() behavior) and add a unit test to lock this in.
  • Extend OpenFX parameter mapping to cover Double3D/Integer3D and represent Double2D/Integer2D as rect in generated metadata/defaults.
  • Add logic to convert normalized Double2D defaults to canonical coordinates using project extent when reading defaults.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tests/test_properties/test_properties.cpp Adds a regression test asserting rect properties are not exposed via get_data().
src/framework/mlt_property.c Adjusts rect/data type behavior for destructor handling, string serialization, and get_data() semantics.
src/modules/openfx/mlt_openfx.h Adds new OpenFX setter types for 3D parameters.
src/modules/openfx/mlt_openfx.c Maps OFX 2D/3D params to rect, sets rect defaults, and adds normalized-default handling.
src/modules/openfx/filter_openfx.c Updates runtime param propagation to select correct OFX setter based on native param type for rect.

Comment thread src/framework/mlt_property.c
Comment thread src/modules/openfx/mlt_openfx.c Outdated
There is a bug in mlt_property that interprets a rect structure
as data and tries to interpret it as nested properties when
traversing the metadata properties. This works around that.
The OFX Crop plugin uses a normalized default but does not report
it. This adds a work around to report it for that specific plugin.
@bmatherly

bmatherly commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

I think it would be safe to merge this and the Shotcut PR before the test release.

@ddennedy ddennedy added this to the v7.40.0 milestone Jun 13, 2026
@ddennedy ddennedy merged commit c2180a8 into master Jun 13, 2026
23 of 25 checks passed
@ddennedy ddennedy deleted the cropofx branch June 13, 2026 20:56
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.

3 participants