[Bf-blender-cvs] [63f9cb5a0b5] master: Fix T96608: GPencil Simplify must check general Simplify switch
Antonio Vazquez
noreply at git.blender.org
Fri Mar 18 19:51:07 CET 2022
Commit: 63f9cb5a0b5930a67c6fa8db833293f21b57ff63
Author: Antonio Vazquez
Date: Fri Mar 18 19:50:38 2022 +0100
Branches: master
https://developer.blender.org/rB63f9cb5a0b5930a67c6fa8db833293f21b57ff63
Fix T96608: GPencil Simplify must check general Simplify switch
As the grease pencil simplify is a subotion of general simplify, if the general switch is disabled, the grease pencil simplify must be disabled too.
This patch also disable the UI panel.
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M source/blender/blenkernel/BKE_gpencil.h
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index c1d6dcfd3f4..947a7e5c7a7 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -677,7 +677,7 @@ class GreasePencilSimplifyPanel:
rd = context.scene.render
- layout.active = rd.simplify_gpencil
+ layout.active = rd.use_simplify and rd.simplify_gpencil
col = layout.column()
col.prop(rd, "simplify_gpencil_onplay")
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index e586bc4247d..60564d1282e 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -34,7 +34,8 @@ struct bGPDlayer_Mask;
struct bGPDstroke;
struct bGPdata;
-#define GPENCIL_SIMPLIFY(scene) (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ENABLE)
+#define GPENCIL_SIMPLIFY(scene) \
+ ((scene->r.mode & R_SIMPLIFY) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ENABLE))
#define GPENCIL_SIMPLIFY_ONPLAY(playing) \
(((playing == true) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY)) || \
((scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY) == 0))
More information about the Bf-blender-cvs
mailing list