diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index b3df809b4db..e4e6999425b 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -27,7 +27,7 @@ /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 96 +#define BLENDER_FILE_SUBVERSION 97 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and cancel loading the file, showing a warning to diff --git a/source/blender/blenloader/intern/versioning_500.cc b/source/blender/blenloader/intern/versioning_500.cc index 8c6e1fdea38..336b63c2386 100644 --- a/source/blender/blenloader/intern/versioning_500.cc +++ b/source/blender/blenloader/intern/versioning_500.cc @@ -3694,6 +3694,24 @@ void blo_do_versions_500(FileData *fd, Library * /*lib*/, Main *bmain) } } + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 500, 97)) { + /* Enable new "Optional Label" setting for all menu sockets. This was implicit before. */ + FOREACH_NODETREE_BEGIN (bmain, tree, id) { + tree->tree_interface.foreach_item([&](bNodeTreeInterfaceItem &item) { + if (item.item_type != NODE_INTERFACE_SOCKET) { + return true; + } + auto &socket = reinterpret_cast(item); + if (!STREQ(socket.socket_type, "NodeSocketMenu")) { + return true; + } + socket.flag |= NODE_INTERFACE_SOCKET_OPTIONAL_LABEL; + return true; + }); + } + FOREACH_NODETREE_END; + } + /** * Always bump subversion in BKE_blender_version.h when adding versioning * code here, and wrap it inside a MAIN_VERSION_FILE_ATLEAST check.