Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_290.c
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_particle_types.h" | #include "DNA_particle_types.h" | ||||
| #include "DNA_pointcloud_types.h" | #include "DNA_pointcloud_types.h" | ||||
| #include "DNA_rigidbody_types.h" | #include "DNA_rigidbody_types.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_shader_fx_types.h" | #include "DNA_shader_fx_types.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "DNA_text_types.h" | |||||
| #include "DNA_tracking_types.h" | #include "DNA_tracking_types.h" | ||||
| #include "DNA_workspace_types.h" | #include "DNA_workspace_types.h" | ||||
| #include "BKE_animsys.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_armature.h" | #include "BKE_armature.h" | ||||
| #include "BKE_attribute.h" | #include "BKE_attribute.h" | ||||
| #include "BKE_collection.h" | #include "BKE_collection.h" | ||||
| #include "BKE_colortools.h" | #include "BKE_colortools.h" | ||||
| ▲ Show 20 Lines • Show All 622 Lines • ▼ Show 20 Lines | if (!MAIN_VERSION_ATLEAST(bmain, 293, 16)) { | ||||
| FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | ||||
| if (ntree->type == NTREE_GEOMETRY) { | if (ntree->type == NTREE_GEOMETRY) { | ||||
| version_node_socket_duplicate(ntree, GEO_NODE_MESH_PRIMITIVE_GRID, "Size X", "Size Y"); | version_node_socket_duplicate(ntree, GEO_NODE_MESH_PRIMITIVE_GRID, "Size X", "Size Y"); | ||||
| } | } | ||||
| FOREACH_NODETREE_END; | FOREACH_NODETREE_END; | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 293, 19)) { | |||||
| /* Set zero user text objects to have a fake user. */ | |||||
| LISTBASE_FOREACH (Text *, text, &bmain->texts) { | |||||
| if (text->id.us == 0) { | |||||
| id_fake_user_set(&text->id); | |||||
| } | |||||
| } | |||||
| } | |||||
| /** | /** | ||||
| * 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: | ||||
| * - #blo_do_versions_290 in this file. | * - #blo_do_versions_290 in this file. | ||||
| * - "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. */ | ||||
| } | } | ||||
| } | } | ||||
| static void panels_remove_x_closed_flag_recursive(Panel *panel) | static void panels_remove_x_closed_flag_recursive(Panel *panel) | ||||
| { | { | ||||
| const bool was_closed_x = panel->flag & PNL_UNUSED_1; | const bool was_closed_x = panel->flag & PNL_UNUSED_1; | ||||
| const bool was_closed_y = panel->flag & PNL_CLOSED; /* That value was the Y closed flag. */ | const bool was_closed_y = panel->flag & PNL_CLOSED; /* That value was the Y closed flag. */ | ||||
mont29: This requires a sub-version bump, otherwise it would re-enable fake user even on texts where… | |||||
| SET_FLAG_FROM_TEST(panel->flag, was_closed_x || was_closed_y, PNL_CLOSED); | SET_FLAG_FROM_TEST(panel->flag, was_closed_x || was_closed_y, PNL_CLOSED); | ||||
| /* Clear the old PNL_CLOSEDX flag. */ | /* Clear the old PNL_CLOSEDX flag. */ | ||||
| panel->flag &= ~PNL_UNUSED_1; | panel->flag &= ~PNL_UNUSED_1; | ||||
| LISTBASE_FOREACH (Panel *, child_panel, &panel->children) { | LISTBASE_FOREACH (Panel *, child_panel, &panel->children) { | ||||
| panels_remove_x_closed_flag_recursive(child_panel); | panels_remove_x_closed_flag_recursive(child_panel); | ||||
| ▲ Show 20 Lines • Show All 973 Lines • Show Last 20 Lines | |||||
This requires a sub-version bump, otherwise it would re-enable fake user even on texts where user purposely disabled it.