Fix #116477: Node group sockets with subtypes have broken idnames #117133

Merged
Lukas Tönne merged 7 commits from LukasTonne/blender:fix-node-socket-subtype-idnames into main 2024-01-16 15:32:43 +01:00

7 Commits

Author SHA1 Message Date
Lukas Tönne 754ee17adb Merge branch 'main' into fix-node-socket-subtype-idnames 2024-01-16 15:31:17 +01:00
Lukas Tönne 2d8b75a7e3 Fix bl_node_group_compat test.
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
This test was incorrectly assuming that the interface `socket_idname`
matches the socket `idname`, but it generally should not include the
subtype any more.
2024-01-16 10:54:32 +01:00
Lukas Tönne 56bfc71f02 Add "legacy" in forward compatibility function name.
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
2024-01-16 09:33:19 +01:00
Lukas Tönne 5956fc2b33 Forward compatibility code for node group socket subtypes.
This augments the `idname` for legacy interface sockets with the subtype
as expected by pre-4.0 node trees.
2024-01-15 17:59:44 +01:00
Lukas Tönne 5795072d54 Remove unnecessary .data 2024-01-15 16:13:53 +01:00
Lukas Tönne 576bead716 Fix comment formatting. 2024-01-15 16:11:21 +01:00
Lukas Tönne da1cc3130a Fix #116477: Node group sockets with subtypes have broken idnames.
Loading pre-4.0.20 node groups with sockets using subtypes causes
broken socket identifiers. This is because the node tree interface now
expects sockets to use the base identifiers ("NodeSocketFloat" instead
of "NodeSocketFloatFactor" etc.).

To correct this the conversion code now replaces socket idnames that
include a subtype suffix with their base names. This fix is also applied
to files between versions 4.0.20 and 4.1.10, where the socket types
may have been converted incorrectly.
2024-01-15 16:05:21 +01:00