Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.cc
| Show First 20 Lines • Show All 1,936 Lines • ▼ Show 20 Lines | if (format->view_settings.curve_mapping) { | ||||
| if (format->view_settings.curve_mapping->cm[0].curve == nullptr) { | if (format->view_settings.curve_mapping->cm[0].curve == nullptr) { | ||||
| BKE_curvemapping_free(format->view_settings.curve_mapping); | BKE_curvemapping_free(format->view_settings.curve_mapping); | ||||
| format->view_settings.curve_mapping = nullptr; | format->view_settings.curve_mapping = nullptr; | ||||
| format->view_settings.flag &= ~COLORMANAGE_VIEW_USE_CURVES; | format->view_settings.flag &= ~COLORMANAGE_VIEW_USE_CURVES; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void version_node_socket_change_attribute_type_name_identifier(bNodeTree *ntree) | |||||
| { | |||||
| LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | |||||
| if (ELEM(node->type, GEO_NODE_CAPTURE_ATTRIBUTE, GEO_NODE_SWITCH, GEO_NODE_RAYCAST)) { | |||||
| version_node_socket_attribute_type_name_inout( | |||||
| (bNodeSocket *)node->inputs.first, node->type, true); | |||||
| version_node_socket_attribute_type_name_inout( | |||||
| (bNodeSocket *)node->outputs.first, node->type, false); | |||||
| } | |||||
| } | |||||
| } | |||||
| /* NOLINTNEXTLINE: readability-function-size */ | /* NOLINTNEXTLINE: readability-function-size */ | ||||
| void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) | void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) | ||||
| { | { | ||||
| /* The #SCE_SNAP_SEQ flag has been removed in favor of the #SCE_SNAP which can be used for each | /* The #SCE_SNAP_SEQ flag has been removed in favor of the #SCE_SNAP which can be used for each | ||||
| * snap_flag member individually. */ | * snap_flag member individually. */ | ||||
| enum { SCE_SNAP_SEQ = (1 << 7) }; | enum { SCE_SNAP_SEQ = (1 << 7) }; | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 300, 1)) { | if (!MAIN_VERSION_ATLEAST(bmain, 300, 1)) { | ||||
| ▲ Show 20 Lines • Show All 1,665 Lines • ▼ Show 20 Lines | if (!MAIN_VERSION_ATLEAST(bmain, 304, 3)) { | ||||
| LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { | LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { | ||||
| if (ntree->type != NTREE_GEOMETRY) { | if (ntree->type != NTREE_GEOMETRY) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| version_node_id(ntree, GEO_NODE_OFFSET_POINT_IN_CURVE, "GeometryNodeOffsetPointInCurve"); | version_node_id(ntree, GEO_NODE_OFFSET_POINT_IN_CURVE, "GeometryNodeOffsetPointInCurve"); | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_OLDER(bmain, 304, 3)) { | |||||
| /* Use default attribute type names identifiers in sockets. */ | |||||
| FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | |||||
| if (ntree->type != NTREE_CUSTOM) { | |||||
| version_node_socket_change_attribute_type_name_identifier(ntree); | |||||
| } | |||||
| } | |||||
| FOREACH_NODETREE_END; | |||||
| } | |||||
| /** | /** | ||||
| * Versioning code until next subversion bump goes here. | * Versioning code until next subversion bump goes here. | ||||
| * | * | ||||
| * \note Be sure to check when bumping the version: | * \note Be sure to check when bumping the version: | ||||
| * - "versioning_userdef.c", #blo_do_versions_userdef | * - "versioning_userdef.c", #blo_do_versions_userdef | ||||
| * - "versioning_userdef.c", #do_versions_theme | * - "versioning_userdef.c", #do_versions_theme | ||||
| * | * | ||||
| * \note Keep this message at the bottom of the function. | * \note Keep this message at the bottom of the function. | ||||
| */ | */ | ||||
| { | { | ||||
| /* Keep this block, even when empty. */ | /* Keep this block, even when empty. */ | ||||
| } | } | ||||
| } | } | ||||