Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.c
| Show First 20 Lines • Show All 1,418 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (IDOverrideLibraryPropertyOperation *, opop, &op->operations) { | ||||
| opop->subitem_reference_name = opop->subitem_local_name; | opop->subitem_reference_name = opop->subitem_local_name; | ||||
| opop->subitem_local_name = NULL; | opop->subitem_local_name = NULL; | ||||
| opop->subitem_reference_index = opop->subitem_local_index; | opop->subitem_reference_index = opop->subitem_local_index; | ||||
| opop->subitem_local_index++; | opop->subitem_local_index++; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void version_node_tree_socket_naming_attribute_defualt(bNodeTree *ntree) | |||||
| { | |||||
| LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | |||||
| if (ELEM(node->type, | |||||
| GEO_NODE_CAPTURE_ATTRIBUTE, | |||||
| GEO_NODE_TRANSFER_ATTRIBUTE, | |||||
| GEO_NODE_SWITCH, | |||||
| GEO_NODE_RAYCAST)) { | |||||
| version_node_socket_naming_attribute_defualt_input(node->inputs.first, node->type); | |||||
| version_node_socket_naming_attribute_defualt_output(node->outputs.first, node->type); | |||||
| } | |||||
| } | |||||
| } | |||||
| static void versioning_replace_legacy_combined_and_separate_color_nodes(bNodeTree *ntree) | static void versioning_replace_legacy_combined_and_separate_color_nodes(bNodeTree *ntree) | ||||
| { | { | ||||
| /* In geometry nodes, replace shader combine/separate color nodes with function nodes */ | /* In geometry nodes, replace shader combine/separate color nodes with function nodes */ | ||||
| if (ntree->type == NTREE_GEOMETRY) { | if (ntree->type == NTREE_GEOMETRY) { | ||||
| version_node_input_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "R", "Red"); | version_node_input_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "R", "Red"); | ||||
| version_node_input_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "G", "Green"); | version_node_input_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "G", "Green"); | ||||
| version_node_input_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "B", "Blue"); | version_node_input_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "B", "Blue"); | ||||
| version_node_output_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "Image", "Color"); | version_node_output_socket_name(ntree, SH_NODE_COMBRGB_LEGACY, "Image", "Color"); | ||||
| ▲ Show 20 Lines • Show All 1,817 Lines • ▼ Show 20 Lines | for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | ||||
| RGN_TYPE_CHANNELS); | RGN_TYPE_CHANNELS); | ||||
| if (channels_region) { | if (channels_region) { | ||||
| BLI_freelinkN(regionbase, channels_region); | BLI_freelinkN(regionbase, channels_region); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_OLDER(bmain, 303, 5)) { | |||||
| /* For D15387 - attribute math in geometry nodes socket naming. */ | |||||
| FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | |||||
| if (ntree->type != NTREE_CUSTOM) { | |||||
| version_node_tree_socket_naming_attribute_defualt(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. | ||||
| Show All 13 Lines | |||||