~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/editors/space_outliner/outliner_intern.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
typedef struct TreeElement {
49
49
        struct TreeElement *next, *prev, *parent;
50
50
        ListBase subtree;
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
57
57
        const char *name;
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
60
60
}  TreeElement;
61
61
 
62
62
/* TreeElement->flag */
63
 
#define TE_ACTIVE               1
64
 
#define TE_ICONROW              2
65
 
#define TE_LAZY_CLOSED  4
66
 
#define TE_FREE_NAME    8
 
63
#define TE_ACTIVE       1
 
64
#define TE_ICONROW      2
 
65
#define TE_LAZY_CLOSED  4
 
66
#define TE_FREE_NAME    8
67
67
 
68
68
/* TreeStoreElem types */
69
 
#define TSE_NLA                         1       
70
 
#define TSE_NLA_ACTION          2
71
 
#define TSE_DEFGROUP_BASE       3
72
 
#define TSE_DEFGROUP            4
73
 
#define TSE_BONE                        5
74
 
#define TSE_EBONE                       6
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
85
 
#define TSE_DRIVER                      17
 
69
#define TSE_NLA             1
 
70
#define TSE_NLA_ACTION      2
 
71
#define TSE_DEFGROUP_BASE   3
 
72
#define TSE_DEFGROUP        4
 
73
#define TSE_BONE            5
 
74
#define TSE_EBONE           6
 
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
 
85
#define TSE_DRIVER          17
86
86
 
87
 
#define TSE_PROXY                       18
88
 
#define TSE_R_LAYER_BASE        19
89
 
#define TSE_R_LAYER                     20
90
 
#define TSE_R_PASS                      21
91
 
#define TSE_LINKED_MAT          22
 
87
#define TSE_PROXY           18
 
88
#define TSE_R_LAYER_BASE    19
 
89
#define TSE_R_LAYER         20
 
90
#define TSE_R_PASS          21
 
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
106
107
 
107
108
/* button events */
108
 
#define OL_NAMEBUTTON           1
 
109
#define OL_NAMEBUTTON       1
109
110
 
110
111
/* get TreeStoreElem associated with a TreeElement 
111
112
 * < a: (TreeElement) tree element to find stored element for
112
113
 */
113
 
#define TREESTORE(a) ((a)?soops->treestore->data+(a)->store_index:NULL)
 
114
#define TREESTORE(a) (soops->treestore->data + (a)->store_index)
114
115
 
115
116
/* size constants */
116
 
#define OL_Y_OFFSET     2
 
117
#define OL_Y_OFFSET 2
117
118
 
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
121
122
 
122
123
#define OL_TOGW OL_TOG_RESTRICT_VIEWX
123
124
 
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)
127
128
 
128
129
 
129
130
/* Outliner Searching --
145
146
#define SEARCHING_OUTLINER(sov)   (sov->search_flags & SO_SEARCH_RECURSIVE)
146
147
 
147
148
/* is the currrent element open? if so we also show children */
148
 
#define TSELEM_OPEN(telm,sv)    ( (telm->flag & TSE_CLOSED)==0 || (SEARCHING_OUTLINER(sv) && (telm->flag & TSE_CHILDSEARCH)) )
 
149
#define TSELEM_OPEN(telm, sv)    ( (telm->flag & TSE_CLOSED) == 0 || (SEARCHING_OUTLINER(sv) && (telm->flag & TSE_CHILDSEARCH)) )
149
150
 
150
151
/* outliner_tree.c ----------------------------------------------- */
151
152
 
170
171
/* outliner_edit.c ---------------------------------------------- */
171
172
 
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 *));
174
175
 
175
176
int common_restrict_check(struct bContext *C, struct Object *ob);
176
177
 
190
191
 
191
192
TreeElement *outliner_dropzone_parent(struct bContext *C, struct wmEvent *event, struct TreeElement *te, float *fmval);
192
193
int outliner_dropzone_parent_clear(struct bContext *C, struct wmEvent *event, struct TreeElement *te, float *fmval);
193
 
 
 
194
TreeElement *outliner_dropzone_scene(struct bContext *C, struct wmEvent *event, struct TreeElement *te, float *fmval);
194
195
/* ...................................................... */
195
196
 
196
197
void OUTLINER_OT_item_activate(struct wmOperatorType *ot);
220
221
 
221
222
void OUTLINER_OT_parent_drop(struct wmOperatorType *ot);
222
223
void OUTLINER_OT_parent_clear(struct wmOperatorType *ot);
 
224
void OUTLINER_OT_scene_drop(struct wmOperatorType *ot);
 
225
void OUTLINER_OT_material_drop(struct wmOperatorType *ot);
223
226
 
224
227
/* outliner_tools.c ---------------------------------------------- */
225
228