Skip to content

Add property metadata system: YAML definitions, generated C++ accesso…#233

Open
garyo wants to merge 2 commits intomainfrom
props-metadata-pr
Open

Add property metadata system: YAML definitions, generated C++ accesso…#233
garyo wants to merge 2 commits intomainfrom
props-metadata-pr

Conversation

@garyo
Copy link
Contributor

@garyo garyo commented Mar 3, 2026

Add property metadata system: YAML definitions, generated C++ accessors, and docs

Introduce ofx-props.yml as the structured source of truth for all OpenFX
property definitions. Add generator scripts (gen-props.py, gen-props-doc.py)
that produce C++ metadata headers (ofxPropsMetadata.h, ofxPropsBySet.h) and
type-safe property set accessor classes (ofxPropSetAccessors.h,
ofxPropSetAccessorsHost.h) for both plugins and hosts. Also generates
structured Sphinx documentation for the properties reference.

Includes fixes to property type definitions in C headers (e.g. RoD/RoI
types in ofxImageEffect.h) and a host-specific property extension example.

garyo added 2 commits March 4, 2026 09:01
…rs, and docs

Introduce ofx-props.yml as the structured source of truth for all OpenFX
property definitions. Add generator scripts (gen-props.py, gen-props-doc.py)
that produce C++ metadata headers (ofxPropsMetadata.h, ofxPropsBySet.h) and
type-safe property set accessor classes (ofxPropSetAccessors.h,
ofxPropSetAccessorsHost.h) for both plugins and hosts. Also generates
structured Sphinx documentation for the properties reference.

Includes fixes to property type definitions in C headers (e.g. RoD/RoI
types in ofxImageEffect.h) and a host-specific property extension example.

Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
Also move property sets and actions from YAML into inline @propset,
@propsetdef, and @actiondef blocks in headers.

Consolidate property metadata (type, dimension, values, defaults, etc.)
from the separate ofx-props.yml file into @propdef YAML blocks within
each property's doxygen comment in the C headers. This keeps metadata
next to the code it describes, reducing maintenance burden.

- Add scripts/ofx_prop_utils.py: shared parser for @propdef blocks
- Migrate 182 properties across 10 headers with inline @propdef blocks
- Update gen-props.py and gen-props-doc.py to read from headers
- Delete properties section from ofx-props.yml (1348 -> 609 lines)
- Delete legacy doc generator (genPropertiesReference.py)
- Delete unused property_links Sphinx extension
- Simplify Documentation/build.sh and conf.py

This eliminates the YAML file entirely. All property metadata is now
co-located with the code it describes.

Generated C++ headers (ofxPropsMetadata.h, ofxPropsBySet.h, etc.) are
verified identical before and after migration, except for a few
additions noted during the migration, namely propset assignments and
action args for ThumbnailRender and CPURenderSupported.

The format for @propdef, @propsetdef and @actiondef sections is
documented in Documentation/README.md.

This commit also improves the generated doc sections and removes the
old out-of-date property reference.

Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
@garyo garyo force-pushed the props-metadata-pr branch from 6be0d29 to 61d1c92 Compare March 4, 2026 14:01
@garyo
Copy link
Contributor Author

garyo commented Mar 4, 2026

@john-paulsmith thanks for your push in the right direction — the YAML file is gone now, and all properties are machine-readably documented right in the header, using @propdef / @actiondef sections. There's doc in Documentation/README.md. Should be easier to maintain. The readthedocs docs should be nicer now too.

Reviewers: I think this is worth at least a scan of the whole changeset. You may see things that your host disagrees with; please call those out if you see them.

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