Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2016-02-08 16:44:02 +0300
committerJoshua Leung <aligorith@gmail.com>2016-02-08 16:45:36 +0300
commit52668c56b74f75c45a6b5176704dfd168fd3e6ac (patch)
treec818559d81985570dafa5ea746d25740af37b669 /source/blender/makesrna
parent4bc070a5193f927551a7c2aebb8c6306308bee4e (diff)
GPencil: Layers with alpha = 0 should not be editable
* Added a new API function to test if a GPencil layer is visible or not * Replaced all editability checks with this new "super check" * Replaced all magic number thresholds for opacity visiblity with a single define
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index c1fc1a8a061..291456a591b 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -145,7 +145,7 @@ static int rna_GPencilLayer_is_stroke_visible_get(PointerRNA *ptr)
* about this limit for showing/not showing
*/
bGPDlayer *gpl = (bGPDlayer *)ptr->data;
- return (gpl->color[3] > 0.001f);
+ return (gpl->color[3] > GPENCIL_ALPHA_OPACITY_THRESH);
}
static int rna_GPencilLayer_is_fill_visible_get(PointerRNA *ptr)
@@ -154,7 +154,7 @@ static int rna_GPencilLayer_is_fill_visible_get(PointerRNA *ptr)
* about this limit for showing/not showing
*/
bGPDlayer *gpl = (bGPDlayer *)ptr->data;
- return (gpl->fill[3] > 0.001f);
+ return (gpl->fill[3] > GPENCIL_ALPHA_OPACITY_THRESH);
}
static PointerRNA rna_GPencil_active_layer_get(PointerRNA *ptr)