4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2008 Blender Foundation.
21 * All rights reserved.
24 * Contributor(s): Blender Foundation
26 * ***** END GPL LICENSE BLOCK *****
29 #ifndef ED_OUTLINER_INTERN_H
30 #define ED_OUTLINER_INTERN_H
32 #include "RNA_types.h"
34 /* internal exports only */
36 struct wmWindowManager;
37 struct wmOperatorType;
43 typedef struct TreeElement {
44 struct TreeElement *next, *prev, *parent;
46 float xs, ys; // do selection
47 int store_index; // offset in tree store
48 short flag, index; // flag for non-saved stuff, index for data arrays
49 short idcode; // from TreeStore id
50 short xend; // width of item display, for select
52 void *directdata; // Armature Bones, Base, Sequence, Strip...
53 PointerRNA rnaptr; // RNA Pointer
56 /* TreeElement->flag */
59 #define TE_LAZY_CLOSED 4
60 #define TE_FREE_NAME 8
62 /* TreeStoreElem types */
64 #define TSE_NLA_ACTION 2
65 #define TSE_DEFGROUP_BASE 3
66 #define TSE_DEFGROUP 4
69 #define TSE_CONSTRAINT_BASE 7
70 #define TSE_CONSTRAINT 8
71 #define TSE_MODIFIER_BASE 9
72 #define TSE_MODIFIER 10
73 #define TSE_LINKED_OB 11
74 #define TSE_SCRIPT_BASE 12
75 #define TSE_POSE_BASE 13
76 #define TSE_POSE_CHANNEL 14
77 #define TSE_ANIM_DATA 15
78 #define TSE_DRIVER_BASE 16
82 #define TSE_R_LAYER_BASE 19
83 #define TSE_R_LAYER 20
85 #define TSE_LINKED_MAT 22
86 /* NOTE, is used for light group */
87 #define TSE_LINKED_LAMP 23
88 #define TSE_POSEGRP_BASE 24
89 #define TSE_POSEGRP 25
90 #define TSE_SEQUENCE 26
91 #define TSE_SEQ_STRIP 27
92 #define TSE_SEQUENCE_DUP 28
93 #define TSE_LINKED_PSYS 29
94 #define TSE_RNA_STRUCT 30
95 #define TSE_RNA_PROPERTY 31
96 #define TSE_RNA_ARRAY_ELEM 32
97 #define TSE_NLA_TRACK 33
99 #define TSE_KEYMAP_ITEM 35
101 /* outliner search flags */
103 #define OL_FIND_CASE 1
104 #define OL_FIND_COMPLETE 2
105 #define OL_FIND_COMPLETE_CASE 3
108 #define OL_NAMEBUTTON 1
112 void outliner_operatortypes(void);
113 void outliner_keymap(struct wmWindowManager *wm);
115 /* outliner_header.c */
116 void outliner_header_buttons(const struct bContext *C, struct ARegion *ar);
119 void outliner_free_tree(struct ListBase *lb);
120 void outliner_select(struct SpaceOops *soops, struct ListBase *lb, int *index, short *selecting);
121 void draw_outliner(const struct bContext *C);
123 void OUTLINER_OT_item_activate(struct wmOperatorType *ot);
124 void OUTLINER_OT_item_openclose(struct wmOperatorType *ot);
125 void OUTLINER_OT_item_rename(struct wmOperatorType *ot);
126 void OUTLINER_OT_operation(struct wmOperatorType *ot);
127 void OUTLINER_OT_object_operation(struct wmOperatorType *ot);
128 void OUTLINER_OT_group_operation(struct wmOperatorType *ot);
129 void OUTLINER_OT_id_operation(struct wmOperatorType *ot);
130 void OUTLINER_OT_data_operation(struct wmOperatorType *ot);
132 void OUTLINER_OT_drag(struct wmOperatorType *ot);
134 void OUTLINER_OT_show_one_level(struct wmOperatorType *ot);
135 void OUTLINER_OT_show_active(struct wmOperatorType *ot);
136 void OUTLINER_OT_show_hierarchy(struct wmOperatorType *ot);
138 void OUTLINER_OT_selected_toggle(struct wmOperatorType *ot);
139 void OUTLINER_OT_expanded_toggle(struct wmOperatorType *ot);
141 void OUTLINER_OT_renderability_toggle(struct wmOperatorType *ot);
142 void OUTLINER_OT_selectability_toggle(struct wmOperatorType *ot);
143 void OUTLINER_OT_visibility_toggle(struct wmOperatorType *ot);
145 void OUTLINER_OT_keyingset_add_selected(struct wmOperatorType *ot);
146 void OUTLINER_OT_keyingset_remove_selected(struct wmOperatorType *ot);
148 void OUTLINER_OT_drivers_add(struct wmOperatorType *ot);
149 void OUTLINER_OT_drivers_delete(struct wmOperatorType *ot);
152 extern void outliner_mouse_event(Scene *scene, ARegion *ar, SpaceOops *soops, short event);
153 extern void outliner_toggle_visible(SpaceOops *soops);
154 extern void outliner_show_active(ARegion *ar, SpaceOops *soops);
155 extern void outliner_show_hierarchy(Scene *scene, SpaceOops *soops);
156 extern void outliner_one_level(SpaceOops *soops, int add);
157 extern void outliner_select(Scene *scene, SpaceOops *soops);
158 extern void outliner_toggle_selected(Scene *scene, SpaceOops *soops);
159 extern void outliner_toggle_visibility(Scene *scene, SpaceOops *soops);
160 extern void outliner_toggle_selectability(Scene *scene, SpaceOops *soops);
161 extern void outliner_toggle_renderability(Scene *scene, SpaceOops *soops);
162 extern void outliner_del(Scene *scene, SpaceOops *soops);
163 extern void outliner_page_up_down(Scene *scene, ARegion *ar, SpaceOops *soops, int up);
164 extern void outliner_find_panel(Scene *scene, ARegion *ar, SpaceOops *soops, int again, int flags);
167 #endif /* ED_OUTLINER_INTERN_H */