Add property metadata system: YAML definitions, generated C++ accesso…#233
Open
Add property metadata system: YAML definitions, generated C++ accesso…#233
Conversation
…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>
Contributor
Author
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add property metadata system: YAML definitions, generated C++ accessors, and docs