View -> Lock Time to Other Windows does not maintain scale when CTRL+TAB between two animation editor modes. #70889

Open
opened 2019-10-17 08:17:51 +02:00 by Jer Bot · 17 comments

System Information
Operating system: Manjaro Linux
Graphics card: nVidia

Blender Version
Broken: (example: 2.80, edbf15d3c0, master, 2018-11-28, as found on the splash screen)
Worked: (optional)

Short description of error
View -> Lock Time to Other Windows does not maintain scale when CTRL+TAB between two animation editor modes.

Exact steps for others to reproduce the error
Expand open the Timeline editor, now adjust the horizontal scale of the view (squeeze or expand), then Ctrl+TAB to swith to Graph Editor mode. Notice the scale does not stay in sych as it does when they are separate windows.

**System Information** Operating system: Manjaro Linux Graphics card: nVidia **Blender Version** Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen) Worked: (optional) **Short description of error** View -> Lock Time to Other Windows does not maintain scale when CTRL+TAB between two animation editor modes. **Exact steps for others to reproduce the error** Expand open the Timeline editor, now adjust the horizontal scale of the view (squeeze or expand), then Ctrl+TAB to swith to Graph Editor mode. Notice the scale does not stay in sych as it does when they are separate windows.
Author

Added subscriber: @JerBot

Added subscriber: @JerBot

Added subscriber: @FinbarrORiordan

Added subscriber: @FinbarrORiordan
Member

Added subscribers: @dr.sybren, @lichtwerk

Added subscribers: @dr.sybren, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm the behavior.

This is on the edge of being a bug [ or a feature request / known limitation -- since that option doesnt promise to lock time to the same window, only others ;) ] however, but will confirm for now...

Quickly tried something stupid as:
P1211: T72732_snippet



diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 1637f8cfed5..22093c52752 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -145,6 +145,11 @@ static void rna_Area_type_set(PointerRNA *ptr, int value)
 
   ScrArea *sa = (ScrArea *)ptr->data;
   sa->butspacetype = value;
+
+  if (ELEM(sa->spacetype, SPACE_GRAPH, SPACE_ACTION)) {
+    ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+    UI_view2d_sync(NULL, sa, &ar->v2d, V2D_LOCK_COPY);
+  }
 }
 
 static void rna_Area_type_update(bContext *C, PointerRNA *ptr)

but needs more work (or some completely different solution)

@dr.sybren: know limitation?

Can confirm the behavior. This is on the edge of being a bug [ or a feature request / known limitation -- since that option doesnt promise to lock time to the **same** window, only **others** ;) ] however, but will confirm for now... Quickly tried something stupid as: [P1211: T72732_snippet](https://archive.blender.org/developer/P1211.txt) ``` diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 1637f8cfed5..22093c52752 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -145,6 +145,11 @@ static void rna_Area_type_set(PointerRNA *ptr, int value) ScrArea *sa = (ScrArea *)ptr->data; sa->butspacetype = value; + + if (ELEM(sa->spacetype, SPACE_GRAPH, SPACE_ACTION)) { + ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + UI_view2d_sync(NULL, sa, &ar->v2d, V2D_LOCK_COPY); + } } static void rna_Area_type_update(bContext *C, PointerRNA *ptr) ``` but needs more work (or some completely different solution) @dr.sybren: know limitation?

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Sybren A. Stüvel self-assigned this 2020-01-14 15:41:48 +01:00

Yeah, this is not a bug; it would be if the option was called "lock view range when toggling editors", but it isn't. You could argue that ctrl+tab should maintain the range of the editor, but that's just not implemented.

Yeah, this is not a bug; it would be if the option was called "lock view range when toggling editors", but it isn't. You could argue that ctrl+tab should maintain the range of the editor, but that's just not implemented.

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'

Manual says:

Lock Time to Other Windows
It synchronizes the horizontal panning and scale of the current editor with the other editors (Graph, Dope Sheet, NLA) when this option is set. That way you always have these editors showing >an identical part of the time you work on.

https://docs.blender.org/manual/en/latest/editors/timeline.html#view-menu

Manual says: >Lock Time to Other Windows >It synchronizes the horizontal panning and scale of the current editor with the other editors (Graph, Dope Sheet, NLA) when this option is set. That way you always have these editors showing >an identical part of the time you work on. https://docs.blender.org/manual/en/latest/editors/timeline.html#view-menu
Author

Thank you all for looking into this. I see this as a powerful feature that is not present in other applications.

Thank you all for looking into this. I see this as a powerful feature that is not present in other applications.
Sybren A. Stüvel removed their assignment 2020-01-17 14:36:48 +01:00
Author

Added subscribers: @richardangert1000, @mont29

Added subscribers: @richardangert1000, @mont29
Author

@dr.sybren @mont29 @richardangert1000 @lichtwerk
Finally getting to spend more time in code (python) lately. So if any related bits to this issue are exposed to python, point me in a direction and I'll look there. I have ideas for related tools, which I'm hoping I can handle in python (i.e. making graph editor / dope sheet timeline scale presets).

Thanks again for the attention to this feature. I do believe it will be a great efficiency gain, and worth having on "the list".

Hope i can help.

@dr.sybren @mont29 @richardangert1000 @lichtwerk Finally getting to spend more time in code (python) lately. So if any related bits to this issue are exposed to python, point me in a direction and I'll look there. I have ideas for related tools, which I'm hoping I can handle in python (i.e. making graph editor / dope sheet timeline scale presets). Thanks again for the attention to this feature. I do believe it will be a great efficiency gain, and worth having on "the list". Hope i can help.

I'm not too familiar with the UI code, but from @lichtwerk's patch it looks like the syncing is all done in C.

I'm not too familiar with the UI code, but from @lichtwerk's patch it looks like the syncing is all done in C.

Added subscriber: @ChrisLend

Added subscriber: @ChrisLend
Christoph Lendenfeld self-assigned this 2020-10-14 20:02:30 +02:00

I'll have a look into this.
The option has changed to Sync Visible Range now.
When you have it set in the dope sheet and the graph editor, it still doesn't sync when toggling.
This is especially confusing when you have the timeline synced as well which then jumps between the dope sheet and the graph editor range.

How it should work:
Assuming that the flag is set in both, dope sheet and graph editor,
It should stay synced when you switch editors.

I'll have a look into this. The option has changed to `Sync Visible Range` now. When you have it set in the dope sheet and the graph editor, it still doesn't sync when toggling. This is especially confusing when you have the timeline synced as well which then jumps between the dope sheet and the graph editor range. How it should work: Assuming that the flag is set in both, dope sheet and graph editor, It should stay synced when you switch editors.
Christoph Lendenfeld removed their assignment 2020-10-25 23:38:25 +01:00

This turned out to be more complicated than I thought.

Here's what I found:

  • Syncing is done by calling void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag) in view2d.c. For our purposes, area can be NULL
  • The best place to call this would be on void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) I think.

The problem is that the reinit function only has a View2D and I don't know how to get the bScreen from that.
I am not sure if it would be better to have some sort of static (or global, not quite sure how that works in C) variable that can be shared among all View2D instances

This turned out to be more complicated than I thought. Here's what I found: * Syncing is done by calling `void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)` in `view2d.c`. For our purposes, `area` can be NULL * The best place to call this would be on `void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)` I think. The problem is that the reinit function only has a `View2D` and I don't know how to get the `bScreen` from that. I am not sure if it would be better to have some sort of static (or global, not quite sure how that works in C) variable that can be shared among all `View2D` instances
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:36:37 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#70889
No description provided.