~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/editors/animation/anim_channels_edit.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-04-28 12:11:12 UTC
  • mto: (14.1.6 experimental) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20120428121112-2zi0vp8b6vejda8i
Tags: upstream-2.63
ImportĀ upstreamĀ versionĀ 2.63

Show diffs side-by-side

added added

removed removed

Lines of Context:
367
367
 *      - anim_data: list of the all the anim channels that can be chosen
368
368
 *              -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too,
369
369
 *                then the channels under closed expanders get ignored...
370
 
 *      - ale_setting: the anim channel (not in the anim_data list directly, though occuring there)
 
370
 *      - ale_setting: the anim channel (not in the anim_data list directly, though occurring there)
371
371
 *              with the new state of the setting that we want flushed up/down the hierarchy 
372
372
 *      - setting: type of setting to set
373
373
 *      - on: whether the visibility setting has been enabled or disabled 
394
394
                }
395
395
        }
396
396
        if (match == NULL) {
397
 
                printf("ERROR: no channel matching the one changed was found \n");
 
397
                printf("ERROR: no channel matching the one changed was found\n");
398
398
                return;
399
399
        }
400
400
        else {
401
401
                bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale_setting);
402
402
                
403
403
                if (acf == NULL) {
404
 
                        printf("ERROR: no channel info for the changed channel \n");
 
404
                        printf("ERROR: no channel info for the changed channel\n");
405
405
                        return;
406
406
                }
407
407
                
541
541
                        /* XXX: there's a problem where many actions could build up in the file if multiple
542
542
                         * full add/delete cycles are performed on the same objects, but assume that this is rare
543
543
                         */
544
 
                if ((adt->action->curves.first == NULL) && (adt->flag & ADT_NLA_EDIT_ON)==0)
545
 
                {
 
544
                if ((adt->action->curves.first == NULL) && (adt->flag & ADT_NLA_EDIT_ON)==0) {
546
545
                        id_us_min(&adt->action->id);
547
546
                        adt->action = NULL;
548
547
                }
951
950
                }
952
951
        }
953
952
        
954
 
        /* Initialise memory for temp-group */
 
953
        /* Initialize memory for temp-group */
955
954
        memset(tgrp, 0, sizeof(bActionGroup));
956
955
        tgrp->flag |= (AGRP_EXPANDED|AGRP_TEMP);
957
956
        BLI_strncpy(tgrp->name, "#TempGroup", sizeof(tgrp->name));
1086
1085
                                default: /* some collection of actions */
1087
1086
                                        if (adt->action)
1088
1087
                                                rearrange_action_channels(&ac, adt->action, mode);
1089
 
                                        else if (G.f & G_DEBUG)
 
1088
                                        else if (G.debug & G_DEBUG)
1090
1089
                                                printf("Animdata has no action\n");
1091
1090
                                        break;
1092
1091
                        }
1105
1104
static void ANIM_OT_channels_move (wmOperatorType *ot)
1106
1105
{
1107
1106
        /* identifiers */
1108
 
        ot->name= "Move Channels";
1109
 
        ot->idname= "ANIM_OT_channels_move";
 
1107
        ot->name = "Move Channels";
 
1108
        ot->idname = "ANIM_OT_channels_move";
1110
1109
        ot->description = "Rearrange selected animation channels";
1111
1110
        
1112
1111
        /* api callbacks */
1113
 
        ot->exec= animchannels_rearrange_exec;
1114
 
        ot->poll= animedit_poll_channels_nla_tweakmode_off;
 
1112
        ot->exec = animchannels_rearrange_exec;
 
1113
        ot->poll = animedit_poll_channels_nla_tweakmode_off;
1115
1114
        
1116
1115
        /* flags */
1117
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1116
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1118
1117
        
1119
1118
        /* props */
1120
 
        ot->prop= RNA_def_enum(ot->srna, "direction", prop_animchannel_rearrange_types, REARRANGE_ANIMCHAN_DOWN, "Direction", "");
 
1119
        ot->prop = RNA_def_enum(ot->srna, "direction", prop_animchannel_rearrange_types, REARRANGE_ANIMCHAN_DOWN, "Direction", "");
1121
1120
}
1122
1121
 
1123
1122
/* ******************** Delete Channel Operator *********************** */
1221
1220
static void ANIM_OT_channels_delete (wmOperatorType *ot)
1222
1221
{
1223
1222
        /* identifiers */
1224
 
        ot->name= "Delete Channels";
1225
 
        ot->idname= "ANIM_OT_channels_delete";
1226
 
        ot->description= "Delete all selected animation channels";
 
1223
        ot->name = "Delete Channels";
 
1224
        ot->idname = "ANIM_OT_channels_delete";
 
1225
        ot->description = "Delete all selected animation channels";
1227
1226
        
1228
1227
        /* api callbacks */
1229
 
        ot->exec= animchannels_delete_exec;
1230
 
        ot->poll= animedit_poll_channels_active;
 
1228
        ot->exec = animchannels_delete_exec;
 
1229
        ot->poll = animedit_poll_channels_active;
1231
1230
        
1232
1231
        /* flags */
1233
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1232
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1234
1233
}
1235
1234
 
1236
1235
/* ******************** Set Channel Visibility Operator *********************** */
1313
1312
static void ANIM_OT_channels_visibility_set (wmOperatorType *ot)
1314
1313
{
1315
1314
        /* identifiers */
1316
 
        ot->name= "Set Visibility";
1317
 
        ot->idname= "ANIM_OT_channels_visibility_set";
1318
 
        ot->description= "Make only the selected animation channels visible in the Graph Editor";
 
1315
        ot->name = "Set Visibility";
 
1316
        ot->idname = "ANIM_OT_channels_visibility_set";
 
1317
        ot->description = "Make only the selected animation channels visible in the Graph Editor";
1319
1318
        
1320
1319
        /* api callbacks */
1321
 
        ot->exec= animchannels_visibility_set_exec;
1322
 
        ot->poll= ED_operator_graphedit_active;
 
1320
        ot->exec = animchannels_visibility_set_exec;
 
1321
        ot->poll = ED_operator_graphedit_active;
1323
1322
        
1324
1323
        /* flags */
1325
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1324
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1326
1325
}
1327
1326
 
1328
1327
 
1390
1389
static void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot)
1391
1390
{
1392
1391
        /* identifiers */
1393
 
        ot->name= "Toggle Visibility";
1394
 
        ot->idname= "ANIM_OT_channels_visibility_toggle";
1395
 
        ot->description= "Toggle visibility in Graph Editor of all selected animation channels";
 
1392
        ot->name = "Toggle Visibility";
 
1393
        ot->idname = "ANIM_OT_channels_visibility_toggle";
 
1394
        ot->description = "Toggle visibility in Graph Editor of all selected animation channels";
1396
1395
        
1397
1396
        /* api callbacks */
1398
 
        ot->exec= animchannels_visibility_toggle_exec;
1399
 
        ot->poll= ED_operator_graphedit_active;
 
1397
        ot->exec = animchannels_visibility_toggle_exec;
 
1398
        ot->poll = ED_operator_graphedit_active;
1400
1399
        
1401
1400
        /* flags */
1402
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1401
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1403
1402
}
1404
1403
 
1405
1404
/* ********************** Set Flags Operator *********************** */
1533
1532
static void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
1534
1533
{
1535
1534
        /* identifiers */
1536
 
        ot->name= "Enable Channel Setting";
1537
 
        ot->idname= "ANIM_OT_channels_setting_enable";
1538
 
        ot->description= "Enable specified setting on all selected animation channels";
 
1535
        ot->name = "Enable Channel Setting";
 
1536
        ot->idname = "ANIM_OT_channels_setting_enable";
 
1537
        ot->description = "Enable specified setting on all selected animation channels";
1539
1538
        
1540
1539
        /* api callbacks */
1541
 
        ot->invoke= WM_menu_invoke;
1542
 
        ot->exec= animchannels_setflag_exec;
1543
 
        ot->poll= animedit_poll_channels_active;
 
1540
        ot->invoke = WM_menu_invoke;
 
1541
        ot->exec = animchannels_setflag_exec;
 
1542
        ot->poll = animedit_poll_channels_active;
1544
1543
        
1545
1544
        /* flags */
1546
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1545
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1547
1546
        
1548
1547
        /* props */
1549
1548
                /* flag-setting mode */
1550
1549
        RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_ADD, "Mode", "");
1551
1550
                /* setting to set */
1552
 
        ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
 
1551
        ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
1553
1552
}
1554
1553
/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
1555
1554
static void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
1556
1555
{
1557
1556
        /* identifiers */
1558
 
        ot->name= "Disable Channel Setting";
1559
 
        ot->idname= "ANIM_OT_channels_setting_disable";
1560
 
        ot->description= "Disable specified setting on all selected animation channels";
 
1557
        ot->name = "Disable Channel Setting";
 
1558
        ot->idname = "ANIM_OT_channels_setting_disable";
 
1559
        ot->description = "Disable specified setting on all selected animation channels";
1561
1560
        
1562
1561
        /* api callbacks */
1563
 
        ot->invoke= WM_menu_invoke;
1564
 
        ot->exec= animchannels_setflag_exec;
1565
 
        ot->poll= animedit_poll_channels_active;
 
1562
        ot->invoke = WM_menu_invoke;
 
1563
        ot->exec = animchannels_setflag_exec;
 
1564
        ot->poll = animedit_poll_channels_active;
1566
1565
        
1567
1566
        /* flags */
1568
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1567
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1569
1568
        
1570
1569
        /* props */
1571
1570
                /* flag-setting mode */
1572
1571
        RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_CLEAR, "Mode", "");
1573
1572
                /* setting to set */
1574
 
        ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
 
1573
        ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
1575
1574
}
1576
1575
 
1577
1576
static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
1578
1577
{
1579
1578
        /* identifiers */
1580
 
        ot->name= "Toggle Channel Setting";
1581
 
        ot->idname= "ANIM_OT_channels_setting_toggle";
1582
 
        ot->description= "Toggle specified setting on all selected animation channels";
 
1579
        ot->name = "Toggle Channel Setting";
 
1580
        ot->idname = "ANIM_OT_channels_setting_toggle";
 
1581
        ot->description = "Toggle specified setting on all selected animation channels";
1583
1582
        
1584
1583
        /* api callbacks */
1585
 
        ot->invoke= WM_menu_invoke;
1586
 
        ot->exec= animchannels_setflag_exec;
1587
 
        ot->poll= animedit_poll_channels_active;
 
1584
        ot->invoke = WM_menu_invoke;
 
1585
        ot->exec = animchannels_setflag_exec;
 
1586
        ot->poll = animedit_poll_channels_active;
1588
1587
        
1589
1588
        /* flags */
1590
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1589
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1591
1590
        
1592
1591
        /* props */
1593
1592
                /* flag-setting mode */
1594
1593
        RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", "");
1595
1594
                /* setting to set */
1596
 
        ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
 
1595
        ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
1597
1596
}
1598
1597
 
1599
1598
static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
1600
1599
{
1601
1600
        /* identifiers */
1602
 
        ot->name= "Toggle Channel Editability";
1603
 
        ot->idname= "ANIM_OT_channels_editable_toggle";
1604
 
        ot->description= "Toggle editability of selected channels";
 
1601
        ot->name = "Toggle Channel Editability";
 
1602
        ot->idname = "ANIM_OT_channels_editable_toggle";
 
1603
        ot->description = "Toggle editability of selected channels";
1605
1604
        
1606
1605
        /* api callbacks */
1607
 
        ot->exec= animchannels_setflag_exec;
1608
 
        ot->poll= animedit_poll_channels_active;
 
1606
        ot->exec = animchannels_setflag_exec;
 
1607
        ot->poll = animedit_poll_channels_active;
1609
1608
        
1610
1609
        /* flags */
1611
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1610
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1612
1611
        
1613
1612
        /* props */
1614
1613
                /* flag-setting mode */
1644
1643
static void ANIM_OT_channels_expand (wmOperatorType *ot)
1645
1644
{
1646
1645
        /* identifiers */
1647
 
        ot->name= "Expand Channels";
1648
 
        ot->idname= "ANIM_OT_channels_expand";
1649
 
        ot->description= "Expand (i.e. open) all selected expandable animation channels";
 
1646
        ot->name = "Expand Channels";
 
1647
        ot->idname = "ANIM_OT_channels_expand";
 
1648
        ot->description = "Expand (i.e. open) all selected expandable animation channels";
1650
1649
        
1651
1650
        /* api callbacks */
1652
 
        ot->exec= animchannels_expand_exec;
1653
 
        ot->poll= animedit_poll_channels_active;
 
1651
        ot->exec = animchannels_expand_exec;
 
1652
        ot->poll = animedit_poll_channels_active;
1654
1653
        
1655
1654
        /* flags */
1656
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1655
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1657
1656
        
1658
1657
        /* props */
1659
 
        ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Expand all channels (not just selected ones)");
 
1658
        ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All", "Expand all channels (not just selected ones)");
1660
1659
}
1661
1660
 
1662
1661
/* ********************** Collapse Channels Operator *********************** */
1686
1685
static void ANIM_OT_channels_collapse (wmOperatorType *ot)
1687
1686
{
1688
1687
        /* identifiers */
1689
 
        ot->name= "Collapse Channels";
1690
 
        ot->idname= "ANIM_OT_channels_collapse";
1691
 
        ot->description= "Collapse (i.e. close) all selected expandable animation channels";
 
1688
        ot->name = "Collapse Channels";
 
1689
        ot->idname = "ANIM_OT_channels_collapse";
 
1690
        ot->description = "Collapse (i.e. close) all selected expandable animation channels";
1692
1691
        
1693
1692
        /* api callbacks */
1694
 
        ot->exec= animchannels_collapse_exec;
1695
 
        ot->poll= animedit_poll_channels_active;
 
1693
        ot->exec = animchannels_collapse_exec;
 
1694
        ot->poll = animedit_poll_channels_active;
1696
1695
        
1697
1696
        /* flags */
1698
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1697
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1699
1698
        
1700
1699
        /* props */
1701
 
        ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Collapse all channels (not just selected ones)");
 
1700
        ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All", "Collapse all channels (not just selected ones)");
1702
1701
}
1703
1702
 
1704
1703
/* ******************* Reenable Disabled Operator ******************* */
1762
1761
static void ANIM_OT_channels_fcurves_enable (wmOperatorType *ot)
1763
1762
{
1764
1763
        /* identifiers */
1765
 
        ot->name= "Revive Disabled F-Curves";
1766
 
        ot->idname= "ANIM_OT_channels_fcurves_enable";
1767
 
        ot->description= "Clears 'disabled' tag from all F-Curves to get broken F-Curves working again";
 
1764
        ot->name = "Revive Disabled F-Curves";
 
1765
        ot->idname = "ANIM_OT_channels_fcurves_enable";
 
1766
        ot->description = "Clears 'disabled' tag from all F-Curves to get broken F-Curves working again";
1768
1767
        
1769
1768
        /* api callbacks */
1770
 
        ot->exec= animchannels_enable_exec;
1771
 
        ot->poll= animchannels_enable_poll;
 
1769
        ot->exec = animchannels_enable_exec;
 
1770
        ot->poll = animchannels_enable_poll;
1772
1771
        
1773
1772
        /* flags */
1774
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1773
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1775
1774
}
1776
1775
 
1777
1776
/* ********************** Select All Operator *********************** */
1784
1783
        if (ANIM_animdata_get_context(C, &ac) == 0)
1785
1784
                return OPERATOR_CANCELLED;
1786
1785
                
1787
 
        /* 'standard' behaviour - check if selected, then apply relevant selection */
 
1786
        /* 'standard' behavior - check if selected, then apply relevant selection */
1788
1787
        if (RNA_boolean_get(op->ptr, "invert"))
1789
1788
                ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, 0, ACHANNEL_SETFLAG_TOGGLE);
1790
1789
        else
1799
1798
static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
1800
1799
{
1801
1800
        /* identifiers */
1802
 
        ot->name= "Select All";
1803
 
        ot->idname= "ANIM_OT_channels_select_all_toggle";
1804
 
        ot->description= "Toggle selection of all animation channels";
 
1801
        ot->name = "Select All";
 
1802
        ot->idname = "ANIM_OT_channels_select_all_toggle";
 
1803
        ot->description = "Toggle selection of all animation channels";
1805
1804
        
1806
1805
        /* api callbacks */
1807
 
        ot->exec= animchannels_deselectall_exec;
1808
 
        ot->poll= animedit_poll_channels_nla_tweakmode_off;
 
1806
        ot->exec = animchannels_deselectall_exec;
 
1807
        ot->poll = animedit_poll_channels_nla_tweakmode_off;
1809
1808
        
1810
1809
        /* flags */
1811
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1810
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1812
1811
        
1813
1812
        /* props */
1814
 
        ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
 
1813
        ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
1815
1814
}
1816
1815
 
1817
1816
/* ******************** Borderselect Operator *********************** */
1902
1901
                return OPERATOR_CANCELLED;
1903
1902
        
1904
1903
        /* get settings from operator */
1905
 
        rect.xmin= RNA_int_get(op->ptr, "xmin");
1906
 
        rect.ymin= RNA_int_get(op->ptr, "ymin");
1907
 
        rect.xmax= RNA_int_get(op->ptr, "xmax");
1908
 
        rect.ymax= RNA_int_get(op->ptr, "ymax");
 
1904
        rect.xmin = RNA_int_get(op->ptr, "xmin");
 
1905
        rect.ymin = RNA_int_get(op->ptr, "ymin");
 
1906
        rect.xmax = RNA_int_get(op->ptr, "xmax");
 
1907
        rect.ymax = RNA_int_get(op->ptr, "ymax");
1909
1908
        
1910
1909
        gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
1911
1910
        extend= RNA_boolean_get(op->ptr, "extend");
1912
1911
 
1913
 
        if(!extend)
 
1912
        if (!extend)
1914
1913
                ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, 1, ACHANNEL_SETFLAG_CLEAR);
1915
1914
 
1916
1915
        if (gesture_mode == GESTURE_MODAL_SELECT)
1930
1929
static void ANIM_OT_channels_select_border(wmOperatorType *ot)
1931
1930
{
1932
1931
        /* identifiers */
1933
 
        ot->name= "Border Select";
1934
 
        ot->idname= "ANIM_OT_channels_select_border";
1935
 
        ot->description= "Select all animation channels within the specified region";
 
1932
        ot->name = "Border Select";
 
1933
        ot->idname = "ANIM_OT_channels_select_border";
 
1934
        ot->description = "Select all animation channels within the specified region";
1936
1935
        
1937
1936
        /* api callbacks */
1938
 
        ot->invoke= WM_border_select_invoke;
1939
 
        ot->exec= animchannels_borderselect_exec;
1940
 
        ot->modal= WM_border_select_modal;
1941
 
        ot->cancel= WM_border_select_cancel;
 
1937
        ot->invoke = WM_border_select_invoke;
 
1938
        ot->exec = animchannels_borderselect_exec;
 
1939
        ot->modal = WM_border_select_modal;
 
1940
        ot->cancel = WM_border_select_cancel;
1942
1941
        
1943
 
        ot->poll= animedit_poll_channels_nla_tweakmode_off;
 
1942
        ot->poll = animedit_poll_channels_nla_tweakmode_off;
1944
1943
        
1945
1944
        /* flags */
1946
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
1945
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1947
1946
        
1948
1947
        /* rna */
1949
1948
        WM_operator_properties_gesture_border(ot, TRUE);
1968
1967
        ale= BLI_findlink(&anim_data, channel_index);
1969
1968
        if (ale == NULL) {
1970
1969
                /* channel not found */
1971
 
                if (G.f & G_DEBUG)
1972
 
                        printf("Error: animation channel (index = %d) not found in rename_anim_channels() \n", channel_index);
 
1970
                if (G.debug & G_DEBUG)
 
1971
                        printf("Error: animation channel (index = %d) not found in rename_anim_channels()\n", channel_index);
1973
1972
                
1974
1973
                BLI_freelistN(&anim_data);
1975
1974
                return;
1985
1984
                if (acf->name_prop(ale, &ptr, &prop)) {
1986
1985
                        /* actually showing the rename textfield is done on redraw,
1987
1986
                         * so here we just store the index of this channel in the 
1988
 
                         * dopesheet data, which will get utilised when drawing the
 
1987
                         * dopesheet data, which will get utilized when drawing the
1989
1988
                         * channel...
1990
1989
                         *
1991
1990
                         * +1 factor is for backwards compat issues
2041
2040
static void ANIM_OT_channels_rename (wmOperatorType *ot)
2042
2041
{
2043
2042
        /* identifiers */
2044
 
        ot->name= "Rename Channels";
2045
 
        ot->idname= "ANIM_OT_channels_rename";
2046
 
        ot->description= "Rename animation channel under mouse";
 
2043
        ot->name = "Rename Channels";
 
2044
        ot->idname = "ANIM_OT_channels_rename";
 
2045
        ot->description = "Rename animation channel under mouse";
2047
2046
        
2048
2047
        /* api callbacks */
2049
 
        ot->invoke= animchannels_rename_invoke;
2050
 
        ot->poll= animedit_poll_channels_active;
 
2048
        ot->invoke = animchannels_rename_invoke;
 
2049
        ot->poll = animedit_poll_channels_active;
2051
2050
}
2052
2051
 
2053
2052
/* ******************** Mouse-Click Operator *********************** */
2069
2068
        ale= BLI_findlink(&anim_data, channel_index);
2070
2069
        if (ale == NULL) {
2071
2070
                /* channel not found */
2072
 
                if (G.f & G_DEBUG)
2073
 
                        printf("Error: animation channel (index = %d) not found in mouse_anim_channels() \n", channel_index);
 
2071
                if (G.debug & G_DEBUG)
 
2072
                        printf("Error: animation channel (index = %d) not found in mouse_anim_channels()\n", channel_index);
2074
2073
                
2075
2074
                BLI_freelistN(&anim_data);
2076
2075
                return 0;
2289
2288
                }
2290
2289
                        break;
2291
2290
                default:
2292
 
                        if (G.f & G_DEBUG)
2293
 
                                printf("Error: Invalid channel type in mouse_anim_channels() \n");
 
2291
                        if (G.debug & G_DEBUG)
 
2292
                                printf("Error: Invalid channel type in mouse_anim_channels()\n");
2294
2293
        }
2295
2294
        
2296
2295
        /* free channels */
2350
2349
static void ANIM_OT_channels_click (wmOperatorType *ot)
2351
2350
{
2352
2351
        /* identifiers */
2353
 
        ot->name= "Mouse Click on Channels";
2354
 
        ot->idname= "ANIM_OT_channels_click";
2355
 
        ot->description= "Handle mouse-clicks over animation channels";
 
2352
        ot->name = "Mouse Click on Channels";
 
2353
        ot->idname = "ANIM_OT_channels_click";
 
2354
        ot->description = "Handle mouse-clicks over animation channels";
2356
2355
        
2357
2356
        /* api callbacks */
2358
 
        ot->invoke= animchannels_mouseclick_invoke;
2359
 
        ot->poll= animedit_poll_channels_active;
 
2357
        ot->invoke = animchannels_mouseclick_invoke;
 
2358
        ot->poll = animedit_poll_channels_active;
2360
2359
        
2361
2360
        /* flags */
2362
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
2361
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
2363
2362
        
2364
2363
        /* id-props */
2365
2364
        RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY