Fix #105009: Restore GPencil layer drawing in dopesheet
After 49ad91b5ab, an extra visibility
toggle is being drawn for grease pencil layer in dopesheet. In this PR,
a condition is added to skip drawing of visibility toggle for GPencil
layer. Also, Grease pencil does not support pinning so restore the offset
added to channel for drawing the pin icon.
Pull Request #105080
This commit is contained in:
@@ -4483,7 +4483,8 @@ void ANIM_channel_draw(
|
||||
if (ac->sl) {
|
||||
if (ELEM(ac->spacetype, SPACE_ACTION, SPACE_GRAPH) &&
|
||||
(acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE) ||
|
||||
acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE))) {
|
||||
acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE)) &&
|
||||
!ELEM(ale->type, ANIMTYPE_GPLAYER, ANIMTYPE_DSGPENCIL)) {
|
||||
/* for F-Curves, draw color-preview of curve left to the visibility icon */
|
||||
if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) {
|
||||
FCurve *fcu = (FCurve *)ale->data;
|
||||
@@ -5227,7 +5228,8 @@ void ANIM_channel_draw_widgets(const bContext *C,
|
||||
if (ac->sl) {
|
||||
if (ELEM(ac->spacetype, SPACE_ACTION, SPACE_GRAPH) &&
|
||||
(acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE) ||
|
||||
acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE))) {
|
||||
acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE)) &&
|
||||
(ale->type != ANIMTYPE_GPLAYER)) {
|
||||
/* Pin toggle. */
|
||||
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE)) {
|
||||
draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_ALWAYS_VISIBLE);
|
||||
|
||||
Reference in New Issue
Block a user