Skip to content

Fix property metadata (found by a not-yet-public metadata-driven host and plugin) - #279

Open
garyo wants to merge 6 commits into
mainfrom
fix/property-metadata
Open

garyo wants to merge 6 commits into
mainfrom
fix/property-metadata

Conversation

@garyo

@garyo garyo commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Summary

A test host and a plugin that generate their property accessors from the @propdef, @propset and @actiondef metadata found a few places where the metadata disagrees with the spec.

  • Two incomplete property-set listings (this supersedes Complete two property-set listings in the metadata #275):
    • kOfxParamPropDefaultCoordinateSystem applies to any spatial double parameter, but was listed only under the ParamsNormalizedSpatial grouping, so the generated ParamsDouble1D and ParamsDouble2D3D accessors had no setter for it.
    • kOfxImageEffectInstancePropSequentialRender is set by the plugin in describe, but was listed only on the host and instance sets. It's now on EffectDescriptor too.
  • kOfxImageEffectInstancePropSequentialRender is an int, not a bool. The specification gives it three values, 2 being "best to render sequentially, but will still produce correct results if not".
  • kOfxParamPropHasHostOverlayHandle is written by the host, not plugin. "If set to 1, then the host is flagging that there is some sort of native user overlay interface handle available for the given parameter."
  • The plugin writes an interact's slaved parameters and its instance data.
    • kOfxInteractPropSlaveToParam holds the parameters whose change should redraw the interact ("setting index 0, then index 1 etc..."), and the host only reads it. It is now write=plugin.
    • kOfxPropInstanceData is "a private data pointer that the plug-in can store its own data behind"; the plugin sets it and reads it back. It is now write=all on InteractInstance and on EffectInstance, which listed it as host-written in the same way.
  • Optional action arguments.
    • gen-props now properly parses the | option syntax of a set entry in one place (parse_prop_entry in ofx_prop_utils.py) for action arguments as well as property sets. It also rejects an option it doesn't recognise, and Documentation/README.md now describes the options, including the optional shorthand for host_optional=true.
    • The in-args that exist only when the host supports a feature, as the specification says, are now marked | optional, so the generated getters read them "softly" (OK to fail). That covers kOfxImageEffectPropThumbnailRender (documented as optional on all eight actions that list it), kOfxImageEffectPropRenderQualityDraft, kOfxImageEffectPropNoSpatialAwareness, kOfxImageEffectPropBehaviourWhenUnlicensed, and the GPU render arguments of Render and the sequence-render actions: the CUDA, Metal, OpenCL and OpenGL enabled flags with their streams, queues, images and textures, and the five render-supported flags the metadata lists there.

Assisted-by: Claude Code / Claude Opus 5.5

garyo and others added 6 commits September 24, 2026 11:34
kOfxParamPropDefaultCoordinateSystem describes the coordinate system of
a spatial double parameter's default, but the @propset blocks listed it
only under the ParamsNormalizedSpatial grouping, so the generated
accessor classes for the double parameter sets had no setter for it and
a plugin defining a spatial Double2D had to write the property by name.
It is now listed on ParamsDouble1D and ParamsDouble2D3D as well.

kOfxImageEffectInstancePropSequentialRender is documented as set by the
plugin ("for a plugin, indicates that it needs to be sequentially
rendered") and the Support library sets it in Describe, but the metadata
listed it only on the host and instance sets. It is now on the effect
descriptor too.

Regenerated headers and property reference included.

Assisted-by: Claude Code / Claude Fable 5.1
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
Its @propdef said bool, but the specification gives it three values, 2
being "best to render sequentially, but will still produce correct
results if not". Through the generated accessors a 2 read back as true
and was written as 1. The generated headers and property reference are
regenerated.

Assisted-by: Claude Code / Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
The parameter sets listed it as the plugin's to write, but the host sets
it: "If set to 1, then the host is flagging that there is some sort of
native user overlay interface handle available for the given parameter."
So the generated plugin accessors had a setter and no getter for it, and
the host accessors the reverse. The generated headers and property
reference are regenerated.

Assisted-by: Claude Code / Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
The InteractInstance set listed kOfxInteractPropSlaveToParam and
kOfxPropInstanceData as host-written, though the plugin sets both:

- kOfxInteractPropSlaveToParam holds the parameters whose change should
  redraw the interact, and "the interact can be slaved to multiple
  parameters (setting index 0, then index 1 etc...)". The host only reads
  it, so it is now `write=plugin`.
- kOfxPropInstanceData is "a private data pointer that the plug-in can
  store its own data behind". The plugin sets it and reads it back, so it
  is now `write=all`; with `write=plugin` the generated plugin accessor
  would lose its getter.

The EffectInstance set listed kOfxPropInstanceData as host-written in the
same way, so it is `write=all` there too. The generated headers and
property reference are regenerated.

Assisted-by: Claude Code / Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
A property-set entry may carry options after a `|`, and `optional` marks a
property the set may lack, so its generated accessors read and write it
softly. Action arguments went through that parser only on the way to the
accessor classes: the metadata checks, the action_props table in
ofxPropsBySet.h and the reference documentation all took the entry as a
bare property name, so an optional argument would have been reported as
unknown and published under a name no host could look up.

The entry syntax is now parsed in one place, parse_prop_entry in
ofx_prop_utils.py, which both scripts use for sets and for action
arguments alike. It also rejects an option, or a value of one, that it
does not recognise, such as `write=hots`. The generated headers and
reference documentation are unchanged; Documentation/README.md now
describes the modifiers, the `optional` shorthand among them, and that
action arguments take them too.

Assisted-by: Claude Code / Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
Several in-args of the render and change actions exist only when the host
supports a feature, and the specification says so of each. Marking them
`| optional` makes the generated getters read them softly by default, so a
plugin asking a host that lacks the feature gets an empty value rather
than an exception:

- kOfxImageEffectPropThumbnailRender, which every action that lists it
  documents as "(optional)": GetRegionOfDefinition, GetRegionsOfInterest,
  GetFramesNeeded, IsIdentity, Render, BeginSequenceRender,
  InstanceChanged and BeginInstanceChanged.
- kOfxImageEffectPropRenderQualityDraft ("if a host does not support that
  property a value of 0 is assumed").
- kOfxImageEffectPropNoSpatialAwareness, which the host sets only for a
  plugin that declared it can render without spatial awareness.
- kOfxImageEffectPropBehaviourWhenUnlicensed ("not set, indicating the
  host has not implemented this functionality").
- The GPU render arguments of Render, BeginSequenceRender and
  EndSequenceRender: the CUDA, Metal, OpenCL and OpenGL enabled flags,
  which the host "MAY set" once both sides support the API; the CUDA
  stream ("only set if the host and plug-in both support CUDA streams"),
  the Metal and OpenCL command queues, the OpenCL image and the OpenGL
  texture index and target that go with them; and the five
  render-supported flags the metadata lists there, which the
  specification describes only on the host and the descriptor.

Assisted-by: Claude Code / Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
@garyo
garyo marked this pull request as ready for review September 24, 2026 16:10
@garyo

garyo commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@umajho you may be interested in these fixes as well.

This branch has not been deployed

No deployments
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