GPencil: Set layer channel custom color to all line in Dopesheet
See D4645 for more details
This commit is contained in:
@@ -30,12 +30,14 @@
|
||||
#include <float.h>
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
/* Types --------------------------------------------------------------- */
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_cachefile_types.h"
|
||||
#include "DNA_gpencil_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_screen_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
@@ -289,8 +291,19 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
|
||||
immRectf(pos, act_start, (float)y - ACHANNEL_HEIGHT_HALF(ac), act_end, (float)y + ACHANNEL_HEIGHT_HALF(ac));
|
||||
}
|
||||
else if (ac->datatype == ANIMCONT_GPENCIL) {
|
||||
unsigned char *color;
|
||||
if ((show_group_colors) && (ale->type == ANIMTYPE_GPLAYER)) {
|
||||
bGPDlayer *gpl = (bGPDlayer *)ale->data;
|
||||
unsigned char gpl_col[4];
|
||||
rgb_float_to_uchar(gpl_col, gpl->color);
|
||||
gpl_col[3] = col1[3];
|
||||
|
||||
color = sel ? col1 : gpl_col;
|
||||
}
|
||||
else {
|
||||
color = sel ? col1 : col2;
|
||||
}
|
||||
/* frames less than one get less saturated background */
|
||||
unsigned char *color = sel ? col1 : col2;
|
||||
immUniformColor4ubv(color);
|
||||
immRectf(pos, 0.0f, (float)y - ACHANNEL_HEIGHT_HALF(ac), v2d->cur.xmin, (float)y + ACHANNEL_HEIGHT_HALF(ac));
|
||||
|
||||
|
Reference in New Issue
Block a user