[Bf-blender-cvs] [43a226cc0aa] greasepencil-object: Allow a very long list of colors in picker
Antonio Vazquez
noreply at git.blender.org
Sun Jan 14 12:09:28 CET 2018
Commit: 43a226cc0aad3e0ea1d6ef85c996330db6b41c87
Author: Antonio Vazquez
Date: Sun Jan 14 12:02:20 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB43a226cc0aad3e0ea1d6ef85c996330db6b41c87
Allow a very long list of colors in picker
For very long palettes, resize panel.
===================================================================
M source/blender/editors/gpencil/gpencil_colorpick.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_colorpick.c b/source/blender/editors/gpencil/gpencil_colorpick.c
index f76f17811fe..db1b665ce03 100644
--- a/source/blender/editors/gpencil/gpencil_colorpick.c
+++ b/source/blender/editors/gpencil/gpencil_colorpick.c
@@ -352,7 +352,12 @@ static tGPDpick *gp_session_init_colorpick(bContext *C, wmOperator *op, const wm
if (tgpk->row > tgpk->totcolor) {
tgpk->row = tgpk->totcolor;
}
- CLAMP(tgpk->row, 1, 6);
+ if (tgpk->totcolor < 72) {
+ CLAMP(tgpk->row, 1, 6);
+ }
+ else {
+ CLAMP(tgpk->row, 1, 9);
+ }
tgpk->col = tgpk->totcolor / tgpk->row;
if (tgpk->totcolor % tgpk->row > 0) {
tgpk->col++;
More information about the Bf-blender-cvs
mailing list