Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.c
| Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_animsys.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_armature.h" | #include "BKE_armature.h" | ||||
| #include "BKE_asset.h" | #include "BKE_asset.h" | ||||
| #include "BKE_collection.h" | #include "BKE_collection.h" | ||||
| #include "BKE_deform.h" | #include "BKE_deform.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_fcurve.h" | ||||
| #include "BKE_fcurve_driver.h" | #include "BKE_fcurve_driver.h" | ||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BKE_image.h" | |||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| #include "BKE_lib_override.h" | #include "BKE_lib_override.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| ▲ Show 20 Lines • Show All 743 Lines • ▼ Show 20 Lines | /* Keep this block, even when empty. */ | ||||
| '_', | '_', | ||||
| offsetof(DriverVar, name), | offsetof(DriverVar, name), | ||||
| sizeof(dvar->name)); | sizeof(dvar->name)); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| FOREACH_MAIN_ID_END; | FOREACH_MAIN_ID_END; | ||||
| } | } | ||||
| /* Ensure tiled image sources contain a UDIM token. */ | |||||
| LISTBASE_FOREACH (Image *, ima, &bmain->images) { | |||||
| if (ima->source == IMA_SRC_TILED) { | |||||
| BKE_image_ensure_tile_token(ima->filepath); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| static void version_switch_node_input_prefix(Main *bmain) | static void version_switch_node_input_prefix(Main *bmain) | ||||
| { | { | ||||
| FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | ||||
| if (ntree->type == NTREE_GEOMETRY) { | if (ntree->type == NTREE_GEOMETRY) { | ||||
| LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | ||||
| ▲ Show 20 Lines • Show All 1,229 Lines • ▼ Show 20 Lines | if (!MAIN_VERSION_ATLEAST(bmain, 300, 26)) { | ||||
| LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { | LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { | ||||
| LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | ||||
| LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { | LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { | ||||
| switch (sl->spacetype) { | switch (sl->spacetype) { | ||||
| case SPACE_FILE: { | case SPACE_FILE: { | ||||
| SpaceFile *sfile = (SpaceFile *)sl; | SpaceFile *sfile = (SpaceFile *)sl; | ||||
| if (sfile->params) { | if (sfile->params) { | ||||
| sfile->params->flag &= ~(FILE_PARAMS_FLAG_UNUSED_1 | FILE_PARAMS_FLAG_UNUSED_2 | | sfile->params->flag &= ~(FILE_PARAMS_FLAG_UNUSED_1 | FILE_PARAMS_FLAG_UNUSED_2 | | ||||
| FILE_PARAMS_FLAG_UNUSED_3 | FILE_PARAMS_FLAG_UNUSED_4); | FILE_PARAMS_FLAG_UNUSED_3 | FILE_PATH_TOKENS_ALLOW); | ||||
| } | } | ||||
| /* New default import type: Append with reuse. */ | /* New default import type: Append with reuse. */ | ||||
| if (sfile->asset_params) { | if (sfile->asset_params) { | ||||
| sfile->asset_params->import_type = FILE_ASSET_IMPORT_APPEND_REUSE; | sfile->asset_params->import_type = FILE_ASSET_IMPORT_APPEND_REUSE; | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 422 Lines • ▼ Show 20 Lines | FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | ||||
| data->data_type = CD_PROP_FLOAT; | data->data_type = CD_PROP_FLOAT; | ||||
| data->interpolation_type = node->custom2; | data->interpolation_type = node->custom2; | ||||
| node->storage = data; | node->storage = data; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| FOREACH_NODETREE_END; | FOREACH_NODETREE_END; | ||||
| /* Update spreadsheet data set region type. */ | |||||
| LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { | |||||
| LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | |||||
| LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { | |||||
| if (sl->spacetype == SPACE_SPREADSHEET) { | |||||
| ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : | |||||
| &sl->regionbase; | |||||
| LISTBASE_FOREACH (ARegion *, region, regionbase) { | |||||
| if (region->regiontype == RGN_TYPE_CHANNELS) { | |||||
| region->regiontype = RGN_TYPE_TOOLS; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | |||||
| No newline at end of file | |||||