Fix #118509: Grease Pencil frames no longer disappearing while being transformed in the timeline #119337
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119337
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "amelief/blender:gpv3-fix-disappearing-frames"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While selecting and transforming multiple grease pencil frames in the timeline, frames would sometimes disappear.
This happened when the transformation overlapped, meaning when a frame replaced another moving one in the timeline.
The frames transformation was happening in place and in series, and thus leaded to the initial position
of the frame to be removed, even if it was occupied by a freshly transformed framed.
This commit fixes the issue by storing two separate maps in the transform data structure instead of one,
one map to store the static data, meaning the frames that are not affected by the transform,
and another one for the moving data, meaning the frames that are affected by the transform.
Some changes were made to account for the potential duplication of the frames (move + duplicate) :
and the duplicate is stored in the moving frames map,
init step of the transform, instead of the update step, so that the maps are initialized accordingly.
Fix #118509 : Grease Pencil frames not longer disappearing while being transformed in the timelineto Fix #118509: Grease Pencil frames not longer disappearing while being transformed in the timelineFix #118509: Grease Pencil frames not longer disappearing while being transformed in the timelineto Fix #118509: Grease Pencil frames no longer disappearing while being transformed in the timelineThanks! Code looks ok to me. Also gave this a quick test and it works well 👍
I managed to make it crash, looks like the issue with invalidated
drawing_index
is still around.Steps:
While talking with @LukasTonne about this we agree that it might be better to switch out the runtime
Map
representation for one that just uses twoArray
s (an array for the sorted keys and one for the values/frames). That would likely make it possible to deal with duplicate keys on the same frame gracefully. I'll look at this again when I have more time to come up with a design.@amelief I'll continue working on this, hope you don't mind!
Thank you @LukasTonne , I don't mind at all.
Ok, so it turned out there are actually two independent issues here, one them fixed by this PR and the other by #120433:
remove_drawings_with_no_users
function was broken when removing more than one drawing (e.g. when scaling down a range of keyframes). This is what causes the invalid drawing indices and is fixed by #120433.Thanks for working on this! It should be fine as is. I will update the branch with current main, do a test run and finish it.
@blender-bot build