Fix #113552: NLA Markers do not reset when length reaches 0.0 #110121
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110121
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mano-wii/blender:fix_110108"
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?
Caused by
bd00324c26
.bd00324c26
allowedstrip->start
to have the same value asstrip->end
(ignoring theNLASTRIP_MIN_LEN_THRESH
).So
oLen
can be0.0f
inBKE_nlameta_flush_transforms
and createnan
when used in division.This
nan
invalidates later transform operations.I'm not sure if 0-length strips should be allowed. So maybe the fix should be extended to other places.
The change seems to have been made by Thibault de Villèle (thibaulltt) as we can see at https://archive.blender.org/developer/D14658, but he doesn't seem to be available anymore.
@ -1067,2 +1066,2 @@
p1 = (strip->start - oStart) / oLen;
p2 = (strip->end - oStart) / oLen;
if (oLen) {
/* compute positions of endpoints relative to old extents of strip */
Sentence should start with a capitol letter, and end with a period.
Will need to update with
main
, nla.c -> nla.cc9815d5b4c2
to42b192c227
Rebased on main.
While this fix fixes the transform bug (and possibly others), it is only a change for safeness.
Maybe it's good to check if it's really allowed to have a strip smaller than
NLASTRIP_MIN_LEN_THRESH
.It doesnt look like this fixes the underlying issue of #110108 (which seems to be burried in the design if I look at
createTransNlaData
-- here we always transform both the start and end of the strip, if we then apply snapping, this can end up obscurely snapping either start and end to the same spot or in the case of Snap to Seconds gets even more funny)Thanks for the PR! Issue #110108 has been fixed by
bd305c8d18
, so I'll close this one.Unfortunately the problem has not been fixed.
If you scale a strip and this scale reaches zero at some point, the cancellation is not restored.
The regression in issue #110108 is due to the fact that the transformation is not reset due to generated Nan values.
bd305c8d18
changed the existing (and old) snap behavior, but I wouldn't say it fixed #110108, as the issue confirmed there was resetting transformation.I am considering apply this cosmetic change, as it is not disruptive.
But I still believe that
oLen
should never be0.0
.Fix #110108: NLA Markers transform not resetting correctlyto Fix #113552: NLA Markers do not reset when length reaches 0.0I've added @nathanvegdahl as reviewer instead of me. He's been looking into the NLA's "no zero-length strips" thing recently, so his brain is more equipped than mine right now :)
Although this certainly addresses the immediate symptom and prevents the divide by zero, it's not clear to me that this is the right fix. Specifically, the length of strips is never supposed to be zero in the first place.
Having said that, as discussed in #107030 (comment), the issues around actually ensuring non-zero strip length are a bit deep and tangled. So I think the fix in this PR is reasonable as a stop-gap, because it does address the symptom described in the bug report.
But before accepting, I think a comment needs to be added to the code explaining that this is a (possibly) stop-gap fix, and that the source of the zero-length strip needs to be tracked down for a proper fix. The comment should probably use the
WORKAROUND
tag.42b192c227
to5d985cba2a
The patch was getting old, so I decided to rebase onto main and force push. (although the fix should go to
blender-v4.0-release
).Thanks @mano-wii !
I don't know if we need to (or should) mention specific functions in the comment in this case. To me, at least, it's not clear where the zero strip lengths are coming from here (e.g. it could be in the transform code). So I think this may be a better comment:
Sorry for the run-around! Just this one last change and then we can get it merged. :-)
(Edit: changed comment to reference the issue.)
Oh! Also, please rebase onto and change the PR to merge to
blender-v4.0-release
, because we'll merge there first.Fix #113552: NLA Markers do not reset when length reaches 0.0to Fix #113552: NLA Markers do not reset when length reaches 0.04773eaa7de
to79cc6ba238
Looks good to me!