Theme Colors for NLA Strips and DopeSheet Summary
authorJoshua Leung <aligorith@gmail.com>
Mon, 4 Jun 2012 01:17:37 +0000 (01:17 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 4 Jun 2012 01:17:37 +0000 (01:17 +0000)
* NLA Strip colors are now themable
* Changed the "Active Action"/"Summary" colors to be a bit more muted. The new
colors are now closer to those for keyframes, though they are still different
enough to be clearly distinguishable.
* Removed some colors wihch don't seem to be used (from NLA theme colors)
* Added function to get theme colors + alpha as floats

source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/resources.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_nla/nla_draw.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_userdef.c

index 386313b1d3c83e482b232508fac75ad7ebd67eaa..7f7d269a7c3acebcb84de54da59ce1266000f698 100644 (file)
@@ -395,11 +395,8 @@ static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListEle
 /* get backdrop color for summary widget */
 static void acf_summary_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float r_color[3])
 {
-       // FIXME: hardcoded color - same as the 'action' line in NLA
-       // reddish color
-       r_color[0] = 0.8f;
-       r_color[1] = 0.2f;
-       r_color[2] = 0.0f;
+       /* reddish color - same as the 'action' line in NLA */
+       UI_GetThemeColor3fv(TH_ANIM_ACTIVE, r_color);
 }
 
 /* backdrop for summary widget */
index 257f5c2119c9517cc293cc8c0714db97ed8d0666..2ef5277a3c667f7e0f4adb0971b45b175d468d39 100644 (file)
@@ -200,7 +200,20 @@ enum {
        TH_MATCH,           /* highlight color for search matches */
        TH_SELECT_HIGHLIGHT, /* highlight color for selected outliner item */
 
-       TH_SKIN_ROOT
+       TH_SKIN_ROOT,
+       
+       TH_ANIM_ACTIVE,   /* active action */
+       TH_ANIM_INACTIVE, /* no active action */
+       
+       TH_NLA_TWEAK,        /* 'tweaking' track in NLA */
+       TH_NLA_TWEAK_DUPLI,  /* error/warning flag for other strips referencing dupli strip */
+       
+       TH_NLA_TRANSITION,
+       TH_NLA_TRANSITION_SEL,
+       TH_NLA_META,
+       TH_NLA_META_SEL,
+       TH_NLA_SOUND,
+       TH_NLA_SOUND_SEL
 };
 /* XXX WARNING: previous is saved in file, so do not change order! */
 
@@ -239,6 +252,9 @@ void    UI_GetThemeColor3fv(int colorid, float col[3]);
 void    UI_GetThemeColorShade3fv(int colorid, int offset, float col[3]);
 void    UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3]);
 
+// get four color values, scaled to 0.0-1.0 range
+void    UI_GetThemeColor4fv(int colorid, float col[4]);
+
 // get the 3 or 4 byte values
 void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]);
 void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]);
index 5aec4b3c211a020fa27def6e24000c661d159340..f2ea81abcbfffd1947b96ed94e89f9660a4ef695 100644 (file)
@@ -473,6 +473,39 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
                                case TH_SKIN_ROOT:
                                        cp = ts->skin_root;
                                        break;
+                                       
+                               case TH_ANIM_ACTIVE:
+                                       cp = ts->anim_active;
+                                       break;
+                               case TH_ANIM_INACTIVE:
+                                       cp = ts->anim_non_active;
+                                       break;
+                               
+                               case TH_NLA_TWEAK:
+                                       cp = ts->nla_tweaking;
+                                       break;
+                               case TH_NLA_TWEAK_DUPLI:
+                                       cp = ts->nla_tweakdupli;
+                                       break;
+                               
+                               case TH_NLA_TRANSITION:
+                                       cp = ts->nla_transition;
+                                       break;
+                               case TH_NLA_TRANSITION_SEL:
+                                       cp = ts->nla_transition_sel;
+                                       break;
+                               case TH_NLA_META:
+                                       cp = ts->nla_meta;
+                                       break;
+                               case TH_NLA_META_SEL:
+                                       cp = ts->nla_meta_sel;
+                                       break;
+                               case TH_NLA_SOUND:
+                                       cp = ts->nla_sound;
+                                       break;
+                               case TH_NLA_SOUND_SEL:
+                                       cp = ts->nla_sound_sel;
+                                       break;
                        }
                }
        }
@@ -735,19 +768,34 @@ void ui_theme_init_default(void)
        rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
        btheme->tipo.handle_vertex_size = 4;
        
-       rgba_char_args_set(btheme->tipo.ds_channel,     82, 96, 110, 255);
+       rgba_char_args_set(btheme->tipo.ds_channel,      82, 96, 110, 255);
        rgba_char_args_set(btheme->tipo.ds_subchannel,  124, 137, 150, 255);
-       rgba_char_args_set(btheme->tipo.group, 79, 101, 73, 255);
-       rgba_char_args_set(btheme->tipo.group_active, 135, 177, 125, 255);
+       rgba_char_args_set(btheme->tipo.group,           79, 101, 73, 255);
+       rgba_char_args_set(btheme->tipo.group_active,   135, 177, 125, 255);
 
        /* dopesheet */
        btheme->tact = btheme->tipo;
        rgba_char_args_set(btheme->tact.strip,          12, 10, 10, 128);
        rgba_char_args_set(btheme->tact.strip_select,   255, 140, 0, 255);
        
+       rgba_char_args_set(btheme->tact.anim_active,    204, 112, 26, 102);
+       
        /* space nla */
        btheme->tnla = btheme->tact;
        
+       rgba_char_args_set(btheme->tnla.anim_active,    204, 112, 26, 102); /* same as for dopesheet; duplicate here for easier reference */
+       rgba_char_args_set(btheme->tnla.anim_non_active,153, 135, 97, 77);
+       
+       rgba_char_args_set(btheme->tnla.nla_tweaking,   77, 243, 26, 77);
+       rgba_char_args_set(btheme->tnla.nla_tweakdupli, 217, 0, 0, 255);
+       
+       rgba_char_args_set(btheme->tnla.nla_transition,     28, 38, 48, 255);
+       rgba_char_args_set(btheme->tnla.nla_transition_sel, 46, 117, 219, 255);
+       rgba_char_args_set(btheme->tnla.nla_meta,           51, 38, 66, 255);
+       rgba_char_args_set(btheme->tnla.nla_meta_sel,       105, 33, 150, 255);
+       rgba_char_args_set(btheme->tnla.nla_sound,          43, 61, 61, 255);
+       rgba_char_args_set(btheme->tnla.nla_sound_sel,      31, 122, 122, 255);
+       
        /* space file */
        /* to have something initialized */
        btheme->tfile = btheme->tv3d;
@@ -1043,6 +1091,17 @@ void UI_GetThemeColor3fv(int colorid, float col[3])
        col[2] = ((float)cp[2]) / 255.0f;
 }
 
+void UI_GetThemeColor4fv(int colorid, float col[4])
+{
+       const unsigned char *cp;
+       
+       cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
+       col[0] = ((float)cp[0]) / 255.0f;
+       col[1] = ((float)cp[1]) / 255.0f;
+       col[2] = ((float)cp[2]) / 255.0f;
+       col[3] = ((float)cp[3]) / 255.0f;
+}
+
 // get the color, range 0.0-1.0, complete with shading offset
 void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3])
 {
@@ -1816,6 +1875,29 @@ void init_userdef_do_versions(void)
                for (btheme = U.themes.first; btheme; btheme = btheme->next)
                        rgba_char_args_set(btheme->tv3d.skin_root, 180, 77, 77, 255);
        }
+       
+       if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 7)) {
+               bTheme *btheme;
+               
+               for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+                       /* DopeSheet Summary */
+                       rgba_char_args_set(btheme->tact.anim_active,    204, 112, 26, 102); 
+                       
+                       /* NLA Colors */
+                       rgba_char_args_set(btheme->tnla.anim_active,    204, 112, 26, 102); /* same as dopesheet above */
+                       rgba_char_args_set(btheme->tnla.anim_non_active,153, 135, 97, 77);
+                       
+                       rgba_char_args_set(btheme->tnla.nla_tweaking,   77, 243, 26, 77);
+                       rgba_char_args_set(btheme->tnla.nla_tweakdupli, 217, 0, 0, 255);
+                       
+                       rgba_char_args_set(btheme->tnla.nla_transition,     28, 38, 48, 255);
+                       rgba_char_args_set(btheme->tnla.nla_transition_sel, 46, 117, 219, 255);
+                       rgba_char_args_set(btheme->tnla.nla_meta,           51, 38, 66, 255);
+                       rgba_char_args_set(btheme->tnla.nla_meta_sel,       105, 33, 150, 255);
+                       rgba_char_args_set(btheme->tnla.nla_sound,          43, 61, 61, 255);
+                       rgba_char_args_set(btheme->tnla.nla_sound_sel,      31, 122, 122, 255);
+               }
+       }
 
        /* GL Texture Garbage Collection (variable abused above!) */
        if (U.textimeout == 0) {
index 3961e566f80441d3963e833b67b719d026a3b3db..84ff038a050615bc5fed6ce2b0dc991b029e956b 100644 (file)
@@ -236,8 +236,8 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        switch (ale->type) {
                                                case ANIMTYPE_SUMMARY:
                                                {
-                                                       // FIXME: hardcoded colors - reddish color from NLA
-                                                       glColor4f(0.8f, 0.2f, 0.0f, 0.4f);
+                                                       /* reddish color from NLA */
+                                                       UI_ThemeColor4(TH_ANIM_ACTIVE);
                                                }
                                                break;
                                                
index a6578ffb3f73615286d044b267f4123e29775f38..7eb0f676707844cc061e81d6f71086a031a27f72 100644 (file)
 static void nla_action_get_color(AnimData *adt, bAction *act, float color[4])
 {
        if (adt && (adt->flag & ADT_NLA_EDIT_ON)) {
-               // greenish color (same as tweaking strip) - hardcoded for now
-               color[0] = 0.30f;
-               color[1] = 0.95f;
-               color[2] = 0.10f;
-               color[3] = 0.30f;
+               /* greenish color (same as tweaking strip) */
+               UI_GetThemeColor4fv(TH_NLA_TWEAK, color);
        }
        else {
                if (act) {
-                       // reddish color - hardcoded for now    
-                       color[0] = 0.8f;
-                       color[1] = 0.2f;
-                       color[2] = 0.0f;
-                       color[3] = 0.4f;
+                       /* reddish color - same as dopesheet summary */
+                       UI_GetThemeColor4fv(TH_ANIM_ACTIVE, color);
                }
                else {
-                       // greyish-red color - hardcoded for now
-                       color[0] = 0.6f;
-                       color[1] = 0.5f;
-                       color[2] = 0.5f;
-                       color[3] = 0.3f;
+                       /* greyish-red color */
+                       UI_GetThemeColor4fv(TH_ANIM_INACTIVE, color);
                }
        }
        
@@ -166,17 +157,11 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col
                /* Transition Clip */
                if (strip->flag & NLASTRIP_FLAG_SELECT) {
                        /* selected - use a bright blue color */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.18f;
-                       color[1] = 0.46f;
-                       color[2] = 0.86f;
+                       UI_GetThemeColor3fv(TH_NLA_TRANSITION_SEL, color);
                }
                else {
                        /* normal, unselected strip - use (hardly noticeable) blue tinge */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.11f;
-                       color[1] = 0.15f;
-                       color[2] = 0.19f;
+                       UI_GetThemeColor3fv(TH_NLA_TRANSITION, color);
                }
        }       
        else if (strip->type == NLASTRIP_TYPE_META) {
@@ -184,34 +169,22 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col
                // TODO: should temporary metas get different colors too?
                if (strip->flag & NLASTRIP_FLAG_SELECT) {
                        /* selected - use a bold purple color */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.41f;
-                       color[1] = 0.13f;
-                       color[2] = 0.59f;
+                       UI_GetThemeColor3fv(TH_NLA_META_SEL, color);
                }
                else {
                        /* normal, unselected strip - use (hardly noticeable) dark purple tinge */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.20f;
-                       color[1] = 0.15f;
-                       color[2] = 0.26f;
+                       UI_GetThemeColor3fv(TH_NLA_META, color);
                }
        }
        else if (strip->type == NLASTRIP_TYPE_SOUND) {
                /* Sound Clip */
                if (strip->flag & NLASTRIP_FLAG_SELECT) {
                        /* selected - use a bright teal color */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.12f;
-                       color[1] = 0.48f;
-                       color[2] = 0.48f;
+                       UI_GetThemeColor3fv(TH_NLA_SOUND_SEL, color);
                }
                else {
                        /* normal, unselected strip - use (hardly noticeable) teal tinge */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.17f;
-                       color[1] = 0.24f;
-                       color[2] = 0.24f;
+                       UI_GetThemeColor3fv(TH_NLA_SOUND, color);
                }
        }
        else {
@@ -220,19 +193,13 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col
                        /* active strip should be drawn green when it is acting as the tweaking strip.
                         * however, this case should be skipped for when not in EditMode...
                         */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.3f;
-                       color[1] = 0.95f;
-                       color[2] = 0.1f;
+                       UI_GetThemeColor3fv(TH_NLA_TWEAK, color);
                }
                else if (strip->flag & NLASTRIP_FLAG_TWEAKUSER) {
                        /* alert user that this strip is also used by the tweaking track (this is set when going into
                         * 'editmode' for that strip), since the edits made here may not be what the user anticipated
                         */
-                       // FIXME: hardcoded temp-hack colors
-                       color[0] = 0.85f;
-                       color[1] = 0.0f;
-                       color[2] = 0.0f;
+                       UI_GetThemeColor3fv(TH_NLA_TWEAK_DUPLI, color);
                }
                else if (strip->flag & NLASTRIP_FLAG_SELECT) {
                        /* selected strip - use theme color for selected */
@@ -792,21 +759,24 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                                glEnable(GL_BLEND);
                                
                                /* draw backing strip behind channel name */
+                               // FIXME: hardcoded colors!!!
                                if (group == 5) {
-                                       /* Action Line */
-                                       // TODO: if tweaking some action, use the same color as for the tweaked track (quick hack done for now)
+                                       float color[4];
+                                       
+                                       /* Action Line
+                                        *   The alpha values action_get_color returns are only useful for drawing 
+                                        *   strips backgrounds but here we're doing channel list backgrounds instead
+                                        *   so we ignore that and use our own when needed
+                                        */
+                                       nla_action_get_color(adt, (bAction *)ale->data, color);
+                                       
                                        if (adt && (adt->flag & ADT_NLA_EDIT_ON)) {
-                                               // greenish color (same as tweaking strip) - hardcoded for now
-                                               glColor3f(0.3f, 0.95f, 0.1f);
+                                               /* Yes, the color vector has 4 components, BUT we only want to be using 3 of them! */
+                                               glColor3fv(color);
                                        }
                                        else {
-                                               /* if a track is being solo'd, action is ignored, so draw less boldly (alpha lower) */
-                                               float alpha = (adt && (adt->flag & ADT_NLA_SOLO_TRACK)) ? 0.3f : 1.0f;
-                                               
-                                               if (ale->data)
-                                                       glColor4f(0.8f, 0.2f, 0.0f, alpha);  // reddish color - hardcoded for now
-                                               else
-                                                       glColor4f(0.6f, 0.5f, 0.5f, alpha);  // greyish-red color - hardcoded for now
+                                               float alpha = (adt && (adt->flag & ADT_NLA_SOLO_TRACK)) ? 0.3 : 1.0f;
+                                               glColor4f(color[0], color[1], color[2], alpha);
                                        }
                                        
                                        offset += 7 * indent;
index be2268aa49208603da8f8285a4a6cb40be739b62..f06a2b6f80adf79c9dabd2a655f06cd93501f261 100644 (file)
@@ -263,8 +263,19 @@ typedef struct ThemeSpace {
        char selected_highlight[4];     /* outliner - selected item */
 
        char skin_root[4]; /* Skin modifier root color */
-
+       
        int pad4;
+       
+       /* NLA */
+       char anim_active[4];     /* Active Action + Summary Channel */
+       char anim_non_active[4]; /* Active Action = NULL */
+       
+       char nla_tweaking[4];   /* NLA 'Tweaking' action/strip */
+       char nla_tweakdupli[4]; /* NLA - warning color for duplicate instances of tweaking strip */
+       
+       char nla_transition[4], nla_transition_sel[4]; /* NLA "Transition" strips */
+       char nla_meta[4], nla_meta_sel[4];             /* NLA "Meta" strips */
+       char nla_sound[4], nla_sound_sel[4];           /* NLA "Sound" strips */
 } ThemeSpace;
 
 
index 956b3a15a4c63c0bbb14fb50aaef1ce0e9b821d7..ec215120f0caac4040aa768b3833a6485805c93c 100644 (file)
@@ -1919,6 +1919,12 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
        RNA_def_property_array(prop, 3);
        RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "summary", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "anim_active");
+       RNA_def_property_array(prop, 4);
+       RNA_def_property_ui_text(prop, "Summary", "Color of summary channel");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
 }
 
 static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
@@ -1947,28 +1953,79 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "View Sliders", "");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
        
-       prop = RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR_GAMMA);
-       RNA_def_property_float_sdna(prop, NULL, "shade2");
-       RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Bars", "");
+       prop = RNA_def_property(srna, "active_action", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "anim_active");
+       RNA_def_property_array(prop, 4);
+       RNA_def_property_ui_text(prop, "Active Action", "Animation data block has active action");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
-
-       prop = RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
-       RNA_def_property_float_sdna(prop, NULL, "hilite");
-       RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Bars Selected", "");
+       
+       prop = RNA_def_property(srna, "active_action_unset", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "anim_non_active");
+       RNA_def_property_array(prop, 4);
+       RNA_def_property_ui_text(prop, "No Active Action", "Animation data block doesn't have active action");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+       
        prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
        RNA_def_property_float_sdna(prop, NULL, "strip");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Strips", "");
+       RNA_def_property_ui_text(prop, "Strips", "Action-Clip Strip - Unselected");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+       
        prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
        RNA_def_property_float_sdna(prop, NULL, "strip_select");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Strips Selected", "");
+       RNA_def_property_ui_text(prop, "Strips Selected", "Action-Clip Strip - Selected");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "transition_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_transition");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Transitions", "Transition Strip - Unselected");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "transition_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_transition_sel");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Transitions Selected", "Transition Strip - Selected");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "meta_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_meta");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Meta Strips", "Meta Strip - Unselected. For grouping related strips");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "meta_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_meta_sel");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Meta Strips Selected", "Meta Strip - Selected. For grouping related strips");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "sound_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_sound");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Sound Strips", 
+                                "Sound Strip - Unselected. For timing speaker sounds");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "sound_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_sound_sel");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Sound Strips Selected", 
+                                "Sound Strip - Selected. For timing speaker sounds");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "tweak", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_tweaking");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Tweak", "Color for strip/action being 'tweaked' or edited");
+       RNA_def_property_update(prop, 0, "rna_userdef_update");
+       
+       prop = RNA_def_property(srna, "tweak_duplicate", PROP_FLOAT, PROP_COLOR_GAMMA);
+       RNA_def_property_float_sdna(prop, NULL, "nla_tweakdupli");
+       RNA_def_property_array(prop, 3);
+       RNA_def_property_ui_text(prop, "Tweak Duplicate Flag", 
+                                "Warning/error indicator color for strips referencing the strip being tweaked");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
 
        prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);