From 8fecc2a8525467ee2fbbaae16ddbbc10b3050d46 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 27 Sep 2021 11:30:52 +0200 Subject: Increase VSE strip channels limit from 32 to 128 The original limit dates back from 2002 when Blender went open source. After that many years some productions (e.g., Sprite Fright) are already experiencing limitations for complex edits. The future plans is to support an initial shorter (2?) number of channels with support to "unlimited" channels. Finally, I'm bumping the minimum file requirement since files with more than 32 channels won't work well in old Blender versions. In a future commit I will implement a sanitization so that we only read (and write) 128 channels. Making sure future changes of this number won't corrupt Blender. Differential Revision: https://developer.blender.org/D12645 --- source/blender/blenloader/intern/versioning_300.c | 56 +++++++++++++---------- 1 file changed, 31 insertions(+), 25 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 692c114d206..aceba82a657 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -505,20 +505,7 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - #blo_do_versions_300 in this file. - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ - do_versions_idproperty_ui_data(bmain); - + if (!MAIN_VERSION_ATLEAST(bmain, 300, 26)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *tool_settings = scene->toolsettings; ImagePaintSettings *imapaint = &tool_settings->imapaint; @@ -535,6 +522,7 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) 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)) { @@ -542,6 +530,21 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - #blo_do_versions_300 in this file. + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + do_versions_idproperty_ui_data(bmain); + } } static void version_switch_node_input_prefix(Main *bmain) @@ -1453,17 +1456,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ + if (!MAIN_VERSION_ATLEAST(bmain, 300, 26)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Nodes) { @@ -1515,4 +1508,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } } \ No newline at end of file -- cgit v1.2.3