diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-01-16 21:36:00 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-01-16 21:36:00 +0300 |
commit | 4e8c78245d3ec5e83be3cee00898be589ec0b24c (patch) | |
tree | 1fe991fc2b44a320bb2dfa09cc767d515643ebbf /source/blender | |
parent | 24cdffde555bac873904d2fbfe9d57fc0feb8a54 (diff) |
GPencil: Hide layer if the scale is zero
When scale a layer to zero must be hidden.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 83b20e602c3..453960fbd61 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -2575,6 +2575,11 @@ void BKE_gpencil_visible_stroke_iter(ViewLayer *view_layer, continue; } + /* If scale to 0 the layer must be invisible. */ + if (is_zero_v3(gpl->scale)) { + continue; + } + /* Hide the layer if it's defined a view layer filter. This is used to * generate renders, putting only selected GP layers for each View Layer. * This is used only in final render and never in Viewport. */ |