48
48
typedef struct TreeElement {
49
49
struct TreeElement *next, *prev, *parent;
51
float xs, ys; // do selection
52
int store_index; // offset in tree store
53
short flag; // flag for non-saved stuff
54
short index; // index for data arrays
55
short idcode; // from TreeStore id
56
short xend; // width of item display, for select
51
float xs, ys; // do selection
52
int store_index; // offset in tree store
53
short flag; // flag for non-saved stuff
54
short index; // index for data arrays
55
short idcode; // from TreeStore id
56
short xend; // width of item display, for select
58
void *directdata; // Armature Bones, Base, Sequence, Strip...
59
PointerRNA rnaptr; // RNA Pointer
58
void *directdata; // Armature Bones, Base, Sequence, Strip...
59
PointerRNA rnaptr; // RNA Pointer
62
62
/* TreeElement->flag */
65
#define TE_LAZY_CLOSED 4
66
#define TE_FREE_NAME 8
65
#define TE_LAZY_CLOSED 4
66
#define TE_FREE_NAME 8
68
68
/* TreeStoreElem types */
70
#define TSE_NLA_ACTION 2
71
#define TSE_DEFGROUP_BASE 3
72
#define TSE_DEFGROUP 4
75
#define TSE_CONSTRAINT_BASE 7
76
#define TSE_CONSTRAINT 8
77
#define TSE_MODIFIER_BASE 9
78
#define TSE_MODIFIER 10
79
#define TSE_LINKED_OB 11
80
#define TSE_SCRIPT_BASE 12
81
#define TSE_POSE_BASE 13
82
#define TSE_POSE_CHANNEL 14
83
#define TSE_ANIM_DATA 15
84
#define TSE_DRIVER_BASE 16
70
#define TSE_NLA_ACTION 2
71
#define TSE_DEFGROUP_BASE 3
72
#define TSE_DEFGROUP 4
75
#define TSE_CONSTRAINT_BASE 7
76
#define TSE_CONSTRAINT 8
77
#define TSE_MODIFIER_BASE 9
78
#define TSE_MODIFIER 10
79
#define TSE_LINKED_OB 11
80
#define TSE_SCRIPT_BASE 12
81
#define TSE_POSE_BASE 13
82
#define TSE_POSE_CHANNEL 14
83
#define TSE_ANIM_DATA 15
84
#define TSE_DRIVER_BASE 16
88
#define TSE_R_LAYER_BASE 19
89
#define TSE_R_LAYER 20
91
#define TSE_LINKED_MAT 22
88
#define TSE_R_LAYER_BASE 19
89
#define TSE_R_LAYER 20
91
#define TSE_LINKED_MAT 22
92
92
/* NOTE, is used for light group */
93
#define TSE_LINKED_LAMP 23
94
#define TSE_POSEGRP_BASE 24
95
#define TSE_POSEGRP 25
96
#define TSE_SEQUENCE 26
97
#define TSE_SEQ_STRIP 27
98
#define TSE_SEQUENCE_DUP 28
93
#define TSE_LINKED_LAMP 23
94
#define TSE_POSEGRP_BASE 24
95
#define TSE_POSEGRP 25
96
#define TSE_SEQUENCE 26
97
#define TSE_SEQ_STRIP 27
98
#define TSE_SEQUENCE_DUP 28
99
99
#define TSE_LINKED_PSYS 29
100
#define TSE_RNA_STRUCT 30
101
#define TSE_RNA_PROPERTY 31
102
#define TSE_RNA_ARRAY_ELEM 32
103
#define TSE_NLA_TRACK 33
104
#define TSE_KEYMAP 34
105
#define TSE_KEYMAP_ITEM 35
100
#define TSE_RNA_STRUCT 30
101
#define TSE_RNA_PROPERTY 31
102
#define TSE_RNA_ARRAY_ELEM 32
103
#define TSE_NLA_TRACK 33
104
#define TSE_KEYMAP 34
105
#define TSE_KEYMAP_ITEM 35
106
#define TSE_ID_BASE 36
107
108
/* button events */
108
#define OL_NAMEBUTTON 1
109
#define OL_NAMEBUTTON 1
110
111
/* get TreeStoreElem associated with a TreeElement
111
112
* < a: (TreeElement) tree element to find stored element for
113
#define TREESTORE(a) ((a)?soops->treestore->data+(a)->store_index:NULL)
114
#define TREESTORE(a) (soops->treestore->data + (a)->store_index)
115
116
/* size constants */
116
#define OL_Y_OFFSET 2
117
#define OL_Y_OFFSET 2
118
#define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X*3)
119
#define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X*2)
120
#define OL_TOG_RESTRICT_RENDERX UI_UNIT_X
119
#define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X * 3.0f)
120
#define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X * 2.0f)
121
#define OL_TOG_RESTRICT_RENDERX UI_UNIT_X
122
123
#define OL_TOGW OL_TOG_RESTRICT_VIEWX
124
#define OL_RNA_COLX (UI_UNIT_X*15)
125
#define OL_RNA_COL_SIZEX (UI_UNIT_X*7.5f)
126
#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5f)
125
#define OL_RNA_COLX (UI_UNIT_X * 15)
126
#define OL_RNA_COL_SIZEX (UI_UNIT_X * 7.5f)
127
#define OL_RNA_COL_SPACEX (UI_UNIT_X * 2.5f)
129
130
/* Outliner Searching --
170
171
/* outliner_edit.c ---------------------------------------------- */
172
173
void outliner_do_object_operation(struct bContext *C, struct Scene *scene, struct SpaceOops *soops, struct ListBase *lb,
173
void (*operation_cb)(struct bContext *C, struct Scene *scene, struct TreeElement *, struct TreeStoreElem *, TreeStoreElem *));
174
void (*operation_cb)(struct bContext *C, struct Scene *scene, struct TreeElement *, struct TreeStoreElem *, TreeStoreElem *));
175
176
int common_restrict_check(struct bContext *C, struct Object *ob);