Skip to content

Persist DisableStretch in embedded preset/project data#51

Open
globalprojectscorp wants to merge 2 commits intogyroflow:mainfrom
globalprojectscorp:add-disable-stretch-to-preset
Open

Persist DisableStretch in embedded preset/project data#51
globalprojectscorp wants to merge 2 commits intogyroflow:mainfrom
globalprojectscorp:add-disable-stretch-to-preset

Conversation

@globalprojectscorp
Copy link
Copy Markdown

Summary

  • When "Disable Gyroflow's stretch" is checked and project data is saved (via "Embed .gyroflow data in plugin" or preset export), a plugin_disable_stretch: true flag is injected into the gyroflow JSON
  • On load, the flag is detected from EmbeddedPreset or ProjectData and DisableStretch is automatically enabled
  • No changes to gyroflow-core required — the flag is a top-level JSON field that the core ignores

Motivation

When using anamorphic lenses in DaVinci Resolve (or any NLE that handles desqueeze via Pixel Aspect Ratio), users must manually check "Disable Gyroflow's stretch" on every clip. This setting cannot currently be saved in presets because it's a plugin-level parameter that doesn't persist in the gyroflow project data.

This change lets the setting travel with embedded project data, so applying a preset to new clips automatically carries the DisableStretch state.

Changes

common/src/lib.rs:

  • Add maybe_inject_disable_stretch() helper that injects the flag into JSON when DisableStretch is enabled
  • Call it at all project data export/save points
  • On load, check EmbeddedPreset and ProjectData for the flag before applying disable_lens_stretch()
  • Make disable_stretch mutable so it can be updated from the loaded data

Test plan

  • Load a .gyroflow project with an anamorphic lens profile (input_horizontal_stretch != 1.0)
  • Check "Disable Gyroflow's stretch" and "Embed .gyroflow data in plugin"
  • Copy the effect to another clip — DisableStretch should auto-enable
  • Save and reopen the project — DisableStretch should persist
  • Without the flag in the data, behavior is unchanged (DisableStretch defaults to false)

🤖 Generated with Claude Code

When "Disable Gyroflow's stretch" is checked and project data is
saved (via "Embed .gyroflow data in plugin" or preset export),
inject a `plugin_disable_stretch` flag into the JSON. On load,
check for this flag and automatically enable DisableStretch.

This allows the setting to travel with presets and embedded project
data, eliminating the need to manually check the box on every clip
when the NLE handles anamorphic desqueeze (e.g. via Pixel Aspect
Ratio in DaVinci Resolve).
This allows the flag to be added directly to lens profile .json
files, so loading a lens profile automatically enables DisableStretch
without needing embedded project data.
globalprojectscorp added a commit to globalprojectscorp/gyroflow that referenced this pull request Apr 2, 2026
Add a checkbox under the "Lens profile" section in the preset
settings selector. When checked, writes `plugin_disable_stretch: true`
to the exported .gyroflow preset file. This flag is read by the
OFX/Adobe plugins (see gyroflow/gyroflow-plugins#51) to automatically
enable "Disable Gyroflow's stretch" when loading the preset.

Unchecked by default since it's only needed when the NLE handles
anamorphic desqueeze (e.g. via Pixel Aspect Ratio in DaVinci Resolve).
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.

1 participant