Fix #111593: Auto-offset when inserting nodes on links inside frames #111637
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
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111637
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "lone_noel/blender:fix-111593-node-insert-bug"
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?
Apply auto-offset animation in relative steps, to avoid issues, when
the parent space of the currently offset node changes.
Issue
The auto-offset was calculated by adding the offset to the inital node
location. Since the node location is always in "parent space", this
broke, when the node was attached to (or detached from) a frame during
the offset animation.
Previously this couldn't happen, because the
insert_offset
operatorwas only called in macros after handling the attachement to frames.
This changed with commit
cc9c720aae
, which made it so the link insertionoperatior is called from inside the node transform operator, which
runs before handling the parenting to frames.
Here's a .blend-file to reproduce the issue: 111593.blend
Just insert a node a new node on the links insde the frames.
Proposed Solution
Rather than calculating the absolute node location based on the inital
location, this PR makes it so that with each call of
node_insert_offset_modal
the node is offset a bit based on thecurrent
duration
and thedelta
(time) since the last call.This makes the animation independent of the origin of the parent space
the node is currently in.
It also means
anim_init_locx
can be removed from the node runtimesince it's not used anymore.
Alternative
A small alternative fix is to also handle
anim_init_locx
, whenattaching (and detaching) nodes (see diff below.)
This change looks a bit safer, but I didn't like how the inner workings
of the auto-offset were leaking into unrelated code, so I prefer the
solution above.
WIP: Fix #111593: Auto-offset when inserting nodes on links inside framesto Fix #111593: Auto-offset when inserting nodes on links inside framesPretty nice! Good to remove this runtime data, and storing less data tends to make things simpler in the end.
At some point maybe
runtime->anim_ofsx
could be moved to aMap<bNode *, float>
stored in the node editor runtime data too :)