Changing the mini-dopesheet Show Keys settings

To change the type of keys shown in the mini-dopesheet in the timeline, you set the same preferences used by the full dopesheet:

// Marked Parameters
Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys",2 );

//Current Character Set
Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys", 11 );

So, to toggle between Show Keys > Marked Parameters and Show Keys > Current Character Set, you could do something like this:

var x = Preferences.GetPreferenceValue( "dopesheet.timeline_display_keys" );
x = ( x==2 ) ? 11 : 2;
Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys", x );

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s