Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.c
| Show First 20 Lines • Show All 512 Lines • ▼ Show 20 Lines | void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) | ||||
| * - "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. */ | ||||
| do_versions_idproperty_ui_data(bmain); | do_versions_idproperty_ui_data(bmain); | ||||
| LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { | |||||
| ToolSettings *tool_settings = scene->toolsettings; | |||||
| ImagePaintSettings *imapaint = &tool_settings->imapaint; | |||||
| if (imapaint->canvas != NULL && | |||||
| ELEM(imapaint->canvas->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) { | |||||
| imapaint->canvas = NULL; | |||||
| } | |||||
| if (imapaint->stencil != NULL && | |||||
| ELEM(imapaint->stencil->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) { | |||||
| imapaint->stencil = NULL; | |||||
| } | |||||
| if (imapaint->clone != NULL && | |||||
| ELEM(imapaint->clone->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) { | |||||
| imapaint->clone = NULL; | |||||
| } | |||||
| } | |||||
| LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { | |||||
| if (brush->clone.image != NULL && ELEM(brush->clone.image->type, IMA_TYPE_R_RESULT, | |||||
| IMA_TYPE_COMPOSITE)) { brush->clone.image = NULL; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| 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 904 Lines • ▼ Show 20 Lines | */ | ||||
| /* Keep this block, even when empty. */ | /* Keep this block, even when empty. */ | ||||
| LISTBASE_FOREACH (Object *, ob, &bmain->objects) { | LISTBASE_FOREACH (Object *, ob, &bmain->objects) { | ||||
| LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { | LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { | ||||
| if (md->type == eModifierType_Nodes) { | if (md->type == eModifierType_Nodes) { | ||||
| version_geometry_nodes_add_attribute_input_settings((NodesModifierData *)md); | version_geometry_nodes_add_attribute_input_settings((NodesModifierData *)md); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { | LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { | ||||
brecht: This code should be in `do_versions_after_linking_300`, datablock pointers have not been… | |||||
| 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_PARAMS_FLAG_UNUSED_4); | ||||
| Show All 11 Lines | |||||
This code should be in do_versions_after_linking_300, datablock pointers have not been resolved yet in blo_do_versions_300.