Outliner: Collection - Duplicate Hierarchy, and Duplicate Linked Hierarchy
[blender.git] / source / blender / editors / space_outliner / outliner_ops.c
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19
20 /** \file
21  * \ingroup spoutliner
22  */
23
24 #include "MEM_guardedalloc.h"
25
26
27 #include "DNA_collection_types.h"
28
29 #include "BLT_translation.h"
30
31
32 #include "GPU_immediate.h"
33 #include "GPU_state.h"
34
35 #include "RNA_access.h"
36
37 #include "UI_interface.h"
38 #include "UI_view2d.h"
39
40 #include "WM_api.h"
41 #include "WM_types.h"
42
43 #include "ED_screen.h"
44 #include "ED_select_utils.h"
45
46 #include "outliner_intern.h"
47
48 /* ************************** registration **********************************/
49
50 void outliner_operatortypes(void)
51 {
52         WM_operatortype_append(OUTLINER_OT_highlight_update);
53         WM_operatortype_append(OUTLINER_OT_item_activate);
54         WM_operatortype_append(OUTLINER_OT_select_box);
55         WM_operatortype_append(OUTLINER_OT_item_openclose);
56         WM_operatortype_append(OUTLINER_OT_item_rename);
57         WM_operatortype_append(OUTLINER_OT_item_drag_drop);
58         WM_operatortype_append(OUTLINER_OT_operation);
59         WM_operatortype_append(OUTLINER_OT_scene_operation);
60         WM_operatortype_append(OUTLINER_OT_object_operation);
61         WM_operatortype_append(OUTLINER_OT_lib_operation);
62         WM_operatortype_append(OUTLINER_OT_lib_relocate);
63         WM_operatortype_append(OUTLINER_OT_id_operation);
64         WM_operatortype_append(OUTLINER_OT_id_delete);
65         WM_operatortype_append(OUTLINER_OT_id_remap);
66         WM_operatortype_append(OUTLINER_OT_data_operation);
67         WM_operatortype_append(OUTLINER_OT_animdata_operation);
68         WM_operatortype_append(OUTLINER_OT_action_set);
69         WM_operatortype_append(OUTLINER_OT_constraint_operation);
70         WM_operatortype_append(OUTLINER_OT_modifier_operation);
71
72         WM_operatortype_append(OUTLINER_OT_show_one_level);
73         WM_operatortype_append(OUTLINER_OT_show_active);
74         WM_operatortype_append(OUTLINER_OT_show_hierarchy);
75         WM_operatortype_append(OUTLINER_OT_scroll_page);
76
77         WM_operatortype_append(OUTLINER_OT_select_all);
78         WM_operatortype_append(OUTLINER_OT_expanded_toggle);
79
80         WM_operatortype_append(OUTLINER_OT_keyingset_add_selected);
81         WM_operatortype_append(OUTLINER_OT_keyingset_remove_selected);
82
83         WM_operatortype_append(OUTLINER_OT_drivers_add_selected);
84         WM_operatortype_append(OUTLINER_OT_drivers_delete_selected);
85
86         WM_operatortype_append(OUTLINER_OT_orphans_purge);
87
88         WM_operatortype_append(OUTLINER_OT_parent_drop);
89         WM_operatortype_append(OUTLINER_OT_parent_clear);
90         WM_operatortype_append(OUTLINER_OT_scene_drop);
91         WM_operatortype_append(OUTLINER_OT_material_drop);
92         WM_operatortype_append(OUTLINER_OT_collection_drop);
93
94         /* collections */
95         WM_operatortype_append(OUTLINER_OT_collection_new);
96         WM_operatortype_append(OUTLINER_OT_collection_duplicate);
97         WM_operatortype_append(OUTLINER_OT_collection_duplicate_hierarchy);
98         WM_operatortype_append(OUTLINER_OT_collection_duplicate_linked_hierarchy);
99         WM_operatortype_append(OUTLINER_OT_collection_delete);
100         WM_operatortype_append(OUTLINER_OT_collection_objects_select);
101         WM_operatortype_append(OUTLINER_OT_collection_objects_deselect);
102         WM_operatortype_append(OUTLINER_OT_collection_link);
103         WM_operatortype_append(OUTLINER_OT_collection_instance);
104         WM_operatortype_append(OUTLINER_OT_collection_exclude_set);
105         WM_operatortype_append(OUTLINER_OT_collection_exclude_clear);
106         WM_operatortype_append(OUTLINER_OT_collection_holdout_set);
107         WM_operatortype_append(OUTLINER_OT_collection_holdout_clear);
108         WM_operatortype_append(OUTLINER_OT_collection_indirect_only_set);
109         WM_operatortype_append(OUTLINER_OT_collection_indirect_only_clear);
110
111         WM_operatortype_append(OUTLINER_OT_collection_isolate);
112         WM_operatortype_append(OUTLINER_OT_collection_disable);
113         WM_operatortype_append(OUTLINER_OT_collection_enable);
114         WM_operatortype_append(OUTLINER_OT_collection_hide);
115         WM_operatortype_append(OUTLINER_OT_collection_show);
116         WM_operatortype_append(OUTLINER_OT_collection_disable_render);
117         WM_operatortype_append(OUTLINER_OT_collection_enable_render);
118         WM_operatortype_append(OUTLINER_OT_collection_hide_inside);
119         WM_operatortype_append(OUTLINER_OT_collection_show_inside);
120         WM_operatortype_append(OUTLINER_OT_hide);
121         WM_operatortype_append(OUTLINER_OT_unhide_all);
122 }
123
124 void outliner_keymap(wmKeyConfig *keyconf)
125 {
126         WM_keymap_ensure(keyconf, "Outliner", SPACE_OUTLINER, 0);
127 }