GPv3: Apply modifier to all frames #128487
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#128487
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "filedescriptor/blender:gpv3-modifier-apply-all-frames"
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?
This adds an option
all_keyframes
to theobject.modifier_apply
operator.
With the option enabled, the operator will iterate through all the keyframes,
then apply the modifier and merge the result back into the original
object. This is only done for Grease Pencil objects.
This is how the default
Apply
operation worked in GPv2. This adds thefunctionality back but also keeps the current
Apply
behavior for consistencywith other object types.
The UI is also changed to show both options in the dropdown menu.
Again, this is only shown for Grease Pencil objects.
Apply
operatorApply (Active Keyframe)
in order to be more explicit about the difference and make it consistentI'm not entirely sure what the intended behavior is. Let's take this case:
Would the 2 apply operators give different results?
Or even simpler:
With
Apply
I would expect just what I currently see to be written to the active keyframe(s) per layer. But When doing this to all keyframes, I would expect the scene evaluation to be done on the respective frame of the keyframe per layer.Regardless of the intention, there seems to be a bug because either way in the file I sent there shouldn't be any difference between the two.
Apply
toApply (Active Keyframe)
a7a9a91665Updated the PR:
Apply
is now namedApply (Active Keyframe)
.@blender-bot build
There is an issue when applying a modifier that adds a new layer.
For the existing
Apply
operator that works fine, as it just inserts a new keyframe on the current scene frame. But when doing this on all keyframes that is not really what I would expect (and currently also not what is happening).I would suggest that the most expected behavior would be to go through all existing keyframes of all layers and create a new keyframe on those new layers.
In addition: If a layer does not exist in the evaluated data on one of those frames, it should insert an empty one. (that needs to be tracked throughout, since the final list of layers is not known until the final evaluation)
@SimonThommes and I talked about this a bit. In the end, this is what we ended up with:
Updates:
Layer
,Layer.001
, etc.) for all the keyframes.@blender-bot build
Can't comment too much on the exact behavior as this should be determined by artists, but it seems to work as I'd expect on my simple test case. The code looks reasonable overall.
@ -223,3 +222,1 @@
CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"),
ICON_CHECKMARK,
"OBJECT_OT_modifier_apply");
if (ob->type == OB_GREASE_PENCIL) {
Think it would be a bit cleaner to have the
ob->type
check only once instead of twice.