GPv3: Delete duplicated frames #114182
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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#114182
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Delete next keyframe if its duplicate of current keyframe
GREASE_PENCIL_OT_frame_clean_duplicate
ingrease_pencil_frames.cc
selected
to remove selected/all framesfor (frame : layer.frames().items())
(might needvalues()
or index based for loop(i = 0; i < frame_size; i++)
selected
is true, run following code whenframe.is_selected()
layer->drawing_index_at(frame_number);
grease_pencil.drawing(drawing_index)
bke::CurvesGeometry &geometry = drawing.strokes_for_write();
points_num(), curves_num()
)attributes.for_all()
I would love to help with this task, but I wanted to check with you first if you would consider it a good task for someone who is contributing to Blender for the first time. From the description it seems simple enough and, given that I have C/C++ experience and have already built Blender from source a couple of times before, I believe I will be able to do it, but I just want to confirm this with you before I start working on it.
@amsaid1989 hi, this task seems good for someone contributing for the first time.
@PratikPB2123 Great.. thank you very much.. I will give it a go and ask on the chat if I need any help
I'm going to add some more details to this part: "Verify whether content of both keyframes are same"
I suggest to write a
static
function like this:First we do the easy checks (number of points and number of curves):
Second, we check if the curve offsets are all the same:
Third, we check if the set of attributes are the same (this does not check the values in the attributes, just if the number of attributes are the same and the ids match):
Finally, we check if all the attributes have the same values:
attributes_a == attributes_b
at this point so we can just iterate over one of them likeGVArray
from both geometies.size()
) and returnfalse
if they aren't the sameconst CPPType &type_a = values_a.type()
and make sure they are the same, otherwise returnfalse
.IndexRange(values_a.size())
type.is_equal_or_false(values_a[i], values_b[i])
to compare the individual values. And again, when this is false, returnIn the end we can
return true
.Hey @filedescriptor. I've implemented most of what you included in your description, however, there is one thing that I haven't figured out yet.
GVArray
doesn't implementoperator[]
. There are 2 overloads of theget()
method, but I haven't figured out how to use either of them. This means that I am currently stuck implementing the last point in your description:I would appreciate your help here.