Fix #107870: Movie Clip Editor hangs in "Clip" view
Because of how the Clip Editor managed region state for different view
modes before region polls were introduced (fa0f295b53), regions could be
written to files in a state that's not valid for displaying them. State
for clip editors written to files is corrected with versioning now.
This commit is contained in:
@@ -4500,5 +4500,26 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
nmd->simulation_bake_directory = BLI_strdup(bake_dir.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
|
||||
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
|
||||
LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
|
||||
/* #107870: Movie Clip Editor hangs in "Clip" view */
|
||||
if (sl->spacetype == SPACE_CLIP) {
|
||||
const ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
|
||||
&sl->regionbase;
|
||||
ARegion *region_main = BKE_region_find_in_listbase_by_type(regionbase,
|
||||
RGN_TYPE_WINDOW);
|
||||
region_main->flag &= ~RGN_FLAG_HIDDEN;
|
||||
ARegion *region_tools = BKE_region_find_in_listbase_by_type(regionbase,
|
||||
RGN_TYPE_TOOLS);
|
||||
region_tools->alignment = RGN_ALIGN_LEFT;
|
||||
if (!(region_tools->flag & RGN_FLAG_HIDDEN_BY_USER)) {
|
||||
region_tools->flag &= ~RGN_FLAG_HIDDEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user