Page MenuHome

GPencil: Add custom color for animation channels
AbandonedPublic

Authored by Antonio Vazquez (antoniov) on Mar 30 2019, 6:52 PM.

Details

Summary

Artists have requested to define a custom color by layer for the animation channel in Dopesheet. This is useful when you have complex scenes.

The colors is enabled/disabled with the same menu option used in Bones (Show Group Colors). Maybe the menu could be changed to show diferent text in this context.

Diff Detail

Event Timeline

I was thinking that mybe the color of the channel must be in a separated subpanel, what do you think? Not sure what header use for the panel.

Perhaps if we do this, it should be added consistently inside Blender, not just for Grease Pencil?

Although I am not sure where this could be added in the UI for other things. Grease Pencil has a special Layers tab, and I can't think of a good place to do this for other object types or modes.

For F-Curves, we already have a way to set this inside the F-Curve Editor:

I wonder if we should rather try and do this in the Dopesheet, and add it for all modes and object types as a general feature, rather than just a Grease Pencil thing?

@William Reynish (billreynish) Not sure we can add for other types. As you said, grease pencil has its own mode. Maybe we need @Joshua Leung (aligorith) opinion.

@William Reynish (billreynish) The custom color affects the curve, not the left area with the channel name.

Bones have channel colors via bone groups


Bassically is have the same feature for GP layers

Ok, maybe it's fine to just add It via the GP layers, as this patch does then.

I have tested in a Subpanel:

Maybe, in this image you can see better:

Ok, maybe it's fine to just add It via the GP layers

Anyway, I think we could add to ToDo list implement a way to define custom colors in any object type. I think for animators to have an option to define a color can help a lot. If we add in the future this "general" solution, we could think if we need remove this special layer option.

source/blender/editors/animation/anim_channels_defines.c
200

Don't do this. Create a dedicated callback/function for getting the colors for GP Layers instead of patching this into the generic one.

Can we spend a bit more time trying to fit it into the rest of Blender? This way it feels hacked in.

If this is similar to Bone Groups, then why not merging them into something both could use? Either GP Layer Groups or just rename the concept into something more broad like Animation Channel Group or similar.

source/blender/editors/animation/anim_channels_defines.c
200

I see what you mean...you are right.

I guess the place is in the function name callback of bAnimChannelType ACF_GPL definition, right?

  • Replace custom color by new callback function
  • Move parameter to Subpanel

What we are going to do here? add this feature and in the future replace for better alternatives? reject?

@Pablo Vazquez (pablovazquez) What is the best name for the prop? "Custom Channel Color" for example?

I'm available to make a meeting to discuss alternatives.

My first inclination was that we should add it as a general Dopesheet feature instead. On the surface, it seems like it should more of a general feature in the Dopesheet, rather than something that is specific to Grease Pencil.

But it seems like it's more complicated, because the feature already exists for armatures, using Bone Groups.

If we can think of a simple way to add it to the Dopesheet generally, it seems like it would be better. We could have a 'Channel' panel in the Dopesheet Sidebar for this kind of thing?

I see some problems adding a custom color to dope sheet channel, aside of other technical problems.

By definition, a channel is animation data, so if you haven't animation, you haven't channel. Suppose you add animation to 3 properties, then you assign a custom color and you get the scheme you like...now you delete the animation to redo it...you must set custom colors again.

I think this is the reason why the custom color for Bones is in the bone group, because if you remove animation and add again, you haven't to reset the colors. The same would be for grease pencil layers, you assign the color and you don't need set again.

To have a color predefined for each channel will need this data in each property, so I think is not so easy to implement. If we haven't this data, you need reset the custom color each time you add a channel.

@Antonio Vazquez (antoniov) I see, yes. Ok, perhaps what you have done here is reasonable then.

This revision was committed in 382b2a9c66a9