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/gpencil/gpencil_edit.c
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/gpencil/gpencil_edit.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 4852723c747..03d5ed3e24f 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -391,7 +391,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
/* no active layer - let's just create one */
gpl = gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true);
}
- else if (gpl->flag & (GP_LAYER_HIDE | GP_LAYER_LOCKED)) {
+ else if (gpencil_layer_is_editable(gpl) == false) {
BKE_report(op->reports, RPT_ERROR, "Can not paste strokes when active layer is hidden or locked");
return OPERATOR_CANCELLED;
}