Commit 759c396
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")
The three irregularly-named value clusters (Field, PreMultiplication,
NativeOrigin) get a header comment noting the name/value mismatch is
ABI-locked and must not be copied as an example. (ColourManagementStyle
is conventionally named; only its @propdef had a typo.)
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 759c396
6 files changed
Lines changed: 251 additions & 72 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 | |
|---|---|---|---|
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
900 | | - | |
901 | | - | |
902 | | - | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
903 | 908 | | |
904 | 909 | | |
905 | 910 | | |
| |||
912 | 917 | | |
913 | 918 | | |
914 | 919 | | |
915 | | - | |
916 | | - | |
917 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
918 | 923 | | |
919 | 924 | | |
920 | 925 | | |
| |||
1178 | 1183 | | |
1179 | 1184 | | |
1180 | 1185 | | |
1181 | | - | |
1182 | | - | |
| 1186 | + | |
| 1187 | + | |
1183 | 1188 | | |
1184 | 1189 | | |
1185 | 1190 | | |
1186 | 1191 | | |
1187 | 1192 | | |
1188 | 1193 | | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
1189 | 1198 | | |
1190 | 1199 | | |
1191 | 1200 | | |
| |||
1491 | 1500 | | |
1492 | 1501 | | |
1493 | 1502 | | |
1494 | | - | |
1495 | | - | |
1496 | | - | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1497 | 1506 | | |
1498 | 1507 | | |
1499 | 1508 | | |
| |||
1575 | 1584 | | |
1576 | 1585 | | |
1577 | 1586 | | |
1578 | | - | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
1582 | 1591 | | |
1583 | 1592 | | |
1584 | 1593 | | |
| |||
1607 | 1616 | | |
1608 | 1617 | | |
1609 | 1618 | | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
1616 | 1625 | | |
1617 | 1626 | | |
1618 | 1627 | | |
| |||
1627 | 1636 | | |
1628 | 1637 | | |
1629 | 1638 | | |
1630 | | - | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1634 | 1643 | | |
1635 | 1644 | | |
1636 | 1645 | | |
| |||
1672 | 1681 | | |
1673 | 1682 | | |
1674 | 1683 | | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1675 | 1688 | | |
1676 | 1689 | | |
1677 | 1690 | | |
| |||
0 commit comments