1105
1104
static void ANIM_OT_channels_move (wmOperatorType *ot)
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";
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;
1117
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1116
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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", "");
1123
1122
/* ******************** Delete Channel Operator *********************** */
1533
1532
static void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
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";
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;
1546
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1545
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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", "");
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)
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";
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;
1568
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1567
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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", "");
1577
1576
static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
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";
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;
1590
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1589
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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", "");
1599
1598
static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
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";
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;
1611
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1610
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1614
1613
/* flag-setting mode */
1644
1643
static void ANIM_OT_channels_expand (wmOperatorType *ot)
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";
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;
1656
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1655
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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)");
1662
1661
/* ********************** Collapse Channels Operator *********************** */
1686
1685
static void ANIM_OT_channels_collapse (wmOperatorType *ot)
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";
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;
1698
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1697
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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)");
1704
1703
/* ******************* Reenable Disabled Operator ******************* */
1799
1798
static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
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";
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;
1811
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1810
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1814
ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
1813
ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
1817
1816
/* ******************** Borderselect Operator *********************** */
1902
1901
return OPERATOR_CANCELLED;
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");
1910
1909
gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
1911
1910
extend= RNA_boolean_get(op->ptr, "extend");
1914
1913
ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, 1, ACHANNEL_SETFLAG_CLEAR);
1916
1915
if (gesture_mode == GESTURE_MODAL_SELECT)
1930
1929
static void ANIM_OT_channels_select_border(wmOperatorType *ot)
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";
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;
1943
ot->poll= animedit_poll_channels_nla_tweakmode_off;
1942
ot->poll = animedit_poll_channels_nla_tweakmode_off;
1946
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
1945
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
1949
1948
WM_operator_properties_gesture_border(ot, TRUE);
2350
2349
static void ANIM_OT_channels_click (wmOperatorType *ot)
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";
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;
2362
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
2361
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
2365
2364
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY