NLA: Swap strips fixes #110074

Closed
Guillermo Venegas wants to merge 2 commits from guishe:improve-swap-strips into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Contributor

Fixes a bug where disallows swap strips in certain cases:

  1. If there are only 2 strips selected, but there is other strip is on the left in the same nla track
  2. If there are only 2 clusters selected, but one is on the left in the nla track
    and have 2 strips selected.

Why happens:
Currently to swap strips the code make temp meta strips, it checks if the first strip
in the nla track is a temp meta strip and if it has only 2 strips and if it does, it separates this
temp meta strip back into the strips.
This is one specific case that don't work well or all cases.

The solution:

The operator should allow to swap 2 strips or 2 temp meta strips (clusters)

To make this possible check how many temp meta strips(clusters) are selected,
if they are only 2 try to swap them.

If they are 3 temp meta strips(clusters) the swap should fail.

If they are only one temp meta strips(clusters) break it into separate
strips and check if there are only 2 strips selected to make the swap

Fixes a bug where disallows swap strips in certain cases: 1. If there are only 2 strips selected, but there is other strip is on the left in the same nla track 2. If there are only 2 clusters selected, but one is on the left in the nla track and have 2 strips selected. Why happens: Currently to `swap strips` the code make `temp meta strips`, it checks if the first strip in the `nla track` is a `temp meta strip` and if it has only `2 strips` and if it does, it separates this `temp meta strip` back into the strips. This is one specific case that don't work well or all cases. The solution: The operator should allow to swap 2 strips or 2 `temp meta strips` (clusters) To make this possible check how many `temp meta strips`(clusters) are selected, if they are only 2 try to swap them. If they are 3 `temp meta strips`(clusters) the swap should fail. If they are only one `temp meta strips`(clusters) break it into separate `strips` and check if there are only 2 `strips` selected to make the swap
Guillermo Venegas changed title from NLA: Keep bounds on strips swap to NLA: Keep bounds on strips swap and fixes 2023-07-19 06:02:48 +02:00
Author
Contributor
Bugs Patch applied
| Bugs| Patch applied| | ----------- | ----------- | | <video src="/attachments/12c598f1-13e5-4980-9c54-602ab1708a72" title="2023-07-18 22-08-45.mp4" controls></video>| <video src="/attachments/5e94c9ea-cb27-4106-8c12-f8df5ddc7413" title="2023-07-18 22-11-15.mp4" controls></video>|
Iliya Katushenock added this to the Animation & Rigging project 2023-07-19 11:47:36 +02:00
Guillermo Venegas force-pushed improve-swap-strips from f87ad6bb6e to 3bc8643076 2023-07-25 16:07:26 +02:00 Compare
Guillermo Venegas changed title from NLA: Keep bounds on strips swap and fixes to NLA: Swap strips fixes 2023-07-25 16:07:45 +02:00
Guillermo Venegas requested review from Sybren A. Stüvel 2023-07-25 16:08:41 +02:00
Member

@guishe You have both this and #109980 open for fixing #109081. Do you think one or the other is better? And can you elaborate on what the pros/cons of the two different fixes are?

@guishe You have both this and #109980 open for fixing #109081. Do you think one or the other is better? And can you elaborate on what the pros/cons of the two different fixes are?
Author
Contributor

Honestly I don't have much to say about #109980, because after using the shortcut and and see that it fail the user has to fix positions to be able to use the shortcut again.

This pr makes swap directly adjust the position of the strip that will be placed to the right if necessary, then the user can make necessary adjustments if needed. The only drawback is that the original position is not recovered after another swap, due to the necessary adjustment that was made in the first iteration (as seen in the video).

Honestly I don't have much to say about https://projects.blender.org/blender/blender/pulls/109980, because after using the shortcut and and see that it fail the user has to fix positions to be able to use the shortcut again. This pr makes swap directly adjust the position of the strip that will be placed to the right if necessary, then the user can make necessary adjustments if needed. The only drawback is that the original position is not recovered after another swap, due to the necessary adjustment that was made in the first iteration (as seen in the video). <video src="/attachments/07b91769-a041-4973-b10a-0d04fd1ec3a9" title="2023-07-31 22-13-13.mp4" controls></video>
Member

Got it. Thanks for the explanation! I'll add this to the animation & rigging module meeting agenda (this Thursday), to see which solution people prefer.

Got it. Thanks for the explanation! I'll add this to the animation & rigging module meeting agenda (this Thursday), to see which solution people prefer.
Guillermo Venegas force-pushed improve-swap-strips from 3bc8643076 to e0efc234c8 2023-08-04 20:10:39 +02:00 Compare
Guillermo Venegas added 1 commit 2023-08-04 20:12:42 +02:00
Guillermo Venegas added 1 commit 2023-08-04 20:14:03 +02:00
Author
Contributor

Separate the pr in 2 to better explain the issues separately: (see #110074 (comment))

Separate the pr in 2 to better explain the issues separately: (see https://projects.blender.org/blender/blender/pulls/110074#issue-100084)
Author
Contributor

The fix that i mention that was a alternative i will move it to another pr #109980

The fix that i mention that was a alternative i will move it to another pr #109980
Member

Thank you for your patience!

In the animation & rigging module meeting, we decided that #109980 is the most appropriate fix. I'll comment there with more details.

Thank you for your patience! In the animation & rigging module meeting, we decided that #109980 is the most appropriate fix. I'll comment there with more details.
Member

Closing in favor of #109980.

Closing in favor of #109980.
Nathan Vegdahl closed this pull request 2023-08-14 17:07:53 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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 Assignees
2 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#110074
No description provided.