Fix: GPv3: Wrong layer settings when adding or duplicating a layer #119821

Merged
Falk David merged 5 commits from SietseB/blender:gpv3-fix-layer-blend-mode into main 2024-03-26 11:01:11 +01:00
Member

This PR fixes several issues when adding, locking or duplicating layers
in GPv3.

Fixed:

  • Blend mode not initialized when adding a new layer, resulting in
    entirely black strokes and fills in the viewport.
  • The 'Use Masks' switch is enabled for new layers (should be off
    by default).
  • Layer settings not copied when duplicating a layer.
  • Empty drawings with layer 'Duplicate' when 'Duplicate Empty
    Keyframes' has run before.
  • Layer 'Lock All' not working when 'Unlock All' has run before.
This PR fixes several issues when adding, locking or duplicating layers in GPv3. Fixed: - Blend mode not initialized when adding a new layer, resulting in entirely black strokes and fills in the viewport. - The 'Use Masks' switch is enabled for new layers (should be off by default). - Layer settings not copied when duplicating a layer. - Empty drawings with layer 'Duplicate' when 'Duplicate Empty Keyframes' has run before. - Layer 'Lock All' not working when 'Unlock All' has run before.
Sietse Brouwer added this to the Grease Pencil project 2024-03-23 12:53:24 +01:00
Sietse Brouwer requested review from Falk David 2024-03-23 12:53:36 +01:00
Pratik Borhade reviewed 2024-03-23 13:33:10 +01:00
@ -487,2 +488,3 @@
Layer &new_layer = grease_pencil.add_layer(active_layer.name());
Layer &new_layer = grease_pencil.add_layer(active_layer);
/* Duplicate drawings (or insert empty keyframes). */
Member

Hi, can confirm the fix about lock and duplicate layer operators are correct.
But this comments looks odd :)
(Should be related to: clear default keyframe before duplicating each drawing of source layer)
Wait for Falk's reply

Hi, can confirm the fix about lock and duplicate layer operators are correct. But this comments looks odd :) (Should be related to: clear default keyframe before duplicating each drawing of source layer) Wait for Falk's reply
Author
Member

I made an attempt to improve the comment 🙂

I made an attempt to improve the comment :slightly_smiling_face:
Member

I think this is good now :D

I think this is good now :D
filedescriptor marked this conversation as resolved
Falk David requested changes 2024-03-25 10:25:18 +01:00
Falk David left a comment
Member

Could you rewrite the history of this PR so that each fix is in its own commit? I wouldn't want to squash it all into one commit, even if it's a small one.

Could you rewrite the history of this PR so that each fix is in its own commit? I wouldn't want to squash it all into one commit, even if it's a small one.
Sietse Brouwer force-pushed gpv3-fix-layer-blend-mode from c1e2786a76 to 8d26534bdc 2024-03-25 15:36:37 +01:00 Compare
Member

@blender-bot build

@blender-bot build
Member

Argh, shouldn't have merged with main. Too early for me :D I'll commit this manually.

Argh, shouldn't have merged with main. Too early for me :D I'll commit this manually.
Falk David force-pushed gpv3-fix-layer-blend-mode from bde95bcfce to e664db13eb 2024-03-26 11:00:38 +01:00 Compare
Falk David merged commit a02b429324 into main 2024-03-26 11:01:11 +01:00
Sietse Brouwer deleted branch gpv3-fix-layer-blend-mode 2024-03-27 09:56:50 +01:00
Sign in to join this conversation.
No reviewers
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#119821
No description provided.