Cleanup: LineArt: Bump version when doing thickness versioning

Version should always be bumped when doing changes to DNA, not combined
with other changes in the latest version.

The versioning code was introduced in 6f57268e9a .

Pull Request: https://projects.blender.org/blender/blender/pulls/144472
This commit is contained in:
YimingWu
2025-08-13 06:39:59 +02:00
committed by YimingWu
parent 34dea22b3f
commit 16820b7dc6
2 changed files with 15 additions and 13 deletions

View File

@@ -27,7 +27,7 @@
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 57
#define BLENDER_FILE_SUBVERSION 58
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and cancel loading the file, showing a warning to

View File

@@ -2256,6 +2256,20 @@ void blo_do_versions_500(FileData * /*fd*/, Library * /*lib*/, Main *bmain)
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 500, 54)) {
FOREACH_NODETREE_BEGIN (bmain, node_tree, id) {
if (node_tree->type != NTREE_COMPOSIT) {
continue;
}
LISTBASE_FOREACH (bNode *, node, &node_tree->nodes) {
if (node->type_legacy == CMP_NODE_OUTPUT_FILE) {
do_version_file_output_node(*node);
}
}
FOREACH_NODETREE_END;
}
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 500, 58)) {
LISTBASE_FOREACH (Object *, object, &bmain->objects) {
LISTBASE_FOREACH (ModifierData *, modifier, &object->modifiers) {
if (modifier->type != eModifierType_GreasePencilLineart) {
@@ -2270,18 +2284,6 @@ void blo_do_versions_500(FileData * /*fd*/, Library * /*lib*/, Main *bmain)
bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR;
}
}
FOREACH_NODETREE_BEGIN (bmain, node_tree, id) {
if (node_tree->type != NTREE_COMPOSIT) {
continue;
}
LISTBASE_FOREACH (bNode *, node, &node_tree->nodes) {
if (node->type_legacy == CMP_NODE_OUTPUT_FILE) {
do_version_file_output_node(*node);
}
}
FOREACH_NODETREE_END;
}
}
/**