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:
authorAntonioya <blendergit@gmail.com>2018-10-13 21:34:11 +0300
committerAntonioya <blendergit@gmail.com>2018-10-13 21:34:36 +0300
commitb8327ee129d8ab0ccaaa387dcaf92bc43e934bcb (patch)
treea6c8c752751c677add0d6ff76b18c30154b5a443 /source/blender/editors/gpencil/gpencil_data.c
parentdd6bf3f84a9137affbcd8ba0fc957c32b8c0aff7 (diff)
GP: Remove Layer order userprefs parameter
After a lot of discussion about this option (see 18f117594004) we have decided set always the order of GP layers in 2D mode (Top->Down) and remove the parameter from User Preferences screen. Internally all works equal, but in the UI the list is inverted. The filter buttons to reverse the list or sort alphabetically have been removed because these buttons are not logic in this context.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_data.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 5cc5c55b3df..305aa03404b 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -338,8 +338,7 @@ static int gp_layer_move_exec(bContext *C, wmOperator *op)
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
- const bool reverse = (bool)(U.gp_settings & GP_PAINT_REVERSE_LAYERS);
- const int direction = RNA_enum_get(op->ptr, "type") * (reverse ? -1 : 1);
+ const int direction = RNA_enum_get(op->ptr, "type") * -1;
/* sanity checks */
if (ELEM(NULL, gpd, gpl))
@@ -1084,18 +1083,8 @@ void GPENCIL_OT_layer_isolate(wmOperatorType *ot)
static int gp_merge_layer_exec(bContext *C, wmOperator *op)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
- const bool reverse = (bool)(U.gp_settings & GP_PAINT_REVERSE_LAYERS);
- bGPDlayer *gpl_current = NULL;
- bGPDlayer *gpl_next = NULL;
-
- if (!reverse) {
- gpl_current = BKE_gpencil_layer_getactive(gpd);
- gpl_next = gpl_current->next;
- }
- else {
- gpl_next = BKE_gpencil_layer_getactive(gpd);
- gpl_current = gpl_next->prev;
- }
+ bGPDlayer *gpl_next = BKE_gpencil_layer_getactive(gpd);
+ bGPDlayer *gpl_current = gpl_next->prev;
if (ELEM(NULL, gpd, gpl_current, gpl_next)) {
BKE_report(op->reports, RPT_ERROR, "No layers to merge");