Page MenuHome

GPencil: Add option to disable masks in view layer
ClosedPublic

Authored by Falk David (filedescriptor) on May 11 2021, 7:38 PM.

Details

Summary

This patch adds an option in the Layers > Relations panel called "Disable Masks in Render".
When checked, no masks on this layer are included in the render.

Example:

See T88202 for why this is needed.

Diff Detail

Repository
rB Blender
Branch
T88202 (branched from master)
Build Status
Buildable 14513
Build 14513: arc lint + arc unit

Event Timeline

Falk David (filedescriptor) requested review of this revision.May 11 2021, 7:38 PM

I do not totally agree with this change. I see the situation when you filter by viewlayer and you want the only color or only shadow... but maybe some users can understand that you are filltering the main layer only and that masking layers are just "attributes" of the layer as the opacity or tint color.

I'm not sure if we must add an option to keep old mode and add this as an special option for some composition cases (something like filter masking layers or something like that)

@Matias Mendiola (mendio) @Daniel Martinez Lara (pepeland) What do you think?

Falk David (filedescriptor) planned changes to this revision.May 12 2021, 11:04 AM

This solution is not ideal. Planning to implement a better one.

  • Revert "Fix T88202: Layer masks render in viewlayer"
  • Add option to disable masks for view layer
Falk David (filedescriptor) retitled this revision from Fix T88202: Layer masks render in viewlayer to GPencil: Add option to disable masks in view layer.May 12 2021, 12:38 PM
Falk David (filedescriptor) edited the summary of this revision. (Show Details)
source/blender/blenkernel/intern/gpencil.c
2620

You have double parenthesis.

source/blender/draw/engines/gpencil/gpencil_cache_utils.c
278 ↗(On Diff #37026)

Not totally sure if here a parenthesis is missing.

source/blender/draw/engines/gpencil/gpencil_cache_utils.c
278 ↗(On Diff #37026)

Hm, looks right to me

  • Remove double parentheses
Falk David (filedescriptor) marked an inline comment as done.May 14 2021, 2:32 PM

Code side LGTM.

I would like a review of @Daniel Martinez Lara (pepeland) and @Matias Mendiola (mendio) about functionality. Maybe @Samuel Bernou (Pullup) could test it.

This revision is now accepted and ready to land.May 14 2021, 3:57 PM

I tested the patch, the behavior mask disabled (Disable masks in Render checked) is working as expected.

But I believe the behavior with the mask enabled (Disable masks in Render unchecked) is subject to discuss...
I'd like to have more inputs, but in my opinion it should show the mask "applyed" without "color" appearing at all on layer shadow.
Like this (test made by @Falk David (filedescriptor)) :

Edit : Maybe the discussion about the "mask enabled" behavior should be considered a different task altogether, since the subject here is the new "Option to disable mask", which is OK.