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/editors/screen
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/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 8a7ee3a5fe7..f61ad348501 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -511,7 +511,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
bGPDlayer *gpl;
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- if ((gpl->flag & (GP_LAYER_HIDE | GP_LAYER_LOCKED)) == 0) {
+ if (gpencil_layer_is_editable(gpl)) {
CTX_data_list_add(result, &gpd->id, &RNA_GPencilLayer, gpl);
}
}
@@ -527,7 +527,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
bGPDlayer *gpl;
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- if ((gpl->flag & (GP_LAYER_HIDE | GP_LAYER_LOCKED)) == 0 && (gpl->actframe)) {
+ if (gpencil_layer_is_editable(gpl) && (gpl->actframe)) {
bGPDframe *gpf = gpl->actframe;
bGPDstroke *gps;