Add a function that returns a list of keyframe segments
A segment being a continuous selection of keyframes
As @Wayde Moss (GuiltyGhost) pointed out in D9374 this makes it easier to reuse code later on
Differential D13531
Function to return a list of keyframe segments Authored by Christoph Lendenfeld (ChrisLend) on Dec 10 2021, 12:30 AM.
Details
Add a function that returns a list of keyframe segments As @Wayde Moss (GuiltyGhost) pointed out in D9374 this makes it easier to reuse code later on
Diff Detail
Event TimelineComment Actions LGTM, apart from a few smaller bits. And one of those will make memory management a little easier, so I guess it's a good one ;-)
Comment Actions
@Sybren A. Stüvel (sybren) In order for the list to be allocated on the stack it needs to be passed in. right? Comment Actions
Comment Actions Nope, you can just do this: ListBase find_fcurve_segments(FCurve *fcu) { ListBase segments; // do stuff BLI_addtail(&segments, segment); // more stuff return segments; } // ... in some other function: ListBase segments = find_fcurve_segments(fcu); Comment Actions Just the tiniest of things, no need to re-review after this.
| |||||||||||||||||