GPv3: Onion Skinning #119792
No reviewers
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#119792
Loading…
Reference in New Issue
No description provided.
Delete Branch "filedescriptor/blender:gpv3-old-onion-skinning"
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?
Implements the onion skinning functionality.
There are no functional changes compared to GPv2 exept for the
use_ghosts_always
option. This was used to show onion skinning in the final render.TODO:
@blender-bot build
WIP: GPv3: Onion Skinningto GPv3: Onion Skinning39ad8f9bb9
to870d4ccd00
Code looks good, just some cleanup and comments.
@ -233,0 +284,4 @@
layout = self.layout
layout.use_property_split = True
layout.enabled = grease_pencil.users <= 1
What's the purpose of this check? Maybe add a comment.
My guess is that this is to indicate that the onion skinning settings are used by multiple users and shouldn't be edited? I don't know. I can also remove the check. It was just taken from the GPv2 code.
@ -178,6 +178,7 @@ struct DrawingInfo {
const bke::greasepencil::Drawing &drawing;
const int layer_index;
const int frame_number;
const int onion_id;
Add a comment what the
onion_id
is (distance from current frame i suppose).@ -239,3 +239,3 @@
GP_LAYER_TREE_NODE_MUTE = (1 << 3),
GP_LAYER_TREE_NODE_USE_LIGHTS = (1 << 4),
GP_LAYER_TREE_NODE_USE_ONION_SKINNING = (1 << 5),
GP_LAYER_TREE_NODE_HIDE_ONION_SKINNING = (1 << 5),
What's the reason for using a negative flag here? The RNA property is positive too.
The flags on tree nodes are "inherited" when you access them (e.g. if the parent group of a layer is not visible, the layer is also not visible). This also applies to onion skinning. So to avoid having to change the root group value, it seemed easier to just invert the flag instead so that the default of
0
is sensible (onion skinning is shown).@ -383,2 +392,4 @@
*/
int8_t mode;
/**
* Onion skinning settings flag. See `GreasePencilOnionSkinningFlag`.
Usually we just comment flags with
/* #GreasePencilOnionSkinningFlag. */
@ -236,0 +252,4 @@
}
return {};
}
else if (do_onion_skinning && layer.use_onion_skinning()) {
else after return
@ -260,4 +260,2 @@
const int icon = (layer_.base.flag & GP_LAYER_TREE_NODE_HIDE_MASKS) == 0 ? ICON_CLIPUV_DEHLT :
ICON_CLIPUV_HLT;
but = uiDefIconButR(block,
Does it work to use a
uiItem
function here, instead of the lower leveluiDefBut
API?I'd love too, but
UI_but_flag_enable(but, UI_BUT_INACTIVE);
takes auiBut
:/Just like RNA, there are multiple APIs for the same functionality. Here you should be able to use
uiLayoutSetActive
oruiLayoutSetEnabled
.Ok I'll see if I can switch to using a layout with rows and such there. I remember trying this when I wrote that code, but running into issues. Don't know what those were now. I'll try again.
@blender-bot build
@blender-bot build