Add property metadata system: YAML definitions, generated C++ accesso…#233
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>
|
@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. |
Guido-assim
left a comment
There was a problem hiding this comment.
I see a few cases of "dimension: 0" in a propdef, I wonder if that is valid?
That means "any", or unspecified. For params, for instance, it's the number of dims in the param. For PropVersion, it's whatever the plugin wants. |
Is that different from 'N' that is mentioned in README.md, or has 'N' been replaced by '0'? |
Ah, good point -- I'll review that. |
Add property metadata system: YAML definitions, generated C++ accessors, and docs