Cleanup: Add in NLAStrip / NLATrack remove / clean methods #104437
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104437
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "nrupsis/blender:T82241-cleanup-NLAStrip_remove"
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?
Cleanup: Refactor NLATrack / NLAStrip Remove
This PR adds 3 new methods:
These named BKE methods are really just replacements for BLI_remlink, but with some added checks, and enhanced readability.
@ -1 +1 @@
Subproject commit e133fc08cd3254bb3d3bd1345028c8486700bca4
Subproject commit 979bfe2504eb2f446639ab5768aac9b80b1f4864
I don't understand why this has changed. I've (at the time of this writing) updated with upstream main, and run
git submodule sync
. Any clues on why this might be?AFAIK we never commit submodule changes, so I always just ignore those & never commit submodule hashes.
MutableMatView
Nice work, just some cosmetc things.
@ -40,3 +40,3 @@
* and the strip itself.
*/
void BKE_nlastrip_free(ListBase *strips, struct NlaStrip *strip, bool do_id_user);
void BKE_nlastrip_free(struct NlaStrip *strip, bool do_id_user);
💜 for the removal of
ListBase *strips
. The documentation now seems outdated, as this function no longer removes itself from its parent strips. The doc could also get a reference to theBKE_nlastrip_remove()
andBKE_nlastrip_remove_free()
functions.@ -100,1 +101,4 @@
struct NlaStrip *BKE_nlastrip_new(struct bAction *act);
/*
* Removes the given NLA strip from the list of strips provided
Be sure to end sentences with a period.
@ -146,3 +154,1 @@
* \param strip:
* \return true
* \return false
* NULL checks incoming strip and verifies no overlap / invalid
Well, I think it also adds the NLA strip to the given list of strips, right? Might be worth putting in the docs as well ;-)
@ -217,3 +224,2 @@
/**
* Add the given NLA-Strip to the given NLA-Track, assuming that it
* isn't currently attached to another one.
* Add the given NLA-Strip to the given NLA-Track.
You may want to add a bit about what kind of extra checks this does (if any; otherwise add a warning that it can cause overlapping strips). And document what the return value actually means; with a boolean it's always a guess.
@ -66,0 +87,4 @@
BKE_nlatrack_remove_strip(&track, &strip2);
EXPECT_EQ(1, BLI_listbase_count(&track.strips));
}
Add a
BLI_findindex()
call to check that it didn't remove the wrong strip. With the test as it is now, given that you have two strips in the track, it wouldn't catch an inversion bug, where it deletes all strips except the mentioned one.880519e881
tob8e2611cab
\o/
Just one tiny thing that you can look at while landing the PR.
@ -136,2 +148,4 @@
* isn't currently a member of another list, NULL, or conflicting with existing
* strips position.
* isn't currently a member of another list, NULL, or conflicting with existing
* strips position.
I guess this addition sneaked in accidentally? Remove it before committing.
e522aa525d
to0bb05784dc