Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2021-09-16 13:40:22 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-09-29 10:12:47 +0300
commit008ae26712f85475a8a9dc4d031447e12fb05522 (patch)
treedd4e5215c73acb26932e1f51197bae0c5b0ef22b /source/blender/makesrna/intern/rna_space.c
parenteddc3f5bc8473a4914476dc3ff3ee9091bb42b9a (diff)
Fix T91237: Wrong Editors could sync animation 'Visible Range'
This was reported for the Outliner. It was possible to set 'show_locked_time' on any space (via python, not sure if there are other ways to achieve this). Navigating in an animation editor obviously ruined the layout in certain Editors that are not made for this. Now restrict syncing to editors that support it well (the ones that have this setting exposed in their menus) and prevent setting this in RNA. Maniphest Tasks: T91237 Differential Revision: https://developer.blender.org/D12512
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 88ef1597e4c..b5b9ac6ee56 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -856,6 +856,14 @@ static void rna_Space_view2d_sync_set(PointerRNA *ptr, bool value)
ARegion *region;
area = rna_area_from_space(ptr); /* can be NULL */
+ if ((area != NULL) && !UI_view2d_area_supports_sync(area)) {
+ BKE_reportf(NULL,
+ RPT_ERROR,
+ "'show_locked_time' is not supported for the '%s' editor",
+ area->type->name);
+ return;
+ }
+
region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
if (region) {
View2D *v2d = &region->v2d;