Cleanup: strip trailing space in editors
authorCampbell Barton <ideasman42@gmail.com>
Mon, 4 Jun 2018 07:31:30 +0000 (09:31 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 4 Jun 2018 07:31:30 +0000 (09:31 +0200)
261 files changed:
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_deps.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_intern.h
source/blender/editors/animation/anim_ipo_utils.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/animation/keyframes_general.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/BIF_generate.h
source/blender/editors/armature/BIF_retarget.h
source/blender/editors/armature/armature_add.c
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/armature_intern.h
source/blender/editors/armature/armature_naming.c
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/armature_relations.c
source/blender/editors/armature/armature_select.c
source/blender/editors/armature/armature_skinning.c
source/blender/editors/armature/armature_utils.c
source/blender/editors/armature/editarmature_generate.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/pose_edit.c
source/blender/editors/armature/pose_group.c
source/blender/editors/armature/pose_lib.c
source/blender/editors/armature/pose_select.c
source/blender/editors/armature/pose_slide.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/armature/pose_utils.c
source/blender/editors/armature/reeb.c
source/blender/editors/armature/reeb.h
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editcurve_paint.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/editaction_gpencil.c
source/blender/editors/gpencil/gpencil_brush.c
source/blender/editors/gpencil/gpencil_convert.c
source/blender/editors/gpencil/gpencil_data.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_interpolate.c
source/blender/editors/gpencil/gpencil_ops.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/gpencil/gpencil_select.c
source/blender/editors/gpencil/gpencil_undo.c
source/blender/editors/gpencil/gpencil_utils.c
source/blender/editors/include/BIF_gl.h
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_gpencil.h
source/blender/editors/include/ED_keyframes_draw.h
source/blender/editors/include/ED_keyframes_edit.h
source/blender/editors/include/ED_keyframing.h
source/blender/editors/include/ED_markers.h
source/blender/editors/include/ED_screen_types.h
source/blender/editors/include/ED_space_api.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/include/UI_icons.h
source/blender/editors/include/UI_interface.h
source/blender/editors/include/UI_resources.h
source/blender/editors/include/UI_view2d.h
source/blender/editors/io/io_collada.c
source/blender/editors/io/io_ops.c
source/blender/editors/mask/mask_editaction.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_bevel.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/mesh_mirror.c
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/metaball/mball_ops.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_bake_api.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_group.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/particle_boids.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/physics/physics_ops.c
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/physics/rigidbody_world.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_ops.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/render/render_update.c
source/blender/editors/render/render_view.c
source/blender/editors/screen/area.c
source/blender/editors/screen/glutil.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_draw.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_cursor.c
source/blender/editors/sculpt_paint/paint_curve.c
source/blender/editors/sculpt_paint/paint_hide.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_image_2d.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_intern.h
source/blender/editors/sculpt_paint/sculpt_undo.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/space_action/action_buttons.c
source/blender/editors/space_action/action_data.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_intern.h
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_action/space_action.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_intern.h
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/space_clip/tracking_ops_intern.h
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_file/fsmenu.c
source/blender/editors/space_file/fsmenu.h
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_intern.h
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_graph/graph_utils.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_image/image_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_draw.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/info_report.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_info/textview.c
source/blender/editors/space_info/textview.h
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/logic_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_nla/nla_ops.c
source/blender/editors/space_nla/nla_select.c
source/blender/editors/space_nla/space_nla.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_node/node_toolbar.c
source/blender/editors/space_node/node_view.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_script/space_script.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_buttons.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_intern.h
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/sequencer_preview.c
source/blender/editors/space_sequencer/sequencer_scopes.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/sequencer_view.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_format.c
source/blender/editors/space_text/text_format_lua.c
source/blender/editors/space_text/text_format_osl.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_time/time_ops.c
source/blender/editors/space_userpref/space_userpref.c
source/blender/editors/space_view3d/drawanimviz.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawsimdebug.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_project.c
source/blender/editors/space_view3d/view3d_ruler.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/util/ed_util.c
source/blender/editors/uvedit/uvedit_buttons.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_parametrizer.h
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c

index dba060b..304d548 100644 (file)
@@ -116,11 +116,11 @@ static void acf_generic_root_backdrop(bAnimContext *ac, bAnimListElem *ale, floa
        short expanded = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0;
        short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
        float color[3];
-       
+
        /* set backdrop drawing color */
        acf->get_backdrop_color(ac, ale, color);
        glColor3fv(color);
-       
+
        /* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */
        UI_draw_roundbox_corner_set((expanded) ? UI_CNR_TOP_LEFT : (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT));
        UI_draw_roundbox_gl_mode(GL_POLYGON, offset,  yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8);
@@ -141,11 +141,11 @@ static void acf_generic_dataexpand_backdrop(bAnimContext *ac, bAnimListElem *ale
        View2D *v2d = &ac->ar->v2d;
        short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
        float color[3];
-       
+
        /* set backdrop drawing color */
        acf->get_backdrop_color(ac, ale, color);
        glColor3fv(color);
-       
+
        /* no rounded corner - just rectangular box */
        glRectf(offset, yminc,  v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
 }
@@ -154,7 +154,7 @@ static void acf_generic_dataexpand_backdrop(bAnimContext *ac, bAnimListElem *ale
 static bool acf_show_channel_colors(bAnimContext *ac)
 {
        bool showGroupColors = false;
-       
+
        if (ac->sl) {
                switch (ac->spacetype) {
                        case SPACE_ACTION:
@@ -173,7 +173,7 @@ static bool acf_show_channel_colors(bAnimContext *ac)
                        }
                }
        }
-       
+
        return showGroupColors;
 }
 
@@ -184,19 +184,19 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
        bActionGroup *grp = NULL;
        short indent = (acf->get_indent_level) ? acf->get_indent_level(ac, ale) : 0;
        bool showGroupColors = acf_show_channel_colors(ac);
-       
+
        if (ale->type == ANIMTYPE_FCURVE) {
                FCurve *fcu = (FCurve *)ale->data;
                grp = fcu->grp;
        }
-       
-       /* set color for normal channels 
+
+       /* set color for normal channels
         *      - use 3 shades of color group/standard color for 3 indention level
         *      - only use group colors if allowed to, and if actually feasible
         */
        if (showGroupColors && (grp) && (grp->customCol)) {
                unsigned char cp[3];
-               
+
                if (indent == 2) {
                        copy_v3_v3_char((char *)cp, grp->cs.solid);
                }
@@ -206,7 +206,7 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
                else {
                        copy_v3_v3_char((char *)cp, grp->cs.active);
                }
-               
+
                /* copy the colors over, transforming from bytes to floats */
                rgb_uchar_to_float(r_color, cp);
        }
@@ -224,11 +224,11 @@ static void acf_generic_channel_backdrop(bAnimContext *ac, bAnimListElem *ale, f
        View2D *v2d = &ac->ar->v2d;
        short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
        float color[3];
-       
+
        /* set backdrop drawing color */
        acf->get_backdrop_color(ac, ale, color);
        glColor3fv(color);
-       
+
        /* no rounded corners - just rectangular box */
        glRectf(offset, yminc,  v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
 }
@@ -255,16 +255,16 @@ static short acf_generic_indention_2(bAnimContext *ac, bAnimListElem *ale)
 static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListElem *ale)
 {
        short indent = 0;
-       
+
        /* grouped F-Curves need extra level of indention */
        if (ale->type == ANIMTYPE_FCURVE) {
                FCurve *fcu = (FCurve *)ale->data;
-               
+
                // TODO: we need some way of specifying that the indention color should be one less...
                if (fcu->grp)
                        indent++;
        }
-       
+
        /* no indention */
        return indent;
 }
@@ -273,7 +273,7 @@ static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListE
 static short acf_generic_basic_offset(bAnimContext *ac, bAnimListElem *ale)
 {
        const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
-       
+
        if (acf && acf->get_indent_level)
                return acf->get_indent_level(ac, ale) * INDENT_STEP_SIZE;
        else
@@ -286,21 +286,21 @@ static short acf_nodetree_rootType_offset(bNodeTree *ntree)
        if (ntree) {
                switch (ntree->type) {
                        case NTREE_SHADER:
-                               /* 1 additional level (i.e. is indented one level in from material, 
-                                * so shift all right by one step) 
+                               /* 1 additional level (i.e. is indented one level in from material,
+                                * so shift all right by one step)
                                 */
-                               return INDENT_STEP_SIZE; 
-                               
+                               return INDENT_STEP_SIZE;
+
                        case NTREE_COMPOSIT:
                                /* no additional levels needed */
-                               return 0; 
-                               
+                               return 0;
+
                        case NTREE_TEXTURE:
                                /* 2 additional levels */
                                return INDENT_STEP_SIZE * 2;
                }
        }
-       
+
        /* unknown */
        return 0;
 }
@@ -309,7 +309,7 @@ static short acf_nodetree_rootType_offset(bNodeTree *ntree)
 static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
 {
        short offset = acf_generic_basic_offset(ac, ale);
-       
+
        if (ale->id) {
                /* texture animdata */
                if (GS(ale->id->name) == ID_TE) {
@@ -318,17 +318,17 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
                /* materials and particles animdata */
                else if (ELEM(GS(ale->id->name), ID_MA, ID_PA))
                        offset += (short)(0.7f * U.widget_unit);
-                       
+
                /* if not in Action Editor mode, action-groups (and their children) must carry some offset too... */
                else if (ac->datatype != ANIMCONT_ACTION)
                        offset += (short)(0.7f * U.widget_unit);
-                       
+
                /* nodetree animdata */
                if (GS(ale->id->name) == ID_NT) {
                        offset += acf_nodetree_rootType_offset((bNodeTree *)ale->id);
                }
        }
-       
+
        /* offset is just the normal type - i.e. based on indention */
        return offset;
 }
@@ -339,7 +339,7 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
 static void acf_generic_idblock_name(bAnimListElem *ale, char *name)
 {
        ID *id = (ID *)ale->data;    /* data pointed to should be an ID block */
-       
+
        /* just copy the name... */
        if (id && name)
                BLI_strncpy(name, id->name + 2, ANIM_CHAN_NAME_SIZE);
@@ -350,7 +350,7 @@ static bool acf_generic_idblock_name_prop(bAnimListElem *ale, PointerRNA *ptr, P
 {
        RNA_id_pointer_create(ale->data, ptr);
        *prop = RNA_struct_name_property(ptr->type);
-       
+
        return (*prop != NULL);
 }
 
@@ -361,7 +361,7 @@ static bool acf_generic_idfill_name_prop(bAnimListElem *ale, PointerRNA *ptr, Pr
        /* actual ID we're representing is stored in ale->data not ale->id, as id gives the owner */
        RNA_id_pointer_create(ale->data, ptr);
        *prop = RNA_struct_name_property(ptr->type);
-       
+
        return (*prop != NULL);
 }
 
@@ -382,11 +382,11 @@ static bool acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListElem
                /* expand is always supported */
                case ACHANNEL_SETTING_EXPAND:
                        return true;
-                       
+
                /* mute is only supported for NLA */
                case ACHANNEL_SETTING_MUTE:
                        return ((ac) && (ac->spacetype == SPACE_NLA));
-                       
+
                /* select is ok for most "ds*" channels (e.g. dsmat) */
                case ACHANNEL_SETTING_SELECT:
                        return true;
@@ -418,14 +418,14 @@ static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float ymi
        const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
        View2D *v2d = &ac->ar->v2d;
        float color[3];
-       
+
        /* set backdrop drawing color */
        acf->get_backdrop_color(ac, ale, color);
        glColor3fv(color);
-       
-       /* rounded corners on LHS only 
-        *      - top and bottom 
-        *      - special hack: make the top a bit higher, since we are first... 
+
+       /* rounded corners on LHS only
+        *      - top and bottom
+        *      - special hack: make the top a bit higher, since we are first...
         */
        UI_draw_roundbox_corner_set(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT);
        UI_draw_roundbox_gl_mode(GL_POLYGON, 0,  yminc - 2, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8);
@@ -470,14 +470,14 @@ static int acf_summary_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
 static void *acf_summary_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        bAnimContext *ac = (bAnimContext *)ale->data;
-       
-       /* if data is valid, return pointer to active dopesheet's relevant flag 
+
+       /* if data is valid, return pointer to active dopesheet's relevant flag
         *      - this is restricted to DopeSheet/Action Editor only
         */
        if ((ac->sl) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) {
                SpaceAction *saction = (SpaceAction *)ac->sl;
                bDopeSheet *ads = &saction->ads;
-               
+
                /* return pointer to DopeSheet's flag */
                return GET_ACF_FLAG_PTR(ads->flag, type);
        }
@@ -489,7 +489,7 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings s
 }
 
 /* all animation summary (DopeSheet only) type define */
-static bAnimChannelType ACF_SUMMARY = 
+static bAnimChannelType ACF_SUMMARY =
 {
        "Summary",                          /* type name */
        ACHANNEL_ROLE_EXPANDER,             /* role */
@@ -521,13 +521,13 @@ static bool acf_scene_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale)
 {
        switch (setting) {
                /* muted only in NLA */
-               case ACHANNEL_SETTING_MUTE: 
+               case ACHANNEL_SETTING_MUTE:
                        return ((ac) && (ac->spacetype == SPACE_NLA));
-                       
+
                /* visible only in Graph Editor */
-               case ACHANNEL_SETTING_VISIBLE: 
+               case ACHANNEL_SETTING_VISIBLE:
                        return ((ac) && (ac->spacetype == SPACE_IPO));
-               
+
                /* only select and expand supported otherwise */
                case ACHANNEL_SETTING_SELECT:
                case ACHANNEL_SETTING_EXPAND:
@@ -546,18 +546,18 @@ static int acf_scene_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return SCE_DS_SELECTED;
-                       
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        *neg = true;
                        return SCE_DS_COLLAPSED;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
@@ -571,30 +571,30 @@ static int acf_scene_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_scene_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Scene *scene = (Scene *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return GET_ACF_FLAG_PTR(scene->flag, type);
-                       
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(scene->flag, type);
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (scene->adt)
                                return GET_ACF_FLAG_PTR(scene->adt->flag, type);
                        return NULL;
-                       
+
                default: /* unsupported */
                        return NULL;
        }
 }
 
 /* scene type define */
-static bAnimChannelType ACF_SCENE = 
+static bAnimChannelType ACF_SCENE =
 {
        "Scene",                        /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
@@ -619,30 +619,30 @@ static int acf_object_icon(bAnimListElem *ale)
 {
        Base *base = (Base *)ale->data;
        Object *ob = base->object;
-       
+
        /* icon depends on object-type */
        switch (ob->type) {
                case OB_LAMP:
                        return ICON_OUTLINER_OB_LAMP;
-               case OB_MESH: 
+               case OB_MESH:
                        return ICON_OUTLINER_OB_MESH;
-               case OB_CAMERA: 
+               case OB_CAMERA:
                        return ICON_OUTLINER_OB_CAMERA;
-               case OB_CURVE: 
+               case OB_CURVE:
                        return ICON_OUTLINER_OB_CURVE;
-               case OB_MBALL: 
+               case OB_MBALL:
                        return ICON_OUTLINER_OB_META;
-               case OB_LATTICE: 
+               case OB_LATTICE:
                        return ICON_OUTLINER_OB_LATTICE;
                case OB_SPEAKER:
                        return ICON_OUTLINER_OB_SPEAKER;
                case OB_ARMATURE:
                        return ICON_OUTLINER_OB_ARMATURE;
-               case OB_FONT: 
+               case OB_FONT:
                        return ICON_OUTLINER_OB_FONT;
-               case OB_SURF: 
+               case OB_SURF:
                        return ICON_OUTLINER_OB_SURFACE;
-               case OB_EMPTY: 
+               case OB_EMPTY:
                        return ICON_OUTLINER_OB_EMPTY;
                default:
                        return ICON_OBJECT_DATA;
@@ -654,7 +654,7 @@ static void acf_object_name(bAnimListElem *ale, char *name)
 {
        Base *base = (Base *)ale->data;
        Object *ob = base->object;
-       
+
        /* just copy the name... */
        if (ob && name)
                BLI_strncpy(name, ob->id.name + 2, ANIM_CHAN_NAME_SIZE);
@@ -665,7 +665,7 @@ static bool acf_object_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyRN
 {
        RNA_id_pointer_create(ale->id, ptr);
        *prop = RNA_struct_name_property(ptr->type);
-       
+
        return (*prop != NULL);
 }
 
@@ -674,16 +674,16 @@ static bool acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, eAnim
 {
        Base *base = (Base *)ale->data;
        Object *ob = base->object;
-       
+
        switch (setting) {
                /* muted only in NLA */
-               case ACHANNEL_SETTING_MUTE: 
+               case ACHANNEL_SETTING_MUTE:
                        return ((ac) && (ac->spacetype == SPACE_NLA));
-                       
+
                /* visible only in Graph Editor */
-               case ACHANNEL_SETTING_VISIBLE: 
+               case ACHANNEL_SETTING_VISIBLE:
                        return ((ac) && (ac->spacetype == SPACE_IPO) && (ob->adt));
-               
+
                /* only select and expand supported otherwise */
                case ACHANNEL_SETTING_SELECT:
                case ACHANNEL_SETTING_EXPAND:
@@ -702,18 +702,18 @@ static int acf_object_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return SELECT;
-                       
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        *neg = 1;
                        return OB_ADS_COLLAPSED;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
@@ -731,17 +731,17 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings se
 {
        Base *base = (Base *)ale->data;
        Object *ob = base->object;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return GET_ACF_FLAG_PTR(ob->flag, type);
-                       
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(ob->nlaflag, type); // xxx
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                case ACHANNEL_SETTING_ALWAYS_VISIBLE:
@@ -755,11 +755,11 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings se
 }
 
 /* object type define */
-static bAnimChannelType ACF_OBJECT = 
+static bAnimChannelType ACF_OBJECT =
 {
        "Object",                       /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_root_color,         /* backdrop color */
        acf_generic_root_backdrop,      /* backdrop */
        acf_generic_indention_0,        /* indent level */
@@ -781,16 +781,16 @@ static void acf_group_color(bAnimContext *ac, bAnimListElem *ale, float r_color[
 {
        bActionGroup *agrp = (bActionGroup *)ale->data;
        bool showGroupColors = acf_show_channel_colors(ac);
-       
+
        if (showGroupColors && agrp->customCol) {
                unsigned char cp[3];
-               
+
                /* highlight only for active */
                if (ale->flag & AGRP_ACTIVE)
                        copy_v3_v3_char((char *)cp, agrp->cs.select);
                else
                        copy_v3_v3_char((char *)cp, agrp->cs.solid);
-               
+
                /* copy the colors over, transforming from bytes to floats */
                rgb_uchar_to_float(r_color, cp);
        }
@@ -811,11 +811,11 @@ static void acf_group_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc
        short expanded = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0;
        short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
        float color[3];
-       
+
        /* set backdrop drawing color */
        acf->get_backdrop_color(ac, ale, color);
        glColor3fv(color);
-       
+
        /* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */
        UI_draw_roundbox_corner_set(expanded ? UI_CNR_TOP_LEFT : (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT));
        UI_draw_roundbox_gl_mode(GL_POLYGON, offset,  yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8);
@@ -825,7 +825,7 @@ static void acf_group_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc
 static void acf_group_name(bAnimListElem *ale, char *name)
 {
        bActionGroup *agrp = (bActionGroup *)ale->data;
-       
+
        /* just copy the name... */
        if (agrp && name)
                BLI_strncpy(name, agrp->name, ANIM_CHAN_NAME_SIZE);
@@ -836,7 +836,7 @@ static bool acf_group_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyRNA
 {
        RNA_pointer_create(ale->id, &RNA_ActionGroup, ale->data, ptr);
        *prop = RNA_struct_name_property(ptr->type);
-       
+
        return (*prop != NULL);
 }
 
@@ -848,7 +848,7 @@ static bool acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale)
                /* unsupported */
                case ACHANNEL_SETTING_SOLO:    /* Only available in NLA Editor for tracks */
                        return false;
-               
+
                /* conditionally supported */
                case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
                        return (ac->spacetype == SPACE_IPO);
@@ -866,22 +866,22 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return AGRP_SELECTED;
-                       
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                {
                        /* NOTE: Graph Editor uses a different flag to everywhere else for this,
                         * allowing different collapsing of groups there, since sharing the flag
                         * proved to be a hazard for workflows...
                         */
-                       return (ac->spacetype == SPACE_IPO) ? 
+                       return (ac->spacetype == SPACE_IPO) ?
                               AGRP_EXPANDED_G :        /* Graph Editor case */
                               AGRP_EXPANDED;           /* DopeSheet and elsewhere */
                }
-                       
+
                case ACHANNEL_SETTING_MUTE: /* muted */
                        return AGRP_MUTED;
 
@@ -891,7 +891,7 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin
 
                case ACHANNEL_SETTING_PROTECT: /* protected */
                        return AGRP_PROTECTED;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visibility - graph editor */
                        *neg = 1;
                        return AGRP_NOTVISIBLE;
@@ -909,17 +909,17 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin
 static void *acf_group_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type)
 {
        bActionGroup *agrp = (bActionGroup *)ale->data;
-       
+
        /* all flags are just in agrp->flag for now... */
        return GET_ACF_FLAG_PTR(agrp->flag, type);
 }
 
 /* group type define */
-static bAnimChannelType ACF_GROUP = 
+static bAnimChannelType ACF_GROUP =
 {
        "Group",                        /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_group_color,                /* backdrop color */
        acf_group_backdrop,             /* backdrop */
        acf_generic_indention_0,        /* indent level */
@@ -946,9 +946,9 @@ static void acf_fcurve_name(bAnimListElem *ale, char *name)
 static bool acf_fcurve_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyRNA **prop)
 {
        FCurve *fcu = (FCurve *)ale->data;
-       
-       /* Ctrl-Click Usability Convenience Hack: 
-        * For disabled F-Curves, allow access to the RNA Path 
+
+       /* Ctrl-Click Usability Convenience Hack:
+        * For disabled F-Curves, allow access to the RNA Path
         * as our "name" so that user can perform quick fixes
         */
        if (fcu->flag & FCURVE_DISABLED) {
@@ -959,7 +959,7 @@ static bool acf_fcurve_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyRN
                /* for "normal" F-Curves - no editable name, but *prop may not be set properly yet... */
                *prop = NULL;
        }
-       
+
        return (*prop != NULL);
 }
 
@@ -967,21 +967,21 @@ static bool acf_fcurve_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyRN
 static bool acf_fcurve_setting_valid(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
 {
        FCurve *fcu = (FCurve *)ale->data;
-       
+
        switch (setting) {
                /* unsupported */
                case ACHANNEL_SETTING_SOLO:   /* Solo Flag is only for NLA */
                case ACHANNEL_SETTING_EXPAND: /* F-Curves are not containers */
                case ACHANNEL_SETTING_PINNED: /* This is only for NLA Actions */
                        return false;
-               
+
                /* conditionally available */
                case ACHANNEL_SETTING_PROTECT: /* Protection is only valid when there's keyframes */
                        if (fcu->bezt)
                                return true;
                        else
                                return false;  // NOTE: in this special case, we need to draw ICON_ZOOMOUT
-                               
+
                case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
                        return (ac->spacetype == SPACE_IPO);
 
@@ -999,20 +999,20 @@ static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return FCURVE_SELECTED;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* muted */
                        return FCURVE_MUTED;
-                       
+
                case ACHANNEL_SETTING_PROTECT: /* protected */
                        return FCURVE_PROTECTED;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visibility - graph editor */
                        return FCURVE_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_MOD_OFF:
                        *neg = 1;
                        return FCURVE_MOD_OFF;
@@ -1026,17 +1026,17 @@ static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 static void *acf_fcurve_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type)
 {
        FCurve *fcu = (FCurve *)ale->data;
-       
+
        /* all flags are just in agrp->flag for now... */
        return GET_ACF_FLAG_PTR(fcu->flag, type);
 }
 
 /* fcurve type define */
-static bAnimChannelType ACF_FCURVE = 
+static bAnimChannelType ACF_FCURVE =
 {
        "F-Curve",                      /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_generic_channel_color,      /* backdrop color */
        acf_generic_channel_backdrop,   /* backdrop */
        acf_generic_indention_flexible, /* indent level */      // xxx rename this to f-curves only?
@@ -1068,11 +1068,11 @@ static void acf_nla_controls_backdrop(bAnimContext *ac, bAnimListElem *ale, floa
        short expanded = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0;
        short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
        float color[3];
-       
+
        /* set backdrop drawing color */
        acf->get_backdrop_color(ac, ale, color);
        glColor3fv(color);
-       
+
        /* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */
        UI_draw_roundbox_corner_set(expanded ? UI_CNR_TOP_LEFT : (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT));
        UI_draw_roundbox_gl_mode(GL_POLYGON, offset,  yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 5);
@@ -1092,9 +1092,9 @@ static bool acf_nla_controls_setting_valid(bAnimContext *UNUSED(ac), bAnimListEl
                /* supported */
                case ACHANNEL_SETTING_EXPAND:
                        return true;
-               
+
                // TOOD: selected?
-               
+
                default: /* unsupported */
                        return false;
        }
@@ -1105,12 +1105,12 @@ static int acf_nla_controls_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        *neg = true;
                        return ADT_NLA_SKEYS_COLLAPSED;
-               
+
                default:
                        /* this shouldn't happen */
                        return 0;
@@ -1121,7 +1121,7 @@ static int acf_nla_controls_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_
 static void *acf_nla_controls_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type)
 {
        AnimData *adt = (AnimData *)ale->data;
-       
+
        /* all flags are just in adt->flag for now... */
        return GET_ACF_FLAG_PTR(adt->flag, type);
 }
@@ -1132,11 +1132,11 @@ static int acf_nla_controls_icon(bAnimListElem *UNUSED(ale))
 }
 
 /* NLA Control FCurves Expander type define */
-static bAnimChannelType ACF_NLACONTROLS = 
+static bAnimChannelType ACF_NLACONTROLS =
 {
        "NLA Controls Expander",        /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_nla_controls_color,         /* backdrop color */
        acf_nla_controls_backdrop,      /* backdrop */
        acf_generic_indention_0,        /* indent level */
@@ -1160,7 +1160,7 @@ static void acf_nla_curve_name(bAnimListElem *ale, char *name)
        NlaStrip *strip = ale->owner;
        FCurve *fcu = ale->data;
        PropertyRNA *prop;
-       
+
        /* try to get RNA property that this shortened path (relative to the strip) refers to */
        prop = RNA_struct_type_find_property(&RNA_NlaStrip, fcu->rna_path);
        if (prop) {
@@ -1175,11 +1175,11 @@ static void acf_nla_curve_name(bAnimListElem *ale, char *name)
 
 
 /* NLA Control F-Curve type define */
-static bAnimChannelType ACF_NLACURVE = 
+static bAnimChannelType ACF_NLACURVE =
 {
        "NLA Control F-Curve",          /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_generic_channel_color,      /* backdrop color */
        acf_generic_channel_backdrop,   /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1210,7 +1210,7 @@ static bool acf_fillactd_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *
                case ACHANNEL_SETTING_SELECT:
                case ACHANNEL_SETTING_EXPAND:
                        return true;
-                       
+
                default:
                        return false;
        }
@@ -1221,15 +1221,15 @@ static int acf_fillactd_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Sett
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-                       
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        *neg = true;
                        return ACT_COLLAPSED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1240,10 +1240,10 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings
 {
        bAction *act = (bAction *)ale->data;
        AnimData *adt = ale->adt;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        if (adt) {
@@ -1253,18 +1253,18 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings
 
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(act->flag, type);
-               
+
                default: /* unsupported */
                        return NULL;
        }
 }
 
 /* object action expander type define */
-static bAnimChannelType ACF_FILLACTD = 
+static bAnimChannelType ACF_FILLACTD =
 {
        "Ob-Action Filler",             /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1300,7 +1300,7 @@ static bool acf_filldrivers_setting_valid(bAnimContext *UNUSED(ac), bAnimListEle
                /* only expand supported */
                case ACHANNEL_SETTING_EXPAND:
                        return true;
-                       
+
                default:
                        return false;
        }
@@ -1311,12 +1311,12 @@ static int acf_filldrivers_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_S
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        *neg = true;
                        return ADT_DRIVERS_COLLAPSED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1326,25 +1326,25 @@ static int acf_filldrivers_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_S
 static void *acf_filldrivers_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        AnimData *adt = (AnimData *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(adt->flag, type);
-               
+
                default: /* unsupported */
                        return NULL;
        }
 }
 
 /* drivers expander type define */
-static bAnimChannelType ACF_FILLDRIVERS = 
+static bAnimChannelType ACF_FILLDRIVERS =
 {
        "Drivers Filler",               /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1373,21 +1373,21 @@ static int acf_dsmat_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return MA_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1397,14 +1397,14 @@ static int acf_dsmat_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dsmat_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Material *ma = (Material *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(ma->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
@@ -1422,7 +1422,7 @@ static bAnimChannelType ACF_DSMAT =
 {
        "Material Data Expander",       /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1450,21 +1450,21 @@ static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return LA_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1474,21 +1474,21 @@ static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dslam_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Lamp *la = (Lamp *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(la->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (la->adt)
                                return GET_ACF_FLAG_PTR(la->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -1499,7 +1499,7 @@ static bAnimChannelType ACF_DSLAM =
 {
        "Lamp Expander",                /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1534,21 +1534,21 @@ static int acf_dstex_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return TEX_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1558,21 +1558,21 @@ static int acf_dstex_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dstex_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Tex *tex = (Tex *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(tex->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (tex->adt)
                                return GET_ACF_FLAG_PTR(tex->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -1583,7 +1583,7 @@ static bAnimChannelType ACF_DSTEX =
 {
        "Texture Data Expander",        /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1693,18 +1693,18 @@ static int acf_dscam_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return CAM_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
 
@@ -1720,14 +1720,14 @@ static int acf_dscam_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dscam_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Camera *ca = (Camera *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(ca->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
@@ -1735,7 +1735,7 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings set
                        if (ca->adt)
                                return GET_ACF_FLAG_PTR(ca->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -1746,7 +1746,7 @@ static bAnimChannelType ACF_DSCAM =
 {
        "Camera Expander",              /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1768,7 +1768,7 @@ static int acf_dscur_icon(bAnimListElem *ale)
 {
        Curve *cu = (Curve *)ale->data;
        short obtype = BKE_curve_type_get(cu);
-       
+
        switch (obtype) {
                case OB_FONT:
                        return ICON_FONT_DATA;
@@ -1784,21 +1784,21 @@ static int acf_dscur_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return CU_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1808,21 +1808,21 @@ static int acf_dscur_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dscur_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Curve *cu = (Curve *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(cu->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (cu->adt)
                                return GET_ACF_FLAG_PTR(cu->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -1833,7 +1833,7 @@ static bAnimChannelType ACF_DSCUR =
 {
        "Curve Expander",               /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1861,21 +1861,21 @@ static int acf_dsskey_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return KEY_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1885,21 +1885,21 @@ static int acf_dsskey_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 static void *acf_dsskey_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Key *key = (Key *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(key->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (key->adt)
                                return GET_ACF_FLAG_PTR(key->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -1910,7 +1910,7 @@ static bAnimChannelType ACF_DSSKEY =
 {
        "Shape Key Expander",           /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -1938,21 +1938,21 @@ static int acf_dswor_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return WO_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -1962,21 +1962,21 @@ static int acf_dswor_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dswor_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        World *wo = (World *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(wo->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (wo->adt)
                                return GET_ACF_FLAG_PTR(wo->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -1987,7 +1987,7 @@ static bAnimChannelType ACF_DSWOR =
 {
        "World Expander",               /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -2015,21 +2015,21 @@ static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return PART_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -2039,21 +2039,21 @@ static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 static void *acf_dspart_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        ParticleSettings *part = (ParticleSettings *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(part->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (part->adt)
                                return GET_ACF_FLAG_PTR(part->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2064,7 +2064,7 @@ static bAnimChannelType ACF_DSPART =
 {
        "Particle Data Expander",       /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -2092,21 +2092,21 @@ static int acf_dsmball_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return MB_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-               
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -2116,21 +2116,21 @@ static int acf_dsmball_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
 static void *acf_dsmball_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        MetaBall *mb = (MetaBall *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(mb->flag2, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (mb->adt)
                                return GET_ACF_FLAG_PTR(mb->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2141,7 +2141,7 @@ static bAnimChannelType ACF_DSMBALL =
 {
        "Metaball Expander",            /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -2169,21 +2169,21 @@ static int acf_dsarm_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return ARM_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -2193,21 +2193,21 @@ static int acf_dsarm_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dsarm_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        bArmature *arm = (bArmature *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(arm->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (arm->adt)
                                return GET_ACF_FLAG_PTR(arm->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2218,7 +2218,7 @@ static bAnimChannelType ACF_DSARM =
 {
        "Armature Expander",            /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -2246,9 +2246,9 @@ static short acf_dsntree_offset(bAnimContext *ac, bAnimListElem *ale)
 {
        bNodeTree *ntree = (bNodeTree *)ale->data;
        short offset = acf_generic_basic_offset(ac, ale);
-       
-       offset += acf_nodetree_rootType_offset(ntree); 
-       
+
+       offset += acf_nodetree_rootType_offset(ntree);
+
        return offset;
 }
 
@@ -2257,21 +2257,21 @@ static int acf_dsntree_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return NTREE_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-                       
+
                default: /* unsupported */
                        return 0;
        }
@@ -2281,21 +2281,21 @@ static int acf_dsntree_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
 static void *acf_dsntree_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        bNodeTree *ntree = (bNodeTree *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(ntree->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (ntree->adt)
                                return GET_ACF_FLAG_PTR(ntree->adt->flag, type);
                        return NULL;
-                       
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2306,7 +2306,7 @@ static bAnimChannelType ACF_DSNTREE =
 {
        "Node Tree Expander",           /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -2334,21 +2334,21 @@ static int acf_dslinestyle_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_S
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return LS_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-                       
+
                default: /* unsupported */
                        return 0;
        }
@@ -2358,21 +2358,21 @@ static int acf_dslinestyle_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_S
 static void *acf_dslinestyle_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        FreestyleLineStyle *linestyle = (FreestyleLineStyle *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(linestyle->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (linestyle->adt)
                                return GET_ACF_FLAG_PTR(linestyle->adt->flag, type);
                        return NULL;
-                       
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2383,16 +2383,16 @@ static bAnimChannelType ACF_DSLINESTYLE =
 {
        "Line Style Expander",                  /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop,/* backdrop */
        acf_generic_indention_1,                /* indent level */
        acf_generic_basic_offset,               /* offset */
-       
+
        acf_generic_idblock_name,               /* name */
        acf_generic_idblock_name_prop,  /* name prop */
        acf_dslinestyle_icon,                   /* icon */
-       
+
        acf_generic_dataexpand_setting_valid,   /* has setting */
        acf_dslinestyle_setting_flag,                   /* flag for setting */
        acf_dslinestyle_setting_ptr                             /* pointer for setting */
@@ -2411,21 +2411,21 @@ static int acf_dsmesh_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return ME_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-                       
+
                default: /* unsupported */
                        return 0;
        }
@@ -2435,21 +2435,21 @@ static int acf_dsmesh_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
 static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Mesh *me = (Mesh *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(me->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (me->adt)
                                return GET_ACF_FLAG_PTR(me->adt->flag, type);
                        return NULL;
-                       
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2460,7 +2460,7 @@ static bAnimChannelType ACF_DSMESH =
 {
        "Mesh Expander",                /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */      // XXX this only works for compositing
@@ -2488,21 +2488,21 @@ static int acf_dslat_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return LT_DS_EXPAND;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-                       
+
                default: /* unsupported */
                        return 0;
        }
@@ -2512,21 +2512,21 @@ static int acf_dslat_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dslat_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Lattice *lt = (Lattice *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(lt->flag, type);
-                       
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (lt->adt)
                                return GET_ACF_FLAG_PTR(lt->adt->flag, type);
                        return NULL;
-                       
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2537,7 +2537,7 @@ static bAnimChannelType ACF_DSLAT =
 {
        "Lattice Expander",             /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */      // XXX this only works for compositing
@@ -2565,21 +2565,21 @@ static int acf_dsspk_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return SPK_DS_EXPAND;
-               
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-               
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-               
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -2589,21 +2589,21 @@ static int acf_dsspk_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting
 static void *acf_dsspk_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        Speaker *spk = (Speaker *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(spk->flag, type);
-               
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (spk->adt)
                                return GET_ACF_FLAG_PTR(spk->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2614,7 +2614,7 @@ static bAnimChannelType ACF_DSSPK =
 {
        "Speaker Expander",             /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -2642,21 +2642,21 @@ static int acf_dsgpencil_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Set
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GP_DATA_EXPAND;
-               
+
                case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
                        return ADT_NLA_EVAL_OFF;
-               
+
                case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
                        *neg = true;
                        return ADT_CURVES_NOT_VISIBLE;
-               
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return ADT_UI_SELECTED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -2666,21 +2666,21 @@ static int acf_dsgpencil_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Set
 static void *acf_dsgpencil_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        bGPdata *gpd = (bGPdata *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GET_ACF_FLAG_PTR(gpd->flag, type);
-               
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
                case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
                        if (gpd->adt)
                                return GET_ACF_FLAG_PTR(gpd->adt->flag, type);
                        return NULL;
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2691,7 +2691,7 @@ static bAnimChannelType ACF_DSGPENCIL =
 {
        "GPencil DS Expander",          /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_generic_dataexpand_color,   /* backdrop color */
        acf_generic_dataexpand_backdrop, /* backdrop */
        acf_generic_indention_1,        /* indent level */
@@ -2790,7 +2790,7 @@ static bAnimChannelType ACF_DSMCLIP =
 static void acf_shapekey_name(bAnimListElem *ale, char *name)
 {
        KeyBlock *kb = (KeyBlock *)ale->data;
-       
+
        /* just copy the name... */
        if (kb && name) {
                /* if the KeyBlock had a name, use it, otherwise use the index */
@@ -2805,15 +2805,15 @@ static void acf_shapekey_name(bAnimListElem *ale, char *name)
 static bool acf_shapekey_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyRNA **prop)
 {
        KeyBlock *kb = (KeyBlock *)ale->data;
-       
+
        /* if the KeyBlock had a name, use it, otherwise use the index */
        if (kb && kb->name[0]) {
                RNA_pointer_create(ale->id, &RNA_ShapeKey, kb, ptr);
                *prop = RNA_struct_name_property(ptr->type);
-               
+
                return (*prop != NULL);
        }
-       
+
        return false;
 }
 
@@ -2825,7 +2825,7 @@ static bool acf_shapekey_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *
                case ACHANNEL_SETTING_MUTE: /* muted */
                case ACHANNEL_SETTING_PROTECT: /* protected */
                        return true;
-                       
+
                /* nothing else is supported */
                default:
                        return false;
@@ -2837,17 +2837,17 @@ static int acf_shapekey_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Sett
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_MUTE: /* mute */
                        return KEYBLOCK_MUTE;
-               
+
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return KEYBLOCK_SEL;
-               
+
                case ACHANNEL_SETTING_PROTECT: /* locked */
                        return KEYBLOCK_LOCKED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -2857,16 +2857,16 @@ static int acf_shapekey_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Sett
 static void *acf_shapekey_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
 {
        KeyBlock *kb = (KeyBlock *)ale->data;
-       
+
        /* clear extra return data first */
        *type = 0;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                case ACHANNEL_SETTING_MUTE: /* muted */
                case ACHANNEL_SETTING_PROTECT: /* protected */
                        return GET_ACF_FLAG_PTR(kb->flag, type);
-               
+
                default: /* unsupported */
                        return NULL;
        }
@@ -2877,7 +2877,7 @@ static bAnimChannelType ACF_SHAPEKEY =
 {
        "Shape Key",                    /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_generic_channel_color,      /* backdrop color */
        acf_generic_channel_backdrop,   /* backdrop */
        acf_generic_indention_0,        /* indent level */
@@ -2915,7 +2915,7 @@ static bool acf_gpd_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSE
                case ACHANNEL_SETTING_SELECT:
                case ACHANNEL_SETTING_EXPAND:
                        return true;
-                       
+
                default:
                        return false;
        }
@@ -2926,14 +2926,14 @@ static int acf_gpd_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return AGRP_SELECTED;
-                       
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return GP_DATA_EXPAND;
-               
+
                default:
                        /* these shouldn't happen */
                        return 0;
@@ -2944,17 +2944,17 @@ static int acf_gpd_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
 static void *acf_gpd_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type)
 {
        bGPdata *gpd = (bGPdata *)ale->data;
-       
+
        /* all flags are just in gpd->flag for now... */
        return GET_ACF_FLAG_PTR(gpd->flag, type);
 }
 
 /* gpencil datablock type define */
-static bAnimChannelType ACF_GPD = 
+static bAnimChannelType ACF_GPD =
 {
        "GPencil Datablock",            /* type name */
        ACHANNEL_ROLE_EXPANDER,         /* role */
-       
+
        acf_gpd_color,                  /* backdrop color */
        acf_group_backdrop,             /* backdrop */
        acf_generic_indention_0,        /* indent level */
@@ -2975,7 +2975,7 @@ static bAnimChannelType ACF_GPD =
 static void acf_gpl_name(bAnimListElem *ale, char *name)
 {
        bGPDlayer *gpl = (bGPDlayer *)ale->data;
-       
+
        if (gpl && name)
                BLI_strncpy(name, gpl->info, ANIM_CHAN_NAME_SIZE);
 }
@@ -2986,10 +2986,10 @@ static bool acf_gpl_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyRNA *
        if (ale->data) {
                RNA_pointer_create(ale->id, &RNA_GPencilLayer, ale->data, ptr);
                *prop = RNA_struct_name_property(ptr->type);
-               
+
                return (*prop != NULL);
        }
-       
+
        return false;
 }
 
@@ -3001,7 +3001,7 @@ static bool acf_gpl_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSE
                case ACHANNEL_SETTING_EXPAND: /* gpencil layers are more like F-Curves than groups */
                case ACHANNEL_SETTING_SOLO: /* nla editor only */
                        return false;
-               
+
                /* always available */
                default:
                        return true;
@@ -3013,21 +3013,21 @@ static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return GP_LAYER_SELECT;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* animation muting - similar to frame lock... */
                        return GP_LAYER_FRAMELOCK;
-                       
+
                case ACHANNEL_SETTING_VISIBLE: /* visiblity of the layers (NOT muting) */
                        *neg = true;
                        return GP_LAYER_HIDE;
-                       
+
                case ACHANNEL_SETTING_PROTECT: /* protected */
                        return GP_LAYER_LOCKED;
-                       
+
                default: /* unsupported */
                        return 0;
        }
@@ -3037,26 +3037,26 @@ static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
 static void *acf_gpl_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type)
 {
        bGPDlayer *gpl = (bGPDlayer *)ale->data;
-       
+
        /* all flags are just in gpl->flag for now... */
        return GET_ACF_FLAG_PTR(gpl->flag, type);
 }
 
 /* grease pencil layer type define */
-static bAnimChannelType ACF_GPL = 
+static bAnimChannelType ACF_GPL =
 {
        "GPencil Layer",                /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_generic_channel_color,      /* backdrop color */
        acf_generic_channel_backdrop,   /* backdrop */
        acf_generic_indention_flexible, /* indent level */
        acf_generic_group_offset,       /* offset */
-       
+
        acf_gpl_name,                   /* name */
        acf_gpl_name_prop,              /* name prop */
        NULL,                           /* icon */
-       
+
        acf_gpl_setting_valid,          /* has setting */
        acf_gpl_setting_flag,           /* flag for setting */
        acf_gpl_setting_ptr             /* pointer for setting */
@@ -3086,7 +3086,7 @@ static bool acf_mask_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUS
                case ACHANNEL_SETTING_SELECT:
                case ACHANNEL_SETTING_EXPAND:
                        return true;
-               
+
                default:
                        return false;
        }
@@ -3097,15 +3097,15 @@ static int acf_mask_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return AGRP_SELECTED;
-               
+
                case ACHANNEL_SETTING_EXPAND: /* expanded */
                        return MASK_ANIMF_EXPAND;
-                       
-               default:        
+
+               default:
                        /* this shouldn't happen */
                        return 0;
        }
@@ -3115,7 +3115,7 @@ static int acf_mask_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
 static void *acf_mask_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type)
 {
        Mask *mask = (Mask *)ale->data;
-       
+
        /* all flags are just in mask->flag for now... */
        return GET_ACF_FLAG_PTR(mask->flag, type);
 }
@@ -3125,16 +3125,16 @@ static bAnimChannelType ACF_MASKDATA =
 {
        "Mask Datablock",                /* type name */
        ACHANNEL_ROLE_EXPANDER,          /* role */
-       
+
        acf_mask_color,                  /* backdrop color */
        acf_group_backdrop,              /* backdrop */
        acf_generic_indention_0,         /* indent level */
        acf_generic_group_offset,        /* offset */
-       
+
        acf_generic_idblock_name,        /* name */
        acf_generic_idfill_name_prop,     /* name prop */
        acf_mask_icon,                   /* icon */
-       
+
        acf_mask_setting_valid,          /* has setting */
        acf_mask_setting_flag,           /* flag for setting */
        acf_mask_setting_ptr             /* pointer for setting */
@@ -3146,7 +3146,7 @@ static bAnimChannelType ACF_MASKDATA =
 static void acf_masklay_name(bAnimListElem *ale, char *name)
 {
        MaskLayer *masklay = (MaskLayer *)ale->data;
-       
+
        if (masklay && name)
                BLI_strncpy(name, masklay->name, ANIM_CHAN_NAME_SIZE);
 }
@@ -3157,7 +3157,7 @@ static bool acf_masklay_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyR
        if (ale->data) {
                RNA_pointer_create(ale->id, &RNA_MaskLayer, ale->data, ptr);
                *prop = RNA_struct_name_property(ptr->type);
-               
+
                return (*prop != NULL);
        }
 
@@ -3173,7 +3173,7 @@ static bool acf_masklay_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *U
                case ACHANNEL_SETTING_VISIBLE: /* graph editor only */
                case ACHANNEL_SETTING_SOLO: /* nla editor only */
                        return false;
-               
+
                /* always available */
                default:
                        return true;
@@ -3185,14 +3185,14 @@ static int acf_masklay_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return MASK_LAYERFLAG_SELECT;
-               
+
                case ACHANNEL_SETTING_PROTECT: /* protected */
                        return MASK_LAYERFLAG_LOCKED;
-               
+
                default: /* unsupported */
                        return 0;
        }
@@ -3202,7 +3202,7 @@ static int acf_masklay_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setti
 static void *acf_masklay_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type)
 {
        MaskLayer *masklay = (MaskLayer *)ale->data;
-       
+
        /* all flags are just in masklay->flag for now... */
        return GET_ACF_FLAG_PTR(masklay->flag, type);
 }
@@ -3212,16 +3212,16 @@ static bAnimChannelType ACF_MASKLAYER =
 {
        "Mask Layer",                   /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_generic_channel_color,      /* backdrop color */
        acf_generic_channel_backdrop,   /* backdrop */
        acf_generic_indention_flexible, /* indent level */
        acf_generic_group_offset,       /* offset */
-       
+
        acf_masklay_name,               /* name */
        acf_masklay_name_prop,          /* name prop */
        NULL,                           /* icon */
-       
+
        acf_masklay_setting_valid,      /* has setting */
        acf_masklay_setting_flag,       /* flag for setting */
        acf_masklay_setting_ptr         /* pointer for setting */
@@ -3235,7 +3235,7 @@ static void acf_nlatrack_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, flo
        NlaTrack *nlt = (NlaTrack *)ale->data;
        AnimData *adt = ale->adt;
        bool nonSolo = false;
-       
+
        /* is track enabled for solo drawing? */
        if ((adt) && (adt->flag & ADT_NLA_SOLO_TRACK)) {
                if ((nlt->flag & NLATRACK_SOLO) == 0) {
@@ -3243,7 +3243,7 @@ static void acf_nlatrack_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, flo
                        nonSolo = true;
                }
        }
-       
+
        /* set color for nla track */
        UI_GetThemeColorShade3fv(TH_HEADER, ((nonSolo == false) ? 20 : -20), r_color);
 }
@@ -3252,7 +3252,7 @@ static void acf_nlatrack_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, flo
 static void acf_nlatrack_name(bAnimListElem *ale, char *name)
 {
        NlaTrack *nlt = (NlaTrack *)ale->data;
-       
+
        if (nlt && name)
                BLI_strncpy(name, nlt->name, ANIM_CHAN_NAME_SIZE);
 }
@@ -3263,10 +3263,10 @@ static bool acf_nlatrack_name_prop(bAnimListElem *ale, PointerRNA *ptr, Property
        if (ale->data) {
                RNA_pointer_create(ale->id, &RNA_NlaTrack, ale->data, ptr);
                *prop = RNA_struct_name_property(ptr->type);
-               
+
                return (*prop != NULL);
        }
-       
+
        return false;
 }
 
@@ -3275,14 +3275,14 @@ static bool acf_nlatrack_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *
 {
        NlaTrack *nlt = (NlaTrack *)ale->data;
        AnimData *adt = ale->adt;
-       
+
        /* visibility of settings depends on various states... */
        switch (setting) {
                /* always supported */
                case ACHANNEL_SETTING_SELECT:
                case ACHANNEL_SETTING_SOLO:
                        return true;
-               
+
                /* conditionally supported... */
                case ACHANNEL_SETTING_PROTECT:
                case ACHANNEL_SETTING_MUTE:
@@ -3299,8 +3299,8 @@ static bool acf_nlatrack_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *
                                                return false;
                                        }
                                }
-                               
-                               
+
+
                                /* ok - no tracks are solo'd, and this isn't being tweaked */
                                return true;
                        }
@@ -3308,7 +3308,7 @@ static bool acf_nlatrack_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *
                                /* unsupported - this track is being tweaked */
                                return false;
                        }
-               
+
                /* unsupported */
                default:
                        return false;
@@ -3320,20 +3320,20 @@ static int acf_nlatrack_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Sett
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_SELECT: /* selected */
                        return NLATRACK_SELECTED;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* muted */
                        return NLATRACK_MUTED;
-                       
+
                case ACHANNEL_SETTING_PROTECT: /* protected */
                        return NLATRACK_PROTECTED;
-                       
+
                case ACHANNEL_SETTING_SOLO: /* solo */
                        return NLATRACK_SOLO;
-                       
+
                default: /* unsupported */
                        return 0;
        }
@@ -3347,20 +3347,20 @@ static void *acf_nlatrack_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings
 }
 
 /* nla track type define */
-static bAnimChannelType ACF_NLATRACK = 
+static bAnimChannelType ACF_NLATRACK =
 {
        "NLA Track",                    /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_nlatrack_color,             /* backdrop color */
        acf_generic_channel_backdrop,   /* backdrop */
        acf_generic_indention_flexible, /* indent level */
        acf_generic_group_offset,       /* offset */           // XXX?
-       
+
        acf_nlatrack_name,              /* name */
        acf_nlatrack_name_prop,         /* name prop */
        NULL,                           /* icon */
-       
+
        acf_nlatrack_setting_valid,     /* has setting */
        acf_nlatrack_setting_flag,      /* flag for setting */
        acf_nlatrack_setting_ptr        /* pointer for setting */
@@ -3372,7 +3372,7 @@ static bAnimChannelType ACF_NLATRACK =
 static int acf_nlaaction_icon(bAnimListElem *ale)
 {
        AnimData *adt = ale->adt;
-       
+
        /* indicate tweaking-action state by changing the icon... */
        if ((adt) && (adt->flag & ADT_NLA_EDIT_ON)) {
                return ICON_ACTION_TWEAK;
@@ -3382,28 +3382,28 @@ static int acf_nlaaction_icon(bAnimListElem *ale)
        }
 }
 
-/* Backdrop color for nla action channel 
+/* Backdrop color for nla action channel
  * Although this can't be used directly for NLA Action drawing,
  * it is still needed for use behind the RHS toggles
  */
 static void acf_nlaaction_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, float r_color[3])
 {
        float color[4];
-       
+
        /* Action Line
-        *   The alpha values action_get_color returns are only useful for drawing 
+        *   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(ale->adt, (bAction *)ale->data, color);
-       
+
        /* NOTE: since the return types only allow rgb, we cannot do the alpha-blending we'd
         * like for the solo-drawing case. Hence, this method isn't actually used for drawing
         * most of the channel...
         */
        copy_v3_v3(r_color, color);
 }
+
 /* backdrop for nla action channel */
 static void acf_nlaaction_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
 {
@@ -3412,14 +3412,14 @@ static void acf_nlaaction_backdrop(bAnimContext *ac, bAnimListElem *ale, float y
        AnimData *adt = ale->adt;
        short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
        float color[4];
-       
+
        /* Action Line
-        *   The alpha values action_get_color returns are only useful for drawing 
+        *   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)) {
                /* Yes, the color vector has 4 components, BUT we only want to be using 3 of them! */
                glColor3fv(color);
@@ -3428,12 +3428,12 @@ static void acf_nlaaction_backdrop(bAnimContext *ac, bAnimListElem *ale, float y
                float alpha = (adt && (adt->flag & ADT_NLA_SOLO_TRACK)) ? 0.3f : 1.0f;
                glColor4f(color[0], color[1], color[2], alpha);
        }
-       
-       /* only on top left corner, to show that this channel sits on top of the preceding ones 
+
+       /* only on top left corner, to show that this channel sits on top of the preceding ones
         * while still linking into the action line strip to the right
         */
        UI_draw_roundbox_corner_set(UI_CNR_TOP_LEFT);
-       
+
        /* draw slightly shifted up vertically to look like it has more separation from other channels,
         * but we then need to slightly shorten it so that it doesn't look like it overlaps
         */
@@ -3444,7 +3444,7 @@ static void acf_nlaaction_backdrop(bAnimContext *ac, bAnimListElem *ale, float y
 static void acf_nlaaction_name(bAnimListElem *ale, char *name)
 {
        bAction *act = (bAction *)ale->data;
-       
+
        if (name) {
                if (act) {
                        // TODO: add special decoration when doing this in tweaking mode?
@@ -3462,10 +3462,10 @@ static bool acf_nlaaction_name_prop(bAnimListElem *ale, PointerRNA *ptr, Propert
        if (ale->data) {
                RNA_pointer_create(ale->id, &RNA_Action, ale->data, ptr);
                *prop = RNA_struct_name_property(ptr->type);
-               
+
                return (*prop != NULL);
        }
-       
+
        return false;
 }
 
@@ -3473,7 +3473,7 @@ static bool acf_nlaaction_name_prop(bAnimListElem *ale, PointerRNA *ptr, Propert
 static bool acf_nlaaction_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *ale, eAnimChannel_Settings setting)
 {
        AnimData *adt = ale->adt;
-       
+
        /* visibility of settings depends on various states... */
        switch (setting) {
                /* conditionally supported */
@@ -3485,7 +3485,7 @@ static bool acf_nlaaction_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem
                        else {
                                return false;
                        }
-               
+
                /* unsupported */
                default:
                        return false;
@@ -3497,12 +3497,12 @@ static int acf_nlaaction_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Set
 {
        /* clear extra return data first */
        *neg = false;
-       
+
        switch (setting) {
                case ACHANNEL_SETTING_PINNED: /* pinned - map/unmap */
                        *neg = true; // XXX
                        return ADT_NLA_EDIT_NOMAP;
-                       
+
                default: /* unsupported */
                        return 0;
        }
@@ -3516,20 +3516,20 @@ static void *acf_nlaaction_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings
 }
 
 /* nla action type define */
-static bAnimChannelType ACF_NLAACTION = 
+static bAnimChannelType ACF_NLAACTION =
 {
        "NLA Active Action",            /* type name */
        ACHANNEL_ROLE_CHANNEL,          /* role */
-       
+
        acf_nlaaction_color,            /* backdrop color (NOTE: the backdrop handles this too, since it needs special hacks) */
        acf_nlaaction_backdrop,         /* backdrop */
        acf_generic_indention_flexible, /* indent level */
        acf_generic_group_offset,       /* offset */           // XXX?
-       
+
        acf_nlaaction_name,             /* name */
        acf_nlaaction_name_prop,        /* name prop */
        acf_nlaaction_icon,             /* icon */
-       
+
        acf_nlaaction_setting_valid,     /* has setting */
        acf_nlaaction_setting_flag,      /* flag for setting */
        acf_nlaaction_setting_ptr        /* pointer for setting */
@@ -3547,31 +3547,31 @@ static short ACF_INIT = 1; /* when non-zero, the list needs to be updated */
 static void ANIM_init_channel_typeinfo_data(void)
 {
        int type = 0;
-       
+
        /* start initializing if necessary... */
        if (ACF_INIT) {
                ACF_INIT = 0;
-               
+
                /* NOTE: need to keep the order of these synchronized with the definition of
                 * channel types (eAnim_ChannelType) in ED_anim_api.h
                 */
                animchannelTypeInfo[type++] = NULL;              /* None */
                animchannelTypeInfo[type++] = NULL;              /* AnimData */
                animchannelTypeInfo[type++] = NULL;              /* Special */
-               
+
                animchannelTypeInfo[type++] = &ACF_SUMMARY;      /* Motion Summary */
-               
+
                animchannelTypeInfo[type++] = &ACF_SCENE;        /* Scene */
                animchannelTypeInfo[type++] = &ACF_OBJECT;       /* Object */
                animchannelTypeInfo[type++] = &ACF_GROUP;        /* Group */
                animchannelTypeInfo[type++] = &ACF_FCURVE;       /* F-Curve */
-               
+
                animchannelTypeInfo[type++] = &ACF_NLACONTROLS;  /* NLA Control FCurve Expander */
                animchannelTypeInfo[type++] = &ACF_NLACURVE;     /* NLA Control FCurve Channel */
-               
+
                animchannelTypeInfo[type++] = &ACF_FILLACTD;     /* Object Action Expander */
                animchannelTypeInfo[type++] = &ACF_FILLDRIVERS;  /* Drivers Expander */
-               
+
                animchannelTypeInfo[type++] = &ACF_DSMAT;        /* Material Channel */
                animchannelTypeInfo[type++] = &ACF_DSLAM;        /* Lamp Channel */
                animchannelTypeInfo[type++] = &ACF_DSCAM;        /* Camera Channel */
@@ -3590,19 +3590,19 @@ static void ANIM_init_channel_typeinfo_data(void)
                animchannelTypeInfo[type++] = &ACF_DSSPK;        /* Speaker Channel */
                animchannelTypeInfo[type++] = &ACF_DSGPENCIL;    /* GreasePencil Channel */
                animchannelTypeInfo[type++] = &ACF_DSMCLIP;      /* MovieClip Channel */
-               
+
                animchannelTypeInfo[type++] = &ACF_SHAPEKEY;     /* ShapeKey */
-               
+
                animchannelTypeInfo[type++] = &ACF_GPD;          /* Grease Pencil Datablock */
                animchannelTypeInfo[type++] = &ACF_GPL;          /* Grease Pencil Layer */
-               
+
                animchannelTypeInfo[type++] = &ACF_MASKDATA;     /* Mask Datablock */
                animchannelTypeInfo[type++] = &ACF_MASKLAYER;    /* Mask Layer */
-               
+
                animchannelTypeInfo[type++] = &ACF_NLATRACK;     /* NLA Track */
                animchannelTypeInfo[type++] = &ACF_NLAACTION;    /* NLA Action */
        }
-} 
+}
 
 /* Get type info from given channel type */
 const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale)
@@ -3610,10 +3610,10 @@ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale)
        /* santiy checks */
        if (ale == NULL)
                return NULL;
-               
+
        /* init the typeinfo if not available yet... */
        ANIM_init_channel_typeinfo_data();
-       
+
        /* check if type is in bounds... */
        if ((ale->type >= 0) && (ale->type < ANIMTYPE_NUM_TYPES))
                return animchannelTypeInfo[ale->type];
@@ -3627,21 +3627,21 @@ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale)
 void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level)
 {
        const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
-       
+
        /* print indents */
        for (; indent_level > 0; indent_level--)
                printf("  ");
-       
+
        /* print info */
        if (acf) {
                char name[ANIM_CHAN_NAME_SIZE]; /* hopefully this will be enough! */
-               
+
                /* get UI name */
                if (acf->name)
                        acf->name(ale, name);
                else
                        BLI_strncpy(name, "<No name>", sizeof(name));
-               
+
                /* print type name + ui name */
                printf("ChanType: <%s> Name: \"%s\"\n", acf->channel_type_name, name);
        }
@@ -3653,13 +3653,13 @@ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level)
 
 /* --------------------------- */
 
-/* Check if some setting for a channel is enabled 
+/* Check if some setting for a channel is enabled
  * Returns: 1 = On, 0 = Off, -1 = Invalid
  */
 short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
 {
        const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
-       
+
        /* 1) check that the setting exists for the current context */
        if ((acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting))) {
                /* 2) get pointer to check for flag in, and the flag to check for */
@@ -3667,17 +3667,17 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
                bool negflag;
                int flag;
                void *ptr;
-               
+
                flag = acf->setting_flag(ac, setting, &negflag);
                ptr = acf->setting_ptr(ale, setting, &ptrsize);
-               
+
                /* check if flag is enabled */
                if (ptr && flag) {
                        switch (ptrsize) {
                                case sizeof(int):   /* integer pointer for setting */
                                {
                                        const int *val = (int *)ptr;
-                                       
+
                                        if (negflag)
                                                return ((*val) & flag) == 0;
                                        else
@@ -3686,7 +3686,7 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
                                case sizeof(short): /* short pointer for setting */
                                {
                                        const short *val = (short *)ptr;
-                                       
+
                                        if (negflag)
                                                return ((*val) & flag) == 0;
                                        else
@@ -3695,7 +3695,7 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
                                case sizeof(char):  /* char pointer for setting */
                                {
                                        const char *val = (char *)ptr;
-                                       
+
                                        if (negflag)
                                                return ((*val) & flag) == 0;
                                        else
@@ -3704,10 +3704,10 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
                        }
                }
        }
-       
+
        /* not found... */
        return -1;
-}      
+}
 
 
 /* quick macro for use in ANIM_channel_setting_set - set flag for setting according the mode given */
@@ -3725,14 +3725,14 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
                } \
        } (void)0
 
-/* Change value of some setting for a channel 
+/* Change value of some setting for a channel
  *     - setting: eAnimChannel_Settings
  *     - mode: eAnimChannels_SetFlag
  */
 void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
 {
        const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
-       
+
        /* 1) check that the setting exists for the current context */
        if ((acf) && (!acf->has_setting || acf->has_setting(ac, ale, setting))) {
                /* 2) get pointer to check for flag in, and the flag to check for */
@@ -3740,10 +3740,10 @@ void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel
                bool negflag;
                int flag;
                void *ptr;
-               
+
                flag = acf->setting_flag(ac, setting, &negflag);
                ptr = acf->setting_ptr(ale, setting, &ptrsize);
-               
+
                /* check if flag is enabled */
                if (ptr && flag) {
                        switch (ptrsize) {
@@ -3789,7 +3789,7 @@ static bool achannel_is_being_renamed(const bAnimContext *ac, const bAnimChannel
                        return true;
                }
        }
-       
+
        /* not being renamed */
        return false;
 }
@@ -3802,52 +3802,52 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
        View2D *v2d = &ac->ar->v2d;
        short selected, offset;
        float y, ymid, ytext;
-       
+
        /* sanity checks - don't draw anything */
        if (ELEM(NULL, acf, ale))
                return;
-       
+
        /* get initial offset */
        if (acf->get_offset)
                offset = acf->get_offset(ac, ale);
        else
                offset = 0;
-               
+
        /* calculate appropriate y-coordinates for icon buttons */
        y = (ymaxc - yminc) / 2 + yminc;
        ymid = y - 0.5f * ICON_WIDTH;
        /* y-coordinates for text is only 4 down from middle */
        ytext = y - 0.2f * U.widget_unit;
-       
+
        /* check if channel is selected */
        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_SELECT))
                selected = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
        else
                selected = 0;
-               
+
        /* set blending again, as may not be set in previous step */
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glEnable(GL_BLEND);
-       
+
        /* step 1) draw backdrop ...........................................  */
        if (acf->draw_backdrop)
                acf->draw_backdrop(ac, ale, yminc, ymaxc);
-               
+
        /* step 2) draw expand widget ....................................... */
        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_EXPAND)) {
                /* just skip - drawn as widget now */
-               offset += ICON_WIDTH; 
+               offset += ICON_WIDTH;
        }
-               
+
        /* step 3) draw icon ............................................... */
        if (acf->icon) {
                UI_icon_draw(offset, ymid, acf->icon(ale));
-               offset += ICON_WIDTH; 
+               offset += ICON_WIDTH;
        }
-       
+
        /* turn off blending, since not needed anymore... */
        glDisable(GL_BLEND);
-               
+
        /* step 4) draw special toggles  .................................
         *      - in Graph Editor, checkboxes for visibility in curves area
         *      - in NLA Editor, glowing dots for solo/not solo...
@@ -3861,12 +3861,12 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
                        /* for F-Curves, draw color-preview of curve behind checkbox */
                        if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) {
                                FCurve *fcu = (FCurve *)ale->data;
-                               
-                               /* F-Curve channels need to have a special 'color code' box drawn, which is colored with whatever 
-                                * color the curve has stored 
+
+                               /* F-Curve channels need to have a special 'color code' box drawn, which is colored with whatever
+                                * color the curve has stored
                                 */
                                glColor3fv(fcu->color);
-                               
+
                                /* just a solid color rect
                                 */
                                glRectf(offset, yminc, offset + ICON_WIDTH, ymaxc);
@@ -3881,7 +3881,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
                }
                else if ((ac->spacetype == SPACE_NLA) && acf->has_setting(ac, ale, ACHANNEL_SETTING_SOLO)) {
                        /* just skip - drawn as widget now */
-                       offset += ICON_WIDTH; 
+                       offset += ICON_WIDTH;
                }
                else if (ale->type == ANIMTYPE_GPLAYER) {
                        /* just skip - drawn as a widget */
@@ -3890,24 +3890,24 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
        }
 
        /* step 5) draw name ............................................... */
-       /* Don't draw this if renaming... */    
+       /* Don't draw this if renaming... */
        if (acf->name && !achannel_is_being_renamed(ac, acf, channel_index)) {
                const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
                char name[ANIM_CHAN_NAME_SIZE]; /* hopefully this will be enough! */
-               
+
                /* set text color */
                /* XXX: if active, highlight differently? */
                if (selected)
                        UI_ThemeColor(TH_TEXT_HI);
                else
                        UI_ThemeColor(TH_TEXT);
-               
+
                /* get name */
                acf->name(ale, name);
-               
+
                offset += 3;
                UI_fontstyle_draw_simple(fstyle, offset, ytext, name);
-               
+
                /* draw red underline if channel is disabled */
                if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE) && (ale->flag & FCURVE_DISABLED)) {
                        /* FIXME: replace hardcoded color here, and check on extents! */
@@ -3928,11 +3928,11 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
                short draw_sliders = 0;
                float ymin_ofs = 0.0f;
                float color[3];
-               
+
                /* get and set backdrop color */
                acf->get_backdrop_color(ac, ale, color);
                glColor3fv(color);
-               
+
                /* check if we need to show the sliders */
                if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
                        switch (ac->spacetype) {
@@ -3956,24 +3956,24 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
                        /* protect... */
                        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT))
                                offset += ICON_WIDTH;
-                               
+
                        /* mute... */
                        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE))
                                offset += ICON_WIDTH;
                        if (ale->type == ANIMTYPE_GPLAYER)
                                offset += ICON_WIDTH;
-                               
+
                        /* pinned... */
                        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PINNED))
                                offset += ICON_WIDTH;
-                               
+
                        /* NOTE: technically, NLA Action "pushdown" should be here too, but there are no sliders there */
-                       
+
                        /* NLA action channels have slightly different spacing requirements... */
                        if (ale->type == ANIMTYPE_NLAACTION)
                                ymin_ofs = NLACHANNEL_SKIP;
                }
-               
+
                /* draw slider
                 *      - even if we can draw sliders for this view, we must also check that the channel-type supports them
                 *        (only only F-Curves really can support them for now)
@@ -3983,10 +3983,10 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
                        /* adjust offset */
                        offset += SLIDER_WIDTH;
                }
-               
-               
+
+
                /* finally draw a backdrop rect behind these
-                *      - starts from the point where the first toggle/slider starts, 
+                *      - starts from the point where the first toggle/slider starts,
                 *      - ends past the space that might be reserved for a scroller
                 */
                glRectf(v2d->cur.xmax - (float)offset, yminc + ymin_ofs, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
@@ -4010,7 +4010,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
        int filter;
        int setting = GET_INT_FROM_POINTER(setting_wrap);
        short on = 0;
-       
+
        /* send notifiers before doing anything else... */
        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
 
@@ -4021,11 +4021,11 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
 
        if (ale_setting->type == ANIMTYPE_GPLAYER)
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
-       
+
        /* verify animation context */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return;
-       
+
        /* check if the setting is on... */
        on = ANIM_channel_setting_get(&ac, ale_setting, setting);
 
@@ -4033,14 +4033,14 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
        if (on == -1) {
                return;
        }
-       
+
        /* get all channels that can possibly be chosen - but ignore hierarchy */
        filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
        ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-       
+
        /* call API method to flush the setting */
        ANIM_flush_setting_anim_channels(&ac, &anim_data, ale_setting, setting, on);
-       
+
        /* free temp data */
        ANIM_animdata_freelist(&anim_data);
 }
@@ -4050,7 +4050,7 @@ static void achannel_nlatrack_solo_widget_cb(bContext *C, void *adt_poin, void *
 {
        AnimData *adt = adt_poin;
        NlaTrack *nlt = nlt_poin;
-       
+
        /* Toggle 'solo' mode. There are several complications here which need explaining:
         * - The method call is needed to perform a few additional validation operations
         *   to ensure that the mode is applied properly
@@ -4060,7 +4060,7 @@ static void achannel_nlatrack_solo_widget_cb(bContext *C, void *adt_poin, void *
         */
        nlt->flag ^= NLATRACK_SOLO;
        BKE_nlatrack_solo_toggle(adt, nlt);
-       
+
        /* send notifiers */
        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_RENAME, NULL);
 }
@@ -4071,7 +4071,7 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi
        ID *id = (ID *)id_poin;
        AnimData *adt = BKE_animdata_from_id(id);
        FCurve *fcu = (FCurve *)fcu_poin;
-       
+
        ReportList *reports = CTX_wm_reports(C);
        Scene *scene = CTX_data_scene(C);
        ToolSettings *ts = scene->toolsettings;
@@ -4080,25 +4080,25 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi
        short flag = 0;
        bool done = false;
        float cfra;
-       
+
        /* get current frame and apply NLA-mapping to it (if applicable) */
        cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
-       
+
        /* get flags for keyframing */
        flag = ANIM_get_keyframing_flags(scene, 1);
-       
+
        /* get RNA pointer, and resolve the path */
        RNA_id_pointer_create(id, &id_ptr);
-       
+
        /* try to resolve the path stored in the F-Curve */
        if (RNA_path_resolve_property(&id_ptr, fcu->rna_path, &ptr, &prop)) {
                /* set the special 'replace' flag if on a keyframe */
                if (fcurve_frame_has_keyframe(fcu, cfra, 0))
                        flag |= INSERTKEY_REPLACE;
-               
+
                /* insert a keyframe for this F-Curve */
                done = insert_keyframe_direct(reports, ptr, prop, fcu, cfra, ts->keyframe_type, flag);
-               
+
                if (done)
                        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
        }
@@ -4110,7 +4110,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
        Key *key = (Key *)key_poin;
        KeyBlock *kb = (KeyBlock *)kb_poin;
        char *rna_path = BKE_keyblock_curval_rnapath_get(key, kb);
-       
+
        ReportList *reports = CTX_wm_reports(C);
        Scene *scene = CTX_data_scene(C);
        ToolSettings *ts = scene->toolsettings;
@@ -4119,34 +4119,34 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
        short flag = 0;
        bool done = false;
        float cfra;
-       
+
        /* get current frame and apply NLA-mapping to it (if applicable) */
        cfra = BKE_nla_tweakedit_remap(key->adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
-       
+
        /* get flags for keyframing */
        flag = ANIM_get_keyframing_flags(scene, 1);
-       
+
        /* get RNA pointer, and resolve the path */
        RNA_id_pointer_create((ID *)key, &id_ptr);
-       
+
        /* try to resolve the path stored in the F-Curve */
        if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) {
                /* find or create new F-Curve */
                // XXX is the group name for this ok?
                bAction *act = verify_adt_action((ID *)key, 1);
                FCurve *fcu = verify_fcurve(act, NULL, &ptr, rna_path, 0, 1);
-               
+
                /* set the special 'replace' flag if on a keyframe */
                if (fcurve_frame_has_keyframe(fcu, cfra, 0))
                        flag |= INSERTKEY_REPLACE;
-               
+
                /* insert a keyframe for this F-Curve */
                done = insert_keyframe_direct(reports, ptr, prop, fcu, cfra, ts->keyframe_type, flag);
-               
+
                if (done)
                        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
        }
-       
+
        /* free the path */
        if (rna_path)
                MEM_freeN(rna_path);
@@ -4157,35 +4157,35 @@ static void achannel_setting_slider_nla_curve_cb(bContext *C, void *UNUSED(id_po
 {
        /* ID *id = (ID *)id_poin; */
        FCurve *fcu = (FCurve *)fcu_poin;
-       
+
        PointerRNA ptr;
        PropertyRNA *prop;
        int index;
-       
+
        ReportList *reports = CTX_wm_reports(C);
        Scene *scene = CTX_data_scene(C);
        ToolSettings *ts = scene->toolsettings;
        short flag = 0;
        bool done = false;
        float cfra;
-       
+
        /* get current frame - *no* NLA mapping should be done */
        cfra = (float)CFRA;
-       
+
        /* get flags for keyframing */
        flag = ANIM_get_keyframing_flags(scene, 1);
-       
+
        /* get pointer and property from the slider - this should all match up with the NlaStrip required... */
        UI_context_active_but_prop_get(C, &ptr, &prop, &index);
-       
+
        if (fcu && prop) {
                /* set the special 'replace' flag if on a keyframe */
                if (fcurve_frame_has_keyframe(fcu, cfra, 0))
                        flag |= INSERTKEY_REPLACE;
-               
+
                /* insert a keyframe for this F-Curve */
                done = insert_keyframe_direct(reports, ptr, prop, fcu, cfra, ts->keyframe_type, flag);
-               
+
                if (done)
                        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
        }
@@ -4202,18 +4202,18 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
        void *ptr;
        const char *tooltip;
        uiBut *but = NULL;
-       
+
        /* get the flag and the pointer to that flag */
        flag = acf->setting_flag(ac, setting, &negflag);
        ptr = acf->setting_ptr(ale, setting, &ptrsize);
        /* enabled = ANIM_channel_setting_get(ac, ale, setting); */ /* UNUSED */
-       
+
        /* get the base icon for the setting */
        switch (setting) {
                case ACHANNEL_SETTING_VISIBLE:  /* visibility eyes */
                        //icon = ((enabled) ? ICON_VISIBLE_IPO_ON : ICON_VISIBLE_IPO_OFF);
                        icon = ICON_VISIBLE_IPO_OFF;
-                       
+
                        if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE))
                                tooltip = TIP_("F-Curve is visible in Graph Editor for editing");
                        else if (ale->type == ANIMTYPE_GPLAYER)
@@ -4238,30 +4238,30 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
                        icon = ICON_TRIA_RIGHT;
                        tooltip = TIP_("Make channels grouped under this channel visible");
                        break;
-                       
+
                case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */
                        //icon = ((enabled) ? ICON_SOLO_OFF : ICON_SOLO_ON);
                        icon = ICON_SOLO_OFF;
                        tooltip = TIP_("NLA Track is the only one evaluated in this animation data-block, with all others muted");
                        break;
-               
+
                /* --- */
-               
+
                case ACHANNEL_SETTING_PROTECT: /* protected lock */
                        // TODO: what about when there's no protect needed?
                        //icon = ((enabled) ? ICON_LOCKED : ICON_UNLOCKED);
                        icon = ICON_UNLOCKED;
-                       
+
                        if (ale->datatype != ALE_NLASTRIP)
                                tooltip = TIP_("Editability of keyframes for this channel");
                        else
                                tooltip = TIP_("Editability of NLA Strips in this track");
                        break;
-                       
+
                case ACHANNEL_SETTING_MUTE: /* muted speaker */
                        //icon = ((enabled) ? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF);
                        icon = ICON_MUTE_IPO_OFF;
-                       
+
                        if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) {
                                tooltip = TIP_("Does F-Curve contribute to result");
                        }
@@ -4275,11 +4275,11 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
                                tooltip = TIP_("Do channels contribute to result (toggle channel muting)");
                        }
                        break;
-                       
+
                case ACHANNEL_SETTING_PINNED: /* pin icon */
                        //icon = ((enabled) ? ICON_PINNED : ICON_UNPINNED);
                        icon = ICON_UNPINNED;
-                       
+
                        if (ale->type == ANIMTYPE_NLAACTION) {
                                tooltip = TIP_("Display action without any time remapping (when unpinned)");
                        }
@@ -4288,13 +4288,13 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
                                tooltip = NULL;
                        }
                        break;
-                       
+
                default:
                        tooltip = NULL;
                        icon = 0;
                        break;
        }
-       
+
        /* type of button */
        if (usetoggle) {
                if (negflag)
@@ -4312,21 +4312,21 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
        if (ptr && flag) {
                switch (ptrsize) {
                        case sizeof(int):   /* integer pointer for setting */
-                               but = uiDefIconButBitI(block, butType, flag, 0, icon, 
+                               but = uiDefIconButBitI(block, butType, flag, 0, icon,
                                                       xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
                                break;
-                               
+
                        case sizeof(short): /* short pointer for setting */
-                               but = uiDefIconButBitS(block, butType, flag, 0, icon, 
+                               but = uiDefIconButBitS(block, butType, flag, 0, icon,
                                                       xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
                                break;
-                               
+
                        case sizeof(char):  /* char pointer for setting */
-                               but = uiDefIconButBitC(block, butType, flag, 0, icon, 
+                               but = uiDefIconButBitC(block, butType, flag, 0, icon,
                                                       xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
                                break;
                }
-               
+
                /* set call to send relevant notifiers and/or perform type-specific updates */
                if (but) {
                        switch (setting) {
@@ -4339,12 +4339,12 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
                                case ACHANNEL_SETTING_ALWAYS_VISIBLE:
                                        UI_but_funcN_set(but, achannel_setting_flush_widget_cb, MEM_dupallocN(ale), SET_INT_IN_POINTER(setting));
                                        break;
-                                       
+
                                /* settings needing special attention */
                                case ACHANNEL_SETTING_SOLO: /* NLA Tracks - Solo toggle */
                                        UI_but_func_set(but, achannel_nlatrack_solo_widget_cb, ale->adt, ale->data);
                                        break;
-                                       
+
                                /* no flushing */
                                case ACHANNEL_SETTING_EXPAND: /* expanding - cannot flush, otherwise all would open/close at once */
                                default:
@@ -4363,37 +4363,37 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
        float y, ymid /*, ytext*/;
        short offset;
        const bool is_being_renamed = achannel_is_being_renamed(ac, acf, channel_index);
-       
+
        /* sanity checks - don't draw anything */
        if (ELEM(NULL, acf, ale, block))
                return;
-       
+
        /* get initial offset */
        if (acf->get_offset)
                offset = acf->get_offset(ac, ale);
        else
                offset = 0;
-               
-       /* calculate appropriate y-coordinates for icon buttons 
+
+       /* calculate appropriate y-coordinates for icon buttons
         */
        y = (ymaxc - yminc) / 2 + yminc;
        ymid = y - 0.5f * ICON_WIDTH;
-       
+
        /* no button backdrop behind icons */
        UI_block_emboss_set(block, UI_EMBOSS_NONE);
-       
+
        /* step 1) draw expand widget ....................................... */
        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_EXPAND)) {
                draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_EXPAND);
-               offset += ICON_WIDTH; 
+               offset += ICON_WIDTH;
        }
-               
+
        /* step 2) draw icon ............................................... */
        if (acf->icon) {
                /* icon is not drawn here (not a widget) */
-               offset += ICON_WIDTH; 
+               offset += ICON_WIDTH;
        }
-               
+
        /* step 3) draw special toggles  .................................
         *      - in Graph Editor, checkboxes for visibility in curves area
         *      - in NLA Editor, glowing dots for solo/not solo...
@@ -4418,7 +4418,7 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                else if ((ac->spacetype == SPACE_NLA) && acf->has_setting(ac, ale, ACHANNEL_SETTING_SOLO)) {
                        /* 'solo' setting for NLA Tracks */
                        draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_SOLO);
-                       offset += ICON_WIDTH; 
+                       offset += ICON_WIDTH;
                }
                else if (ale->type == ANIMTYPE_GPLAYER) {
 #if 0
@@ -4427,18 +4427,18 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                        bGPDlayer *gpl = (bGPDlayer *)ale->data;
                        PointerRNA ptr;
                        float w = ICON_WIDTH / 2.0f;
-                       
+
                        RNA_pointer_create(ale->id, &RNA_GPencilLayer, ale->data, &ptr);
-                       
+
                        UI_block_align_begin(block);
                        UI_block_emboss_set(block, RNA_boolean_get(&ptr, "is_stroke_visible") ? UI_EMBOSS : UI_EMBOSS_NONE);
-                       uiDefButR(block, UI_BTYPE_COLOR, 1, "", offset, yminc, w, ICON_WIDTH, 
-                                 &ptr, "color", -1, 
+                       uiDefButR(block, UI_BTYPE_COLOR, 1, "", offset, yminc, w, ICON_WIDTH,
+                                 &ptr, "color", -1,
                                  0, 0, 0, 0, gpl->info);
-                       
+
                        UI_block_emboss_set(block, RNA_boolean_get(&ptr, "is_fill_visible") ? UI_EMBOSS : UI_EMBOSS_NONE);
-                       uiDefButR(block, UI_BTYPE_COLOR, 1, "", offset + w, yminc, w, ICON_WIDTH, 
-                                 &ptr, "fill_color", -1, 
+                       uiDefButR(block, UI_BTYPE_COLOR, 1, "", offset + w, yminc, w, ICON_WIDTH,
+                                 &ptr, "fill_color", -1,
                                  0, 0, 0, 0, gpl->info);
                        UI_block_emboss_set(block, UI_EMBOSS_NONE);
                        UI_block_align_end(block);
@@ -4447,14 +4447,14 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
 #endif
                }
        }
-       
+
        /* step 4) draw text - check if renaming widget is in use... */
        if (is_being_renamed) {
                PointerRNA ptr = {{NULL}};
                PropertyRNA *prop = NULL;
-               
-               /* draw renaming widget if we can get RNA pointer for it 
-                * NOTE: property may only be available in some cases, even if we have 
+
+               /* draw renaming widget if we can get RNA pointer for it
+                * NOTE: property may only be available in some cases, even if we have
                 *       a callback available (e.g. broken F-Curve rename)
                 */
                if (acf->name_prop(ale, &ptr, &prop)) {
@@ -4462,21 +4462,21 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                        const short channel_height = round_fl_to_int(ymaxc - yminc);
                        const short width = ac->ar->winx - offset - (margin_x * 2);
                        uiBut *but;
-                       
+
                        UI_block_emboss_set(block, UI_EMBOSS);
-                       
+
                        but = uiDefButR(block, UI_BTYPE_TEXT, 1, "", offset + margin_x, yminc,
                                        MAX2(width, RENAME_TEXT_MIN_WIDTH), channel_height,
                                        &ptr, RNA_property_identifier(prop), -1, 0, 0, -1, -1, NULL);
-                       
+
                        /* copy what outliner does here, see outliner_buttons */
                        if (UI_but_active_only(C, ac->ar, block, but) == false) {
                                ac->ads->renameIndex = 0;
-                               
+
                                /* send notifiers */
                                WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_RENAME, NULL);
                        }
-                       
+
                        UI_block_emboss_set(block, UI_EMBOSS_NONE);
                }
                else {
@@ -4487,15 +4487,15 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN, NULL);
                }
        }
-       
+
        /* step 5) draw mute+protection toggles + (sliders) ....................... */
        /* reset offset - now goes from RHS of panel */
        offset = 0;
-       
+
        // TODO: when drawing sliders, make those draw instead of these toggles if not enough space
        if (v2d && !is_being_renamed) {
                short draw_sliders = 0;
-               
+
                /* check if we need to show the sliders */
                if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
                        switch (ac->spacetype) {
@@ -4513,12 +4513,12 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                                }
                        }
                }
-               
+
                /* check if there's enough space for the toggles if the sliders are drawn too */
                if (!(draw_sliders) || (BLI_rcti_size_x(&v2d->mask) > ACHANNEL_BUTTON_WIDTH / 2) ) {
                        /* protect... */
                        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
-                               offset += ICON_WIDTH; 
+                               offset += ICON_WIDTH;
                                draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_PROTECT);
                        }
                        /* mute... */
@@ -4531,43 +4531,43 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                                offset += ICON_WIDTH;
                                draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_VISIBLE);
                        }
-                       
+
                        /* modifiers disable */
                        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MOD_OFF)) {
                                offset += ICON_WIDTH * 1.2f; /* hack: extra spacing, to avoid touching the mute toggle */
                                draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_MOD_OFF);
                        }
-                       
+
                        /* ----------- */
-                       
+
                        /* pinned... */
                        if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PINNED)) {
                                offset += ICON_WIDTH;
                                draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_PINNED);
                        }
-                       
+
                        /* NLA Action "pushdown" */
                        if ((ale->type == ANIMTYPE_NLAACTION) && (ale->adt && ale->adt->action) && !(ale->adt->flag & ADT_NLA_EDIT_ON)) {
                                uiBut *but;
                                PointerRNA *opptr_b;
-                               
+
                                UI_block_emboss_set(block, UI_EMBOSS);
-                               
+
                                offset += UI_UNIT_X;
-                               but = uiDefIconButO(block, UI_BTYPE_BUT, "NLA_OT_action_pushdown", WM_OP_INVOKE_DEFAULT, ICON_NLA_PUSHDOWN, 
+                               but = uiDefIconButO(block, UI_BTYPE_BUT, "NLA_OT_action_pushdown", WM_OP_INVOKE_DEFAULT, ICON_NLA_PUSHDOWN,
                                                   (int)v2d->cur.xmax - offset, ymid, UI_UNIT_X, UI_UNIT_X, NULL);
-                               
+
                                opptr_b = UI_but_operator_ptr_get(but);
                                RNA_int_set(opptr_b, "channel_index", channel_index);
-                               
+
                                UI_block_emboss_set(block, UI_EMBOSS_NONE);
                        }
                }
-               
+
                /* draw slider
                 *      - even if we can draw sliders for this view, we must also check that the channel-type supports them
                 *        (only only F-Curves really can support them for now)
-                *      - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately, 
+                *      - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately,
                 *        wherever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment,
                 *        and wouldn't be able to auto-keyframe...
                 *      - slider should start before the toggles (if they're visible) to keep a clean line down the side
@@ -4576,25 +4576,25 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                        /* adjust offset */
                        // TODO: make slider width dynamic, so that they can be easier to use when the view is wide enough
                        offset += SLIDER_WIDTH;
-                       
+
                        /* need backdrop behind sliders... */
                        UI_block_emboss_set(block, UI_EMBOSS);
-                       
+
                        if (ale->owner) { /* Slider using custom RNA Access ---------- */
                                if (ale->type == ANIMTYPE_NLACURVE) {
                                        NlaStrip *strip = (NlaStrip *)ale->owner;
                                        FCurve *fcu = (FCurve *)ale->data;
                                        PointerRNA ptr;
                                        PropertyRNA *prop;
-                                       
+
                                        /* create RNA pointers */
                                        RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, &ptr);
                                        prop = RNA_struct_find_property(&ptr, fcu->rna_path);
-                                       
+
                                        /* create property slider */
                                        if (prop) {
                                                uiBut *but;
-                                               
+
                                                /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
                                                but = uiDefAutoButR(block, &ptr, prop, fcu->array_index, "", ICON_NONE, (int)v2d->cur.xmax - offset, ymid, SLIDER_WIDTH, (int)ymaxc - yminc);
                                                UI_but_func_set(but, achannel_setting_slider_nla_curve_cb, ale->id, ale->data);
@@ -4607,41 +4607,41 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
                                char *rna_path = NULL;
                                int array_index = 0;
                                short free_path = 0;
-                               
+
                                /* get destination info */
                                if (ale->type == ANIMTYPE_FCURVE) {
                                        FCurve *fcu = (FCurve *)ale->data;
-                                       
+
                                        rna_path = fcu->rna_path;
                                        array_index = fcu->array_index;
                                }
                                else if (ale->type == ANIMTYPE_SHAPEKEY) {
                                        KeyBlock *kb = (KeyBlock *)ale->data;
                                        Key *key = (Key *)ale->id;
-                                       
+
                                        rna_path = BKE_keyblock_curval_rnapath_get(key, kb);
                                        free_path = 1;
                                }
-                               
+
                                /* only if RNA-Path found */
                                if (rna_path) {
                                        /* get RNA pointer, and resolve the path */
                                        RNA_id_pointer_create(ale->id, &id_ptr);
-                                       
+
                                        /* try to resolve the path */
                                        if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) {
                                                uiBut *but;
-                                               
+
                                                /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
                                                but = uiDefAutoButR(block, &ptr, prop, array_index, "", ICON_NONE, (int)v2d->cur.xmax - offset, ymid, SLIDER_WIDTH, (int)ymaxc - yminc);
-                                               
+
                                                /* assign keyframing function according to slider type */
                                                if (ale->type == ANIMTYPE_SHAPEKEY)
                                                        UI_but_func_set(but, achannel_setting_slider_shapekey_cb, ale->id, ale->data);
                                                else
                                                        UI_but_func_set(but, achannel_setting_slider_cb, ale->id, ale->data);
                                        }
-                                       
+
                                        /* free the path if necessary */
                                        if (free_path)
                                                MEM_freeN(rna_path);
index b32bbd4..1158145 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h> 
+#include <string.h>
 
 #include "MEM_guardedalloc.h"
 
@@ -80,24 +80,24 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat
 {
        ListBase anim_data = {NULL, NULL};
        bAnimListElem *ale;
-       
+
        /* try to build list of filtered items */
        ANIM_animdata_filter(ac, &anim_data, filter, data, datatype);
        if (BLI_listbase_is_empty(&anim_data))
                return;
-               
+
        /* only clear the 'active' flag for the channels of the same type */
        for (ale = anim_data.first; ale; ale = ale->next) {
                /* skip if types don't match */
                if (channel_type != ale->type)
                        continue;
-               
+
                /* flag to set depends on type */
                switch (ale->type) {
                        case ANIMTYPE_GROUP:
                        {
                                bActionGroup *agrp = (bActionGroup *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(agrp, ACHANNEL_SETFLAG_CLEAR, AGRP_ACTIVE);
                                break;
                        }
@@ -105,14 +105,14 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat
                        case ANIMTYPE_NLACURVE:
                        {
                                FCurve *fcu = (FCurve *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(fcu, ACHANNEL_SETFLAG_CLEAR, FCURVE_ACTIVE);
                                break;
                        }
                        case ANIMTYPE_NLATRACK:
                        {
                                NlaTrack *nlt = (NlaTrack *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(nlt, ACHANNEL_SETFLAG_CLEAR, NLATRACK_ACTIVE);
                                break;
                        }
@@ -144,13 +144,13 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat
                        case ANIMTYPE_GPLAYER:
                        {
                                bGPDlayer *gpl = (bGPDlayer *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(gpl, ACHANNEL_SETFLAG_CLEAR, GP_LAYER_ACTIVE);
                                break;
                        }
                }
        }
-       
+
        /* set active flag */
        if (channel_data) {
                switch (channel_type) {
@@ -199,26 +199,26 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat
                                }
                                break;
                        }
-                       
+
                        case ANIMTYPE_GPLAYER:
                        {
                                bGPDlayer *gpl = (bGPDlayer *)channel_data;
                                gpl->flag |= GP_LAYER_ACTIVE;
                                break;
                        }
-                       
+
                        /* unhandled currently, but may be interesting */
                        case ANIMTYPE_MASKLAYER:
                        case ANIMTYPE_SHAPEKEY:
                        case ANIMTYPE_NLAACTION:
                                break;
-                       
+
                        /* other types */
                        default:
                                break;
                }
        }
-       
+
        /* clean up */
        ANIM_animdata_freelist(&anim_data);
 }
@@ -250,7 +250,7 @@ static void select_pchan_for_action_group(bAnimContext *ac, bActionGroup *agrp,
        }
 }
 
-/* Deselect all animation channels 
+/* Deselect all animation channels
  *     - data: pointer to datatype, as contained in bAnimContext
  *     - datatype: the type of data that 'data' represents (eAnimCont_Types)
  *     - test: check if deselecting instead of selecting
@@ -261,18 +261,18 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
        ListBase anim_data = {NULL, NULL};
        bAnimListElem *ale;
        int filter;
-       
+
        /* filter data */
        /* NOTE: no list visible, otherwise, we get dangling */
        filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;
        ANIM_animdata_filter(ac, &anim_data, filter, data, datatype);
-       
+
        /* See if we should be selecting or deselecting */
        if (test) {
                for (ale = anim_data.first; ale; ale = ale->next) {
-                       if (sel == 0) 
+                       if (sel == 0)
                                break;
-                       
+
                        switch (ale->type) {
                                case ANIMTYPE_SCENE:
                                        if (ale->flag & SCE_DS_SELECTED)
@@ -301,7 +301,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
                                        if (ale->flag & NLATRACK_SELECTED)
                                                sel = ACHANNEL_SETFLAG_CLEAR;
                                        break;
-                                       
+
                                case ANIMTYPE_FILLACTD: /* Action Expander */
                                case ANIMTYPE_DSMAT:    /* Datablock AnimData Expanders */
                                case ANIMTYPE_DSLAM:
@@ -337,16 +337,16 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
                        }
                }
        }
-               
+
        /* Now set the flags */
        for (ale = anim_data.first; ale; ale = ale->next) {
                switch (ale->type) {
                        case ANIMTYPE_SCENE:
                        {
                                Scene *scene = (Scene *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(scene, sel, SCE_DS_SELECTED);
-                               
+
                                if (scene->adt) {
                                        ACHANNEL_SET_FLAG(scene, sel, ADT_UI_SELECTED);
                                }
@@ -379,7 +379,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
                        case ANIMTYPE_NLACURVE:
                        {
                                FCurve *fcu = (FCurve *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(fcu, sel, FCURVE_SELECTED);
                                fcu->flag &= ~FCURVE_ACTIVE;
                                break;
@@ -387,14 +387,14 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
                        case ANIMTYPE_SHAPEKEY:
                        {
                                KeyBlock *kb = (KeyBlock *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(kb, sel, KEYBLOCK_SEL);
                                break;
                        }
                        case ANIMTYPE_NLATRACK:
                        {
                                NlaTrack *nlt = (NlaTrack *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(nlt, sel, NLATRACK_SELECTED);
                                nlt->flag &= ~NLATRACK_ACTIVE;
                                break;
@@ -429,27 +429,27 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
                        case ANIMTYPE_GPLAYER:
                        {
                                bGPDlayer *gpl = (bGPDlayer *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(gpl, sel, GP_LAYER_SELECT);
                                break;
                        }
                        case ANIMTYPE_MASKLAYER:
                        {
                                MaskLayer *masklay = (MaskLayer *)ale->data;
-                               
+
                                ACHANNEL_SET_FLAG(masklay, sel, MASK_LAYERFLAG_SELECT);
                                break;
                        }
                }
        }
-       
+
        /* Cleanup */
        ANIM_animdata_freelist(&anim_data);
 }
 
 /* ---------------------------- Graph Editor ------------------------------------- */
 
-/* Flush visibility (for Graph Editor) changes up/down hierarchy for changes in the given setting 
+/* Flush visibility (for Graph Editor) changes up/down hierarchy for changes in the given setting
  *     - anim_data: list of the all the anim channels that can be chosen
  *             -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too,
  *               then the channels under closed expanders get ignored...
@@ -462,7 +462,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
 {
        bAnimListElem *ale, *match = NULL;
        int prevLevel = 0, matchLevel = 0;
-       
+
        /* sanity check */
        if (ELEM(NULL, anim_data, anim_data->first))
                return;
@@ -489,23 +489,23 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
        }
        else {
                const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale_setting);
-               
+
                if (acf == NULL) {
                        printf("ERROR: no channel info for the changed channel\n");
                        return;
                }
-               
+
                /* get the level of the channel that was affected
                 *   - we define the level as simply being the offset for the start of the channel
                 */
                matchLevel = (acf->get_offset) ? acf->get_offset(ac, ale_setting) : 0;
                prevLevel = matchLevel;
        }
-       
-       /* flush up? 
+
+       /* flush up?
         *
         * For Visibility:
-        *      - only flush up if the current state is now enabled (positive 'on' state is default) 
+        *      - only flush up if the current state is now enabled (positive 'on' state is default)
         *        (otherwise, it's too much work to force the parents to be inactive too)
         *
         * For everything else:
@@ -519,25 +519,25 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
                for (ale = match->prev; ale; ale = ale->prev) {
                        const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
                        int level;
-                       
+
                        /* if no channel info was found, skip, since this type might not have any useful info */
                        if (acf == NULL)
                                continue;
-                       
-                       /* get the level of the current channel traversed 
+
+                       /* get the level of the current channel traversed
                         *   - we define the level as simply being the offset for the start of the channel
                         */
                        level = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
-                       
+
                        /* if the level is 'less than' (i.e. more important) the level we're matching
-                        * but also 'less than' the level just tried (i.e. only the 1st group above grouped F-Curves, 
+                        * but also 'less than' the level just tried (i.e. only the 1st group above grouped F-Curves,
                         * when toggling visibility of F-Curves, gets flushed, which should happen if we don't let prevLevel
                         * get updated below once the first 1st group is found)...
                         */
                        if (level < prevLevel) {
                                /* flush the new status... */
                                ANIM_channel_setting_set(ac, ale, setting, mode);
-                               
+
                                /* store this level as the 'old' level now */
                                prevLevel = level;
                        }
@@ -549,31 +549,31 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
                                if (prevLevel == 0)
                                        break;
                                /* otherwise, this level weaves into another sibling hierarchy to the previous one just
-                                * finished, so skip until we get to the parent of this level 
+                                * finished, so skip until we get to the parent of this level
                                 */
                                else
                                        continue;
                        }
                }
        }
-       
+
        /* flush down (always) */
        {
                /* go forwards in the list, until the lowest-ranking element (by indention has been covered) */
                for (ale = match->next; ale; ale = ale->next) {
                        const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
                        int level;
-                       
+
                        /* if no channel info was found, skip, since this type might not have any useful info */
                        if (acf == NULL)
                                continue;
-                       
-                       /* get the level of the current channel traversed 
+
+                       /* get the level of the current channel traversed
                         *   - we define the level as simply being the offset for the start of the channel
                         */
                        level = (acf->get_offset) ? acf->get_offset(ac, ale) : 0;
-                       
-                       /* if the level is 'greater than' (i.e. less important) the channel that was changed, 
+
+                       /* if the level is 'greater than' (i.e. less important) the channel that was changed,
                         * flush the new status...
                         */
                        if (level > matchLevel)
@@ -584,7 +584,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
                         */
                        else
                                break;
-                       
+
                        /* store this level as the 'old' level now */
                        // prevLevel = level; // XXX: prevLevel is unused
                }
@@ -596,13 +596,13 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
 /* Delete the given F-Curve from its AnimData block */
 void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu)
 {
-       /* - if no AnimData, we've got nowhere to remove the F-Curve from 
+       /* - if no AnimData, we've got nowhere to remove the F-Curve from
         *      (this doesn't guarantee that the F-Curve is in there, but at least we tried
         * - if no F-Curve, there is nothing to remove
         */
        if (ELEM(NULL, adt, fcu))
                return;
-               
+
        /* remove from whatever list it came from
         *      - Action Group
         *      - Action
@@ -615,15 +615,15 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f
        }
        else if (adt->action) {
                bAction *act = adt->action;
-               
+
                /* remove from group or action, whichever one "owns" the F-Curve */
                if (fcu->grp) {
                        bActionGroup *agrp = fcu->grp;
-                       
+
                        /* remove F-Curve from group+action */
                        action_groups_remove_channel(act, fcu);
-                       
-                       /* if group has no more channels, remove it too, 
+
+                       /* if group has no more channels, remove it too,
                         * otherwise can have many dangling groups [#33541]
                         */
                        if (BLI_listbase_is_empty(&agrp->channels)) {
@@ -633,7 +633,7 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f
                else {
                        BLI_remlink(&act->curves, fcu);
                }
-               
+
                /* if action has no more F-Curves as a result of this, unlink it from
                 * AnimData if it did not come from a NLA Strip being tweaked.
                 *
@@ -646,7 +646,7 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f
                        adt->action = NULL;
                }
        }
-               
+
        /* free the F-Curve itself */
        free_fcurve(fcu);
 }
@@ -660,7 +660,7 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f
 static int animedit_poll_channels_active(bContext *C)
 {
        ScrArea *sa = CTX_wm_area(C);
-       
+
        /* channels region test */
        /* TODO: could enhance with actually testing if channels region? */
        if (ELEM(NULL, sa, CTX_wm_region(C)))
@@ -685,13 +685,13 @@ static int animedit_poll_channels_nla_tweakmode_off(bContext *C)
        /* animation editor test */
        if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0)
                return 0;
-       
+
        /* NLA TweakMode test */
        if (sa->spacetype == SPACE_NLA) {
                if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON))
                        return 0;
        }
-               
+
        return 1;
 }
 
@@ -720,7 +720,7 @@ static const EnumPropertyItem prop_animchannel_rearrange_types[] = {
 /* Island definition - just a listbase container */
 typedef struct tReorderChannelIsland {
        struct tReorderChannelIsland *next, *prev;
-       
+
        ListBase channels;  /* channels within this region with the same state */
        int flag;           /* eReorderIslandFlag */
 } tReorderChannelIsland;
@@ -741,7 +741,7 @@ static bool rearrange_island_ok(tReorderChannelIsland *island)
        /* island must not be untouchable */
        if (island->flag & REORDER_ISLAND_UNTOUCHABLE)
                return 0;
-       
+
        /* island should be selected to be moved */
        return (island->flag & REORDER_ISLAND_SELECTED) && !(island->flag & REORDER_ISLAND_MOVED);
 }
@@ -753,13 +753,13 @@ static bool rearrange_island_top(ListBase *list, tReorderChannelIsland *island)
        if (rearrange_island_ok(island)) {
                /* remove from current position */
                BLI_remlink(list, island);
-               
+
                /* make it first element */
                BLI_insertlinkbefore(list, list->first, island);
-               
+
                return 1;
        }
-       
+
        return 0;
 }
 
@@ -777,14 +777,14 @@ static bool rearrange_island_up(ListBase *list, tReorderChannelIsland *island)
                if (prev) {
                        /* remove from current position */
                        BLI_remlink(list, island);
-                       
+
                        /* push it up */
                        BLI_insertlinkbefore(list, prev, island);
-                       
+
                        return 1;
                }
        }
-       
+
        return 0;
 }
 
@@ -804,16 +804,16 @@ static bool rearrange_island_down(ListBase *list, tReorderChannelIsland *island)
                        if ((next->flag & REORDER_ISLAND_UNTOUCHABLE) == 0) {
                                /* remove from current position */
                                BLI_remlink(list, island);
-                               
+
                                /* push it down */
                                BLI_insertlinkafter(list, next, island);
-                               
+
                                return true;
                        }
                }
                /* else: no next channel, so we're at the bottom already, so can't move */
        }
-       
+
        return false;
 }
 
@@ -821,10 +821,10 @@ static bool rearrange_island_bottom(ListBase *list, tReorderChannelIsland *islan
 {
        if (rearrange_island_ok(island)) {
                tReorderChannelIsland *last = list->last;
-               
+
                /* remove island from current position */
                BLI_remlink(list, island);
-               
+
                /* add before or after the last channel? */
                if ((last->flag & REORDER_ISLAND_UNTOUCHABLE) == 0) {
                        /* can add after it */
@@ -833,12 +833,12 @@ static bool rearrange_island_bottom(ListBase *list, tReorderChannelIsland *islan
                else {
                        /* can at most go just before it, since last cannot be moved */
                        BLI_insertlinkbefore(list, last, island);
-                       
+
                }
-               
+
                return true;
        }
-       
+
        return false;
 }
 
@@ -879,13 +879,13 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
 {
        tReorderChannelIsland *island = islands->last;  /* always try to add to last island if possible */
        bool is_sel = false, is_untouchable = false;
-       
+
        /* get flags - selected and untouchable from the channel */
        switch (type) {
                case ANIMTYPE_GROUP:
                {
                        bActionGroup *agrp = (bActionGroup *)channel;
-                       
+
                        is_sel = SEL_AGRP(agrp);
                        is_untouchable = (agrp->flag & AGRP_TEMP) != 0;
                        break;
@@ -894,21 +894,21 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
                case ANIMTYPE_NLACURVE:
                {
                        FCurve *fcu = (FCurve *)channel;
-                       
+
                        is_sel = SEL_FCU(fcu);
                        break;
                }
                case ANIMTYPE_NLATRACK:
                {
                        NlaTrack *nlt = (NlaTrack *)channel;
-                       
+
                        is_sel = SEL_NLT(nlt);
                        break;
                }
                case ANIMTYPE_GPLAYER:
                {
                        bGPDlayer *gpl = (bGPDlayer *)channel;
-                       
+
                        is_sel = SEL_GPL(gpl);
                        break;
                }
@@ -916,7 +916,7 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
                        printf("rearrange_animchannel_add_to_islands(): don't know how to handle channels of type %u\n", type);
                        return;
        }
-       
+
        /* do we need to add to a new island? */
        if (/* 1) no islands yet */
            (island == NULL) ||
@@ -931,7 +931,7 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
                /* create a new island now */
                island = MEM_callocN(sizeof(tReorderChannelIsland), "tReorderChannelIsland");
                BLI_addtail(islands, island);
-               
+
                if (is_sel)
                        island->flag |= REORDER_ISLAND_SELECTED;
                if (is_untouchable)
@@ -949,14 +949,14 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
 static void rearrange_animchannel_flatten_islands(ListBase *islands, ListBase *srcList)
 {
        tReorderChannelIsland *island, *isn = NULL;
-       
+
        /* make sure srcList is empty now */
        BLI_assert(BLI_listbase_is_empty(srcList));
-       
+
        /* go through merging islands */
        for (island = islands->first; island; island = isn) {
                isn = island->next;
-               
+
                /* merge island channels back to main list, then delete the island */
                BLI_movelisttolist(srcList, &island->channels);
                BLI_freelinkN(islands, island);
@@ -971,19 +971,19 @@ static void rearrange_animchannels_filter_visible(ListBase *anim_data_visible, b
        ListBase anim_data = {NULL, NULL};
        bAnimListElem *ale, *ale_next;
        int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
-       
+
        /* get all visible channels */
        ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
-       
+
        /* now, only keep the ones that are of the types we are interested in */
        for (ale = anim_data.first; ale; ale = ale_next) {
                ale_next = ale->next;
-               
+
                if (ale->type != type) {
                        BLI_freelinkN(&anim_data, ale);
                }
        }
-       
+
        /* return cleaned up list */
        *anim_data_visible = anim_data;
 }
@@ -996,11 +996,11 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re
        ListBase islands = {NULL, NULL};
        Link *channel, *chanNext = NULL;
        bool done = false;
-       
+
        /* don't waste effort on an empty list */
        if (BLI_listbase_is_empty(list))
                return 0;
-       
+
        /* group channels into islands */
        for (channel = list->first; channel; channel = chanNext) {
                /* find out whether this channel is present in anim_data_visible or not! */
@@ -1008,18 +1008,18 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re
                chanNext = channel->next;
                rearrange_animchannel_add_to_islands(&islands, list, channel, type, is_hidden);
        }
-       
-       /* perform moving of selected islands now, but only if there is more than one of 'em so that something will happen 
-        *      - scanning of the list is performed in the opposite direction to the direction we're moving things, so that we 
+
+       /* perform moving of selected islands now, but only if there is more than one of 'em so that something will happen
+        *      - scanning of the list is performed in the opposite direction to the direction we're moving things, so that we
         *        shouldn't need to encounter items we've moved already
         */
        if (islands.first != islands.last) {
                tReorderChannelIsland *first = (mode > 0) ? islands.last : islands.first;
                tReorderChannelIsland *island, *isn = NULL;
-               
+
                for (island = first; island; island = isn) {
                        isn = (mode > 0) ? island->prev : island->next;
-                       
+
                        /* perform rearranging */
                        if (rearrange_func(&islands, island)) {
                                island->flag |= REORDER_ISLAND_MOVED;
@@ -1027,10 +1027,10 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re
                        }
                }
        }
-       
+
        /* ungroup islands */
        rearrange_animchannel_flatten_islands(&islands, list);
-       
+
        /* did we do anything? */
        return done;
 }
@@ -1045,21 +1045,21 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAn
 {
        AnimChanRearrangeFp rearrange_func;
        ListBase anim_data_visible = {NULL, NULL};
-       
+
        /* hack: invert mode so that functions will work in right order */
        mode *= -1;
-       
+
        /* get rearranging function */
        rearrange_func = rearrange_get_mode_func(mode);
        if (rearrange_func == NULL)
                return;
-       
+
        /* Filter visible data. */
        rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_NLATRACK);
-       
+
        /* perform rearranging on tracks list */
        rearrange_animchannel_islands(&adt->nla_tracks, rearrange_func, mode, ANIMTYPE_NLATRACK, &anim_data_visible);
-       
+
        /* free temp data */
        BLI_freelistN(&anim_data_visible);
 }
@@ -1074,20 +1074,20 @@ static void rearrange_driver_channels(bAnimContext *ac, AnimData *adt, eRearrang
        /* get rearranging function */
        AnimChanRearrangeFp rearrange_func = rearrange_get_mode_func(mode);
        ListBase anim_data_visible = {NULL, NULL};
-       
+
        if (rearrange_func == NULL)
                return;
-       
+
        /* only consider drivers if they're accessible */
        if (EXPANDED_DRVD(adt) == 0)
                return;
-       
+
        /* Filter visible data. */
        rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_FCURVE);
-       
+
        /* perform rearranging on drivers list (drivers are really just F-Curves) */
        rearrange_animchannel_islands(&adt->drivers, rearrange_func, mode, ANIMTYPE_FCURVE, &anim_data_visible);
-       
+
        /* free temp data */
        BLI_freelistN(&anim_data_visible);
 }
@@ -1099,29 +1099,29 @@ static void split_groups_action_temp(bAction *act, bActionGroup *tgrp)
 {
        bActionGroup *agrp;
        FCurve *fcu;
-       
+
        if (act == NULL)
                return;
-       
+
        /* Separate F-Curves into lists per group */
        for (agrp = act->groups.first; agrp; agrp = agrp->next) {
                if (agrp->channels.first) {
                        fcu = agrp->channels.last;
                        act->curves.first = fcu->next;
-                       
+
                        fcu = agrp->channels.first;
                        fcu->prev = NULL;
-                       
+
                        fcu = agrp->channels.last;
                        fcu->next = NULL;
                }
        }
-       
+
        /* Initialize memory for temp-group */
        memset(tgrp, 0, sizeof(bActionGroup));
        tgrp->flag |= (AGRP_EXPANDED | AGRP_TEMP);
        BLI_strncpy(tgrp->name, "#TempGroup", sizeof(tgrp->name));
-       
+
        /* Move any action-channels not already moved, to the temp group */
        if (act->curves.first) {
                /* start of list */
@@ -1129,21 +1129,21 @@ static void split_groups_action_temp(bAction *act, bActionGroup *tgrp)
                fcu->prev = NULL;
                tgrp->channels.first = fcu;
                act->curves.first = NULL;
-               
+
                /* end of list */
                fcu = act->curves.last;
                fcu->next = NULL;
                tgrp->channels.last = fcu;
                act->curves.last = NULL;
-               
-               /* ensure that all of these get their group set to this temp group 
+
+               /* ensure that all of these get their group set to this temp group
                 * (so that visibility filtering works)
                 */
                for (fcu = tgrp->channels.first; fcu; fcu = fcu->next) {
                        fcu->grp = tgrp;
                }
        }
-       
+
        /* Add temp-group to list */
        BLI_addtail(&act->groups, tgrp);
 }
@@ -1152,36 +1152,36 @@ static void split_groups_action_temp(bAction *act, bActionGroup *tgrp)
 static void join_groups_action_temp(bAction *act)
 {
        bActionGroup *agrp;
-       
+
        for (agrp = act->groups.first; agrp; agrp = agrp->next) {
                ListBase tempGroup;
-               
+
                /* add list of channels to action's channels */
                tempGroup = agrp->channels;
                BLI_movelisttolist(&act->curves, &agrp->channels);
                agrp->channels = tempGroup;
-               
+
                /* clear moved flag */
                agrp->flag &= ~AGRP_MOVED;
-               
+
                /* if group was temporary one:
                 * - unassign all FCurves which were temporarily added to it
                 * - remove from list (but don't free as it's on the stack!)
                 */
                if (agrp->flag & AGRP_TEMP) {
                        FCurve *fcu;
-                       
+
                        for (fcu = agrp->channels.first; fcu; fcu = fcu->next) {
                                fcu->grp = NULL;
                        }
-                       
+
                        BLI_remlink(&act->groups, agrp);
                        break;
                }
        }
 }
 
-/* Change the order of anim-channels within action 
+/* Change the order of anim-channels within action
  *     mode: REARRANGE_ANIMCHAN_*
  */
 static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrangeAnimChan_Mode mode)
@@ -1189,35 +1189,35 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange
        bActionGroup tgrp;
        ListBase anim_data_visible = {NULL, NULL};
        bool do_channels;
-       
+
        /* get rearranging function */
        AnimChanRearrangeFp rearrange_func = rearrange_get_mode_func(mode);
-       
+
        if (rearrange_func == NULL)
                return;
-       
+
        /* make sure we're only operating with groups (vs a mixture of groups+curves) */
        split_groups_action_temp(act, &tgrp);
-       
+
        /* Filter visible data. */
        rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_GROUP);
-       
-       /* rearrange groups first 
+
+       /* rearrange groups first
         *      - the group's channels will only get considered if nothing happened when rearranging the groups
         *        i.e. the rearrange function returned 0
         */
        do_channels = (rearrange_animchannel_islands(&act->groups, rearrange_func, mode, ANIMTYPE_GROUP,
                                                     &anim_data_visible) == 0);
-       
+
        /* free temp data */
        BLI_freelistN(&anim_data_visible);
-       
+
        if (do_channels) {
                bActionGroup *agrp;
-               
+
                /* Filter visible data. */
                rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_FCURVE);
-               
+
                for (agrp = act->groups.first; agrp; agrp = agrp->next) {
                        /* only consider F-Curves if they're visible (group expanded) */
                        if (EXPANDED_AGRP(ac, agrp)) {
@@ -1225,11 +1225,11 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange
                                                              &anim_data_visible);
                        }
                }
-               
+
                /* free temp data */
                BLI_freelistN(&anim_data_visible);
        }
-       
+
        /* assemble lists into one list (and clear moved tags) */
        join_groups_action_temp(act);
 }
@@ -1239,23 +1239,23 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange
 static void rearrange_nla_control_channels(bAnimContext *ac, AnimData *adt, eRearrangeAnimChan_Mode mode)
 {
        ListBase anim_data_visible = {NULL, NULL};
-       
+
        NlaTrack *nlt;
        NlaStrip *strip;
-       
+
        /* get rearranging function */
        AnimChanRearrangeFp rearrange_func = rearrange_get_mode_func(mode);
-       
+
        if (rearrange_func == NULL)
                return;
-               
+
        /* skip if these curves aren't being shown */
        if (adt->flag & ADT_NLA_SKEYS_COLLAPSED)
                return;
-       
+
        /* Filter visible data. */
        rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_NLACURVE);
-       
+
        /* we cannot rearrange between strips, but within each strip, we can rearrange those curves */
        for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
                for (strip = nlt->strips.first; strip; strip = strip->next) {
@@ -1263,7 +1263,7 @@ static void rearrange_nla_control_channels(bAnimContext *ac, AnimData *adt, eRea
                                                          &anim_data_visible);
                }
        }
-       
+
        /* free temp data */
        BLI_freelistN(&anim_data_visible);
 }
@@ -1275,36 +1275,36 @@ static void rearrange_gpencil_channels(bAnimContext *ac, eRearrangeAnimChan_Mode
        ListBase anim_data = {NULL, NULL};
        bAnimListElem *ale;
        int filter;
-       
+
        /* get rearranging function */
        AnimChanRearrangeFp rearrange_func = rearrange_get_mode_func(mode);
-       
+
        if (rearrange_func == NULL)
                return;
-       
+
        /* get Grease Pencil datablocks */
        filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA);
        ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
-       
+
        for (ale = anim_data.first; ale; ale = ale->next) {
                ListBase anim_data_visible = {NULL, NULL};
                bGPdata *gpd = ale->data;
-               
+
                /* only consider layers if this datablock is open */
                BLI_assert(ale->type == ANIMTYPE_GPDATABLOCK);
                if ((gpd->flag & GP_DATA_EXPAND) == 0)
                        continue;
-               
+
                /* Filter visible data. */
                rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_GPLAYER);
-               
+
                /* rearrange datablock's layers */
                rearrange_animchannel_islands(&gpd->layers, rearrange_func, mode, ANIMTYPE_GPLAYER, &anim_data_visible);
-               
+
                /* free visible layers data */
                BLI_freelistN(&anim_data_visible);
        }
-       
+
        /* free GPD channel data */
        ANIM_animdata_freelist(&anim_data);
 }
@@ -1315,14 +1315,14 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
 {
        bAnimContext ac;
        eRearrangeAnimChan_Mode mode;
-       
+
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
-               
+
        /* get mode */
        mode = RNA_enum_get(op->ptr, "direction");
-       
+
        /* method to move channels depends on the editor */
        if (ac.datatype == ANIMCONT_GPENCIL) {
                /* Grease Pencil channels */
@@ -1340,23 +1340,23 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
                ListBase anim_data = {NULL, NULL};
                bAnimListElem *ale;
                int filter;
-               
+
                /* get animdata blocks */
                filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA);
                ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-               
+
                for (ale = anim_data.first; ale; ale = ale->next) {
                        AnimData *adt = ale->data;
-                       
+
                        switch (ac.datatype) {
                                case ANIMCONT_NLA: /* NLA-tracks only */
                                        rearrange_nla_channels(&ac, adt, mode);
                                        break;
-                               
+
                                case ANIMCONT_DRIVERS: /* Drivers list only */
                                        rearrange_driver_channels(&ac, adt, mode);
                                        break;
-                               
+
                                case ANIMCONT_ACTION: /* Single Action only... */
                                case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME...
                                {
@@ -1366,13 +1366,13 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
                                                printf("Animdata has no action\n");
                                        break;
                                }
-                               
+
                                default: /* DopeSheet/Graph Editor - Some Actions + NLA Control Curves */
                                {
                                        /* NLA Control Curves */
                                        if (adt->nla_tracks.first)
                                                rearrange_nla_control_channels(&ac, adt, mode);
-                                       
+
                                        /* Action */
                                        if (adt->action)
                                                rearrange_action_channels(&ac, adt->action, mode);
@@ -1382,14 +1382,14 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
                                }
                        }
                }
-               
+
                /* free temp data */
                ANIM_animdata_freelist(&anim_data);
        }
-       
+
        /* send notifier that things have changed */
        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
-       
+
        return OPERATOR_FINISHED;
 }
 
@@ -1399,14 +1399,14 @@ static void ANIM_OT_channels_move(wmOperatorType *ot)
        ot->name = "Move Channels";
        ot->idname = "ANIM_OT_channels_move";
        ot->description = "Rearrange selected animation channels";
-       
+
        /* api callbacks */
        ot->exec = animchannels_rearrange_exec;
        ot->poll = animedit_poll_channels_nla_tweakmode_off;
-       
+
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-       
+
        /* props */
        ot->prop = RNA_def_enum(ot->srna, "direction", prop_animchannel_rearrange_types, REARRANGE_ANIMCHAN_DOWN, "Direction", "");
 }
@@ -1422,16 +1422,16 @@ static int animchannels_grouping_poll(bContext *C)
        /* TODO: could enhance with actually testing if channels region? */
        if (ELEM(NULL, sa, CTX_wm_region(C)))
                return 0;
-               
+
        /* animation editor test - must be suitable modes only */
        sl = CTX_wm_space_data(C);
-       
+
        switch (sa->spacetype) {
                /* supported... */
                case SPACE_ACTION:
                {
                        SpaceAction *saction = (SpaceAction *)sl;
-                       
+
                        /* dopesheet and action only - all others are for other datatypes or have no groups */
                        if (ELEM(saction->mode, SACTCONT_ACTION, SACTCONT_DOPESHEET) == 0)
                                return 0;
@@ -1441,7 +1441,7 @@ static int animchannels_grouping_poll(bContext *C)
                case SPACE_IPO:
                {
                        SpaceIpo *sipo = (SpaceIpo *)sl;
-                       
+
                        /* drivers can't have groups... */
                        if (sipo->mode != SIPO_MODE_ANIMATION)
                                return 0;
@@ -1452,50 +1452,50 @@ static int animchannels_grouping_poll(bContext *C)
                default:
                        return 0;
        }
-       
+
        return 1;
 }
 
 /* ----------------------------------------------------------- */
 
 static void animchannels_group_channels(bAnimContext *ac, bAnimListElem *adt_ref, const char name[])
-{      
+{
        AnimData *adt = adt_ref->adt;
        bAction *act = adt->action;
-       
+
        if (act) {
                ListBase anim_data = {NULL, NULL};
                int filter;
-               
+
                /* find selected F-Curves to re-group */
                filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL);
                ANIM_animdata_filter(ac, &anim_data, filter, adt_ref, ANIMCONT_CHANNEL);
-               
+
                if (anim_data.first) {
                        bActionGroup *agrp;
                        bAnimListElem *ale;
-                       
+
                        /* create new group, which should now be part of the action */
                        agrp = action_groups_add_new(act, name);
                        BLI_assert(agrp != NULL);
-                       
+
                        /* transfer selected F-Curves across to new group  */
                        for (ale = anim_data.first; ale; ale = ale->next) {
                                FCurve *fcu = (FCurve *)ale->data;
                                bActionGroup *grp = fcu->grp;
-                               
+
                                /* remove F-Curve from group, then group too if it is now empty */
                                action_groups_remove_channel(act, fcu);
-                               
+
                                if ((grp) && BLI_listbase_is_empty(&grp->channels)) {
                                        BLI_freelinkN(&act->groups, grp);
                                }
-                               
+
                                /* add F-Curve to group */
                                action_groups_add_channel(act, agrp, fcu);
                        }
                }
-               
+
                /* cleanup */
                ANIM_animdata_freelist(&anim_data);
        }
@@ -1505,35 +1505,35 @@ static int animchannels_group_exec(bContext *C, wmOperator *op)
 {
        bAnimContext ac;
        char name[MAX_NAME];
-       
+
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
-       
+
        /* get name for new group */
        RNA_string_get(op->ptr, "name", name);
-       
+
        /* XXX: name for group should never be empty... */
        if (name[0]) {
                ListBase anim_data = {NULL, NULL};
                bAnimListElem *ale;
                int filter;
-               
+
                /* handle each animdata block separately, so that the regrouping doesn't flow into blocks  */
                filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_NODUPLIS);
                ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-               
+
                for (ale = anim_data.first; ale; ale = ale->next) {
                        animchannels_group_channels(&ac, ale, name);
                }
-               
+
                /* free temp data */
                ANIM_animdata_freelist(&anim_data);
-               
+
                /* updatss */
                WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
        }
-       
+
        return OPERATOR_FINISHED;
 }
 
@@ -1543,18 +1543,18 @@ static void ANIM_OT_channels_group(wmOperatorType *ot)
        ot->name = "Group Channels";
        ot->idname = "ANIM_OT_channels_group";
        ot->description = "Add selected F-Curves to a new group";
-       
+
        /* callbacks */
        ot->invoke = WM_operator_props_popup;
        ot->exec = animchannels_group_exec;
        ot->poll = animchannels_grouping_poll;
-       
+
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-       
+
        /* props */
-       ot->prop = RNA_def_string(ot->srna, "name", "New Group", 
-                                 sizeof(((bActionGroup *)NULL)->name), 
+       ot->prop = RNA_def_string(ot->srna, "name", "New Group",
+                                 sizeof(((bActionGroup *)NULL)->name),
                                  "Name", "Name of newly created group");
        /* RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE); */ /* XXX: still not too sure about this - keeping same text is confusing... */
 }
@@ -1564,33 +1564,33 @@ static void ANIM_OT_channels_group(wmOperatorType *ot)
 static int animchannels_ungroup_exec(bContext *C, wmOperator *UNUSED(op))
 {
        bAnimContext ac;
-       
+
        ListBase anim_data = {NULL, NULL};
        bAnimListElem *ale;
        int filter;
-       
+
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
-               
+
        /* just selected F-Curves... */
        filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS);
        ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-       
+
        for (ale = anim_data.first; ale; ale = ale->next) {
                /* find action for this F-Curve... */
                if (ale->adt && ale->adt->action) {
                        FCurve  *fcu = (FCurve *)ale->data;
                        bAction *act = ale->adt->action;
-                       
+
                        /* only proceed to remove if F-Curve is in a group... */
-                       if (fcu->grp) { 
+                       if (fcu->grp) {
                                bActionGroup *agrp = fcu->grp;
-                               
+
                                /* remove F-Curve from group and add at tail (ungrouped) */
                                action_groups_remove_channel(act, fcu);
                                BLI_addtail(&act->curves, fcu);
-                               
+
                                /* delete group if it is now empty */
                                if (BLI_listbase_is_empty(&agrp->channels)) {
                                        BLI_freelinkN(&act->groups, agrp);
@@ -1598,13 +1598,13 @@ static int animchannels_ungroup_exec(bContext *C, wmOperator *UNUSED(op))
                        }
                }
        }
-       
+
        /* cleanup */
        ANIM_animdata_freelist(&anim_data);
-       
+
        /* updates */
        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
-       
+
        return OPERATOR_FINISHED;
 }
 
@@ -1614,11 +1614,11 @@ static void ANIM_OT_channels_ungroup(wmOperatorType *ot)
        ot->name = "Ungroup Channels";
        ot->idname = "ANIM_OT_channels_ungroup";
        ot->description = "Remove selected F-Curves from their current groups";
-       
+
        /* callbacks */
        ot->exec = animchannels_ungroup_exec;
        ot->poll = animchannels_grouping_poll;
-       
+
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
@@ -1631,22 +1631,22 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
        ListBase anim_data = {NULL, NULL};
        bAnimListElem *ale;
        int filter;
-       
+
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
-       
+
        /* cannot delete in shapekey */
-       if (ac.datatype == ANIMCONT_SHAPEKEY) 
+       if (ac.datatype == ANIMCONT_SHAPEKEY)
                return OPERATOR_CANCELLED;
-               
-               
+
+
        /* do groups only first (unless in Drivers mode, where there are none) */
        if (ac.datatype != ANIMCONT_DRIVERS) {
                /* filter data */
                filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
                ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-               
+
                /* delete selected groups and their associated channels */
                for (ale = anim_data.first; ale; ale = ale->next) {
                        /* only groups - don't check other types yet, since they may no-longer exist */
@@ -1654,20 +1654,20 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                bActionGroup *agrp = (bActionGroup *)ale->data;
                                AnimData *adt = ale->adt;
                                FCurve *fcu, *fcn;
-                               
+
                                /* skip this group if no AnimData available, as we can't safely remove the F-Curves */
                                if (adt == NULL)
                                        continue;
-                               
+
                                /* delete all of the Group's F-Curves, but no others */
                                for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcn) {
                                        fcn = fcu->next;
-                                       
+
                                        /* remove from group and action, then free */
                                        action_groups_remove_channel(adt->action, fcu);
                                        free_fcurve(fcu);
                                }
-                               
+
                                /* free the group itself */
                                if (adt->action)
                                        BLI_freelinkN(&adt->action->groups, agrp);
@@ -1675,24 +1675,24 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                        MEM_freeN(agrp);
                        }
                }
-               
+
                /* cleanup */
                ANIM_animdata_freelist(&anim_data);
        }
-       
+
        /* filter data */
        filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
        ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
-       
+
        /* delete selected data channels */
        for (ale = anim_data.first; ale; ale = ale->next) {
                switch (ale->type) {
-                       case ANIMTYPE_FCURVE: 
+                       case ANIMTYPE_FCURVE:
                        {
                                /* F-Curves if we can identify its parent */
                                AnimData *adt = ale->adt;
                                FCurve *fcu = (FCurve *)ale->data;
-                               
+
                                /* try to free F-Curve */
                                ANIM_fcurve_delete_from_animdata(&ac, adt, fcu);
                                break;
@@ -1702,7 +1702,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                /* NLA Control Curve - Deleting it should disable the corresponding setting... */
                                NlaStrip *strip = (NlaStrip *)ale->owner;
                                FCurve *fcu = (FCurve *)ale->data;
-                               
+
                                if (STREQ(fcu->rna_path, "strip_time")) {
                                        strip->flag &= ~NLASTRIP_FLAG_USR_TIME;
                                }
@@ -1712,7 +1712,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                else {
                                        printf("ERROR: Trying to delete NLA Control Curve for unknown property '%s'\n", fcu->rna_path);
                                }
-                               
+
                                /* unlink and free the F-Curve */
                                BLI_remlink(&strip->fcurves, fcu);
                                free_fcurve(fcu);
@@ -1723,7 +1723,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                /* Grease Pencil layer */
                                bGPdata *gpd = (bGPdata *)ale->id;
                                bGPDlayer *gpl = (bGPDlayer *)ale->data;
-                               
+
                                /* try to delete the layer's data and the layer itself */
                                BKE_gpencil_free_frames(gpl);
                                BLI_freelinkN(&gpd->layers, gpl);
@@ -1734,35 +1734,35 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
                                /* Mask layer */
                                Mask *mask = (Mask *)ale->id;
                                MaskLayer *masklay = (MaskLayer *)ale->data;
-                               
+
                                /* try to delete the layer's data and the layer itself */
                                BKE_mask_layer_remove(mask, masklay);
                                break;
                        }
                }
        }
-       
+
        /* cleanup */
        ANIM_animdata_freelist(&anim_data);
-       
+
        /* send notifier that things have changed */
        WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
        DAG_relations_tag_update(CTX_data_main(C));
 
        return OPERATOR_FINISHED;
 }
+
 static void ANIM_OT_channels_delete(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name = "Delete Channels";
        ot->idname = "ANIM_OT_channels_delete";
        ot->description = "Delete all selected animation channels";
-       
+
        /* api callbacks */
        ot->exec = animchannels_delete_exec;
        ot->poll = animedit_poll_channels_active;
-       
+
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
@@ -1789,7 +1789,7 @@ static const EnumPropertyItem prop_animchannel_settings_types[] = {
 
 /* ------------------- */
 
-/* Set/clear a particular flag (setting) for all selected + visible channels 
+/* Set/clear a particular flag (setting) for all selected + visible channels
  *     setting: the setting to modify
  *     mode: eAnimChannels_SetFlag
  *     onlysel: only selected channels get the flag set
@@ -1801,20 +1801,20 @@ static void setflag_anim_channels(bAnimContext *ac, eAnimChannel_Settings settin
        ListBase all_data = {NULL, NULL};
        bAnimListElem *ale;
        int filter;
-       
+
        /* filter data that we need if flush is on */