Commit bc47102
Fix incorrect @propdef enum value names and guard against regressions (#247)
Several enum properties listed @propdef `values:` that did not match the
actual string literals their value #defines expand to, so the generated
openfx-cpp metadata advertised valid-value strings no host or plugin ever
uses. The macro string values are ABI and are left untouched; only the
metadata is corrected to match them:
- Field props (FieldOrder, PropField, FieldExtraction, FieldToRender):
OfxImageField* -> OfxField* (kOfxImageFieldNone == "OfxFieldNone")
- PreMultiplication: OfxImage{,Un}PreMultiplied
-> OfxImageAlpha{,Un}Premultiplied
- HostPropNativeOrigin: add the leading "k" the string literals actually
have (kOfxHostNativeOriginBottomLeft == "kOfxImageEffectHostProp...")
- ColourManagementStyle: drop the erroneous "Prop"
(kOfxImageEffectColourManagementNone == "OfxImageEffectColourManagementNone")
Guard: gen-props.py now emits a static_assert for every enum value
(value string == its #define), mirroring the existing per-property
asserts, and aborts generation if an `Ofx`-prefixed value names no
macro. A reintroduced typo therefore fails the generator and, failing
that, fails to compile. Verified by reintroducing a bad value.
Also removed dead `nonProperties` entries in gen-props.py that excluded
misspelled (extra-"Prop") ColourManagement value macros which never
existed; the real value macros contain no "Prop" and were never
collected as properties. Output is byte-identical.
Regenerated openfx-cpp metadata and the property reference docs. The
docs regen also picks up kOfxImageEffectPluginPropObsolete, whose
generated docs were stale on main.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>1 parent 9943cdf commit bc47102
6 files changed
Lines changed: 235 additions & 69 deletions
File tree
- Documentation/sources/Reference
- include
- openfx-cpp/include/openfx
- scripts
Lines changed: 38 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
115 | 126 | | |
116 | 127 | | |
117 | 128 | | |
| |||
957 | 968 | | |
958 | 969 | | |
959 | 970 | | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
966 | 977 | | |
967 | 978 | | |
968 | 979 | | |
| |||
975 | 986 | | |
976 | 987 | | |
977 | 988 | | |
978 | | - | |
979 | | - | |
980 | | - | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
981 | 992 | | |
982 | 993 | | |
983 | 994 | | |
| |||
1023 | 1034 | | |
1024 | 1035 | | |
1025 | 1036 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1029 | 1040 | | |
1030 | 1041 | | |
1031 | 1042 | | |
| |||
1068 | 1079 | | |
1069 | 1080 | | |
1070 | 1081 | | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1076 | 1087 | | |
1077 | 1088 | | |
1078 | 1089 | | |
| |||
1147 | 1158 | | |
1148 | 1159 | | |
1149 | 1160 | | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
1153 | | - | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
1154 | 1165 | | |
1155 | 1166 | | |
1156 | 1167 | | |
| |||
1255 | 1266 | | |
1256 | 1267 | | |
1257 | 1268 | | |
1258 | | - | |
1259 | | - | |
| 1269 | + | |
| 1270 | + | |
1260 | 1271 | | |
1261 | 1272 | | |
1262 | 1273 | | |
| |||
1334 | 1345 | | |
1335 | 1346 | | |
1336 | 1347 | | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1341 | 1352 | | |
1342 | 1353 | | |
1343 | 1354 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
916 | | - | |
917 | | - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
| |||
1178 | 1178 | | |
1179 | 1179 | | |
1180 | 1180 | | |
1181 | | - | |
1182 | | - | |
| 1181 | + | |
| 1182 | + | |
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
| |||
1491 | 1491 | | |
1492 | 1492 | | |
1493 | 1493 | | |
1494 | | - | |
1495 | | - | |
1496 | | - | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
| |||
1575 | 1575 | | |
1576 | 1576 | | |
1577 | 1577 | | |
1578 | | - | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
1582 | 1582 | | |
1583 | 1583 | | |
1584 | 1584 | | |
| |||
1607 | 1607 | | |
1608 | 1608 | | |
1609 | 1609 | | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
1616 | 1616 | | |
1617 | 1617 | | |
1618 | 1618 | | |
| |||
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | | - | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1634 | 1634 | | |
1635 | 1635 | | |
1636 | 1636 | | |
| |||
0 commit comments