Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.c
| Show First 20 Lines • Show All 1,432 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); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Something wrong here, seems like Brushes and ImagePaintSettings contain non-NULL, but | |||||
| * garbage? */ | |||||
brecht: This code should be in `do_versions_after_linking_300`, datablock pointers have not been… | |||||
| /* | |||||
| 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; | |||||
| } | |||||
| } | |||||
| */ | |||||
| } | } | ||||
| } | } | ||||
This code should be in do_versions_after_linking_300, datablock pointers have not been resolved yet in blo_do_versions_300.