~ubuntu-branches/ubuntu/intrepid/blender/intrepid-updates

« back to all changes in this revision

Viewing changes to source/blender/makesdna/DNA_userdef_types.h

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-08-08 02:45:40 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080808024540-kkjp7ekfivzhuw3l
Tags: 2.46+dfsg-4
* Fix python syntax warning in import_dxf.py, which led to nasty output
  in installation/upgrade logs during byte-compilation, using a patch
  provided by the script author (Closes: #492280):
   - debian/patches/45_fix_python_syntax_warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * blenkernel/DNA_userdef_types.h (mar-2001 nzc)
3
3
 *
4
 
 *      $Id: DNA_userdef_types.h,v 1.56 2006/06/08 19:05:58 schlaile Exp $
 
4
 *      $Id: DNA_userdef_types.h 14722 2008-05-07 15:38:40Z campbellbarton $
5
5
 *
6
 
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
 
6
 * ***** BEGIN GPL LICENSE BLOCK *****
7
7
 *
8
8
 * This program is free software; you can redistribute it and/or
9
9
 * modify it under the terms of the GNU General Public License
10
10
 * as published by the Free Software Foundation; either version 2
11
 
 * of the License, or (at your option) any later version. The Blender
12
 
 * Foundation also sells licenses for use in proprietary software under
13
 
 * the Blender License.  See http://www.blender.org/BL/ for information
14
 
 * about this.
 
11
 * of the License, or (at your option) any later version.
15
12
 *
16
13
 * This program is distributed in the hope that it will be useful,
17
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29
26
 *
30
27
 * Contributor(s): none yet.
31
28
 *
32
 
 * ***** END GPL/BL DUAL LICENSE BLOCK *****
 
29
 * ***** END GPL LICENSE BLOCK *****
33
30
*/
34
31
 
35
32
#ifndef DNA_USERDEF_TYPES_H
36
33
#define DNA_USERDEF_TYPES_H
37
34
 
 
35
#include "DNA_listBase.h"
 
36
#include "DNA_texture_types.h"
 
37
 
38
38
/* themes; defines in BIF_resource.h */
39
 
 
40
 
// global, button colors
41
 
 
 
39
struct ColorBand;
 
40
 
 
41
/* global, button colors */
42
42
typedef struct ThemeUI {
43
43
        char outline[4];
44
44
        char neutral[4];
59
59
        char menu_text_hi[4];
60
60
        
61
61
        char but_drawtype;
62
 
        char pad1[3];
63
 
 
 
62
        char pad[3];
 
63
        char iconfile[80];      // FILE_MAXFILE length
64
64
} ThemeUI;
65
65
 
66
 
// try to put them all in one, if needed a special struct can be created as well
67
 
// for example later on, when we introduce wire colors for ob types or so...
 
66
/* try to put them all in one, if needed a special struct can be created as well
 
67
 * for example later on, when we introduce wire colors for ob types or so...
 
68
 */
68
69
typedef struct ThemeSpace {
69
70
        char back[4];
70
71
        char text[4];   
83
84
        char active[4], group[4], group_active[4], transform[4];
84
85
        char vertex[4], vertex_select[4];
85
86
        char edge[4], edge_select[4];
86
 
        char edge_seam[4], edge_facesel[4];
 
87
        char edge_seam[4], edge_sharp[4], edge_facesel[4];
87
88
        char face[4], face_select[4];   // solid faces
88
89
        char face_dot[4];                               // selected color
89
90
        char normal[4];
90
91
        char bone_solid[4], bone_pose[4];
91
92
        char strip[4], strip_select[4];
 
93
        char cframe[4], pad[4];
92
94
        
93
95
        char vertex_size, facedot_size;
94
 
        char bpad[2];
 
96
        char bpad[2]; 
95
97
 
96
98
        char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes
97
99
        char syntaxv[4], syntaxc[4];
98
100
        
99
101
        char movie[4], image[4], scene[4], audio[4];            // for sequence editor
100
102
        char effect[4], plugin[4], transition[4], meta[4];
101
 
        
 
103
        char editmesh_active[4]; 
102
104
} ThemeSpace;
103
105
 
104
106
 
 
107
/* set of colors for use as a custom color set for Objects/Bones wire drawing */
 
108
typedef struct ThemeWireColor {
 
109
        char    solid[4];
 
110
        char    select[4];
 
111
        char    active[4];
 
112
        
 
113
        short   flag;
 
114
        short   pad;
 
115
} ThemeWireColor; 
 
116
 
 
117
/* flags for ThemeWireColor */
 
118
#define TH_WIRECOLOR_CONSTCOLS  (1<<0)
 
119
 
 
120
/* A theme */
105
121
typedef struct bTheme {
106
122
        struct bTheme *next, *prev;
107
123
        char name[32];
108
124
        
 
125
        /* Interface Elements (buttons, menus, icons) */
109
126
        ThemeUI tui;
110
127
        
 
128
        /* Individual Spacetypes */
111
129
        ThemeSpace tbuts;       
112
130
        ThemeSpace tv3d;
113
131
        ThemeSpace tfile;
123
141
        ThemeSpace toops;
124
142
        ThemeSpace ttime;
125
143
        ThemeSpace tnode;
 
144
        
 
145
        /* 20 sets of bone colors for this theme */
 
146
        ThemeWireColor tarm[20];
 
147
        /*ThemeWireColor tobj[20];*/
126
148
 
127
149
        unsigned char bpad[4], bpad1[4];
128
 
        
129
150
} bTheme;
130
151
 
131
152
typedef struct SolidLight {
166
187
        struct SolidLight light[3];
167
188
        short tw_hotspot, tw_flag, tw_handlesize, tw_size;
168
189
        int textimeout, texcollectrate;
169
 
        int memcachelimit;
170
 
        short frameserverport;
171
 
        short pad;
 
190
        int memcachelimit;
 
191
        int prefetchframes;
 
192
        short frameserverport;
 
193
        short pad_rot_angle;    /*control the rotation step of the view when PAD2,PAD4,PAD6&PAD8 is use*/
172
194
        short obcenter_dia;
173
 
        short rvisize;          /* rotating view icon size */
174
 
        short rvibright;        /* rotating view icon brightness */
175
 
        short pad1;
 
195
        short rvisize;                  /* rotating view icon size */
 
196
        short rvibright;                /* rotating view icon brightness */
 
197
        short recent_files;             /* maximum number of recently used files to remember  */
 
198
        short smooth_viewtx;    /* miliseconds to spend spinning the view */
 
199
        short glreslimit;
 
200
        short ndof_pan, ndof_rotate;
 
201
        short pads[2];
 
202
//      char pad[8];
 
203
        char versemaster[160];
 
204
        char verseuser[160];
 
205
        float glalphaclip;
 
206
        
 
207
        short autokey_mode;             /* autokeying mode */
 
208
        short autokey_flag;             /* flags for autokeying */
 
209
        
 
210
        struct ColorBand coba_weight;   /* from texture.h */
176
211
} UserDef;
177
212
 
178
213
extern UserDef U; /* from usiblender.c !!!! */
180
215
/* ***************** USERDEF ****************** */
181
216
 
182
217
/* flag */
183
 
#define USER_AUTOSAVE                   1
184
 
#define USER_AUTOGRABGRID               2
185
 
#define USER_AUTOROTGRID                4
186
 
#define USER_AUTOSIZEGRID               8
187
 
#define USER_SCENEGLOBAL                16
188
 
#define USER_TRACKBALL                  32
189
 
#define USER_DUPLILINK                  64
190
 
#define USER_FSCOLLUM                   128
191
 
#define USER_MAT_ON_OB                  256
192
 
#define USER_NO_CAPSLOCK                512
193
 
#define USER_VIEWMOVE                   1024
194
 
#define USER_TOOLTIPS                   2048
195
 
#define USER_TWOBUTTONMOUSE             4096
196
 
#define USER_NONUMPAD                   8192
197
 
#define USER_LMOUSESELECT               16384
198
 
#define USER_FILECOMPRESS               32768
 
218
#define USER_AUTOSAVE                   (1 << 0)
 
219
#define USER_AUTOGRABGRID               (1 << 1)
 
220
#define USER_AUTOROTGRID                (1 << 2)
 
221
#define USER_AUTOSIZEGRID               (1 << 3)
 
222
#define USER_SCENEGLOBAL                (1 << 4)
 
223
#define USER_TRACKBALL                  (1 << 5)
 
224
#define USER_DUPLILINK                  (1 << 6)
 
225
#define USER_FSCOLLUM                   (1 << 7)
 
226
#define USER_MAT_ON_OB                  (1 << 8)
 
227
/*#define USER_NO_CAPSLOCK              (1 << 9)*/ /* not used anywhere */
 
228
#define USER_VIEWMOVE                   (1 << 10)
 
229
#define USER_TOOLTIPS                   (1 << 11)
 
230
#define USER_TWOBUTTONMOUSE             (1 << 12)
 
231
#define USER_NONUMPAD                   (1 << 13)
 
232
#define USER_LMOUSESELECT               (1 << 14)
 
233
#define USER_FILECOMPRESS               (1 << 15)
 
234
#define USER_SAVE_PREVIEWS              (1 << 16)
 
235
#define USER_CUSTOM_RANGE               (1 << 17)
 
236
#define USER_ADD_EDITMODE               (1 << 18)
 
237
#define USER_ADD_VIEWALIGNED    (1 << 19)
 
238
#define USER_RELPATHS                   (1 << 20)
 
239
#define USER_DRAGIMMEDIATE              (1 << 21)
 
240
#define USER_DONT_DOSCRIPTLINKS (1 << 22)
199
241
 
200
242
/* viewzom */
201
243
#define USER_ZOOM_CONT                  0
203
245
#define USER_ZOOM_DOLLY                 2
204
246
 
205
247
/* uiflag */
206
 
 
207
 
#define USER_KEYINSERTACT               1
208
 
#define USER_KEYINSERTOBJ               2
209
 
#define USER_WHEELZOOMDIR               4
210
 
#define USER_FILTERFILEEXTS             8
211
 
#define USER_DRAWVIEWINFO               16
212
 
#define USER_PLAINMENUS                 32              // old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase
 
248
// old flag for #define USER_KEYINSERTACT               (1 << 0)
 
249
// old flag for #define USER_KEYINSERTOBJ               (1 << 1)
 
250
#define USER_WHEELZOOMDIR               (1 << 2)
 
251
#define USER_FILTERFILEEXTS             (1 << 3)
 
252
#define USER_DRAWVIEWINFO               (1 << 4)
 
253
#define USER_PLAINMENUS                 (1 << 5)                // old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase
213
254
                                                                // old flag for hide pulldown was here 
214
 
#define USER_FLIPFULLSCREEN             128
215
 
#define USER_ALLWINCODECS               256
216
 
#define USER_MENUOPENAUTO               512
217
 
#define USER_PANELPINNED                1024
218
 
#define USER_AUTOPERSP                  2048
219
 
#define USER_LOCKAROUND         4096
220
 
#define USER_GLOBALUNDO         8192
221
 
#define USER_ORBIT_SELECTION    16384
222
 
#define USER_KEYINSERTAVAI              32768
223
 
#define USER_HIDE_DOT                   65536
224
 
#define USER_SHOW_ROTVIEWICON   131072
225
 
#define USER_SHOW_VIEWPORTNAME  262144
 
255
#define USER_FLIPFULLSCREEN             (1 << 7)
 
256
#define USER_ALLWINCODECS               (1 << 8)
 
257
#define USER_MENUOPENAUTO               (1 << 9)
 
258
#define USER_PANELPINNED                (1 << 10)
 
259
#define USER_AUTOPERSP                  (1 << 11)
 
260
#define USER_LOCKAROUND         (1 << 12)
 
261
#define USER_GLOBALUNDO         (1 << 13)
 
262
#define USER_ORBIT_SELECTION    (1 << 14)
 
263
// old flag for #define USER_KEYINSERTAVAI              (1 << 15)
 
264
#define USER_HIDE_DOT                   (1 << 16)
 
265
#define USER_SHOW_ROTVIEWICON   (1 << 17)
 
266
#define USER_SHOW_VIEWPORTNAME  (1 << 18)
 
267
// old flag for #define USER_KEYINSERTNEED              (1 << 19)
 
268
#define USER_ZOOM_TO_MOUSEPOS   (1 << 20)
 
269
#define USER_SHOW_FPS                   (1 << 21)
 
270
#define USER_MMB_PASTE                  (1 << 22)
 
271
 
 
272
/* Auto-Keying mode */
 
273
        /* AUTOKEY_ON is a bitflag */
 
274
#define         AUTOKEY_ON                              1
 
275
        /* AUTOKEY_ON + 2**n...  (i.e. AUTOKEY_MODE_NORMAL = AUTOKEY_ON + 2) to preserve setting, even when autokey turned off  */
 
276
#define         AUTOKEY_MODE_NORMAL             3
 
277
#define         AUTOKEY_MODE_EDITKEYS   5
 
278
 
 
279
/* Auto-Keying flag */
 
280
#define         AUTOKEY_FLAG_INSERTAVAIL        (1<<0)
 
281
#define         AUTOKEY_FLAG_INSERTNEEDED       (1<<1)
 
282
#define         AUTOKEY_FLAG_AUTOMATKEY         (1<<2)
 
283
 
 
284
/* Auto-Keying macros */
 
285
#define IS_AUTOKEY_ON                   (U.autokey_mode & AUTOKEY_ON)
 
286
#define IS_AUTOKEY_MODE(mode)   (U.autokey_mode == AUTOKEY_MODE_##mode)
 
287
#define IS_AUTOKEY_FLAG(flag)   (U.autokey_flag == AUTOKEY_FLAG_##flag)
226
288
 
227
289
/* transopts */
228
 
 
229
 
#define USER_TR_TOOLTIPS                1
230
 
#define USER_TR_BUTTONS                 2
231
 
#define USER_TR_MENUS                   4
232
 
#define USER_TR_FILESELECT              8
233
 
#define USER_TR_TEXTEDIT                16
234
 
#define USER_DOTRANSLATE                32
235
 
#define USER_USETEXTUREFONT             64
 
290
#define USER_TR_TOOLTIPS                (1 << 0)
 
291
#define USER_TR_BUTTONS                 (1 << 1)
 
292
#define USER_TR_MENUS                   (1 << 2)
 
293
#define USER_TR_FILESELECT              (1 << 3)
 
294
#define USER_TR_TEXTEDIT                (1 << 4)
 
295
#define USER_DOTRANSLATE                (1 << 5)
 
296
#define USER_USETEXTUREFONT             (1 << 6)
 
297
#define CONVERT_TO_UTF8                 (1 << 7)
236
298
 
237
299
/* dupflag */
238
 
 
239
 
#define USER_DUP_MESH                   1
240
 
#define USER_DUP_CURVE                  2
241
 
#define USER_DUP_SURF                   4
242
 
#define USER_DUP_FONT                   8
243
 
#define USER_DUP_MBALL                  16
244
 
#define USER_DUP_LAMP                   32
245
 
#define USER_DUP_IPO                    64
246
 
#define USER_DUP_MAT                    128
247
 
#define USER_DUP_TEX                    256
248
 
#define USER_DUP_ARM                    512
249
 
#define USER_DUP_ACT                    1024
 
300
#define USER_DUP_MESH                   (1 << 0)
 
301
#define USER_DUP_CURVE                  (1 << 1)
 
302
#define USER_DUP_SURF                   (1 << 2)
 
303
#define USER_DUP_FONT                   (1 << 3)
 
304
#define USER_DUP_MBALL                  (1 << 4)
 
305
#define USER_DUP_LAMP                   (1 << 5)
 
306
#define USER_DUP_IPO                    (1 << 6)
 
307
#define USER_DUP_MAT                    (1 << 7)
 
308
#define USER_DUP_TEX                    (1 << 8)
 
309
#define USER_DUP_ARM                    (1 << 9)
 
310
#define USER_DUP_ACT                    (1 << 10)
250
311
 
251
312
/* gameflags */
252
 
 
253
313
#define USER_VERTEX_ARRAYS              1
254
314
#define USER_DISABLE_SOUND              2
255
315
#define USER_DISABLE_MIPMAP             4
256
316
 
257
 
 
258
317
/* vrml flag */
259
 
 
260
318
#define USER_VRML_LAYERS                1
261
319
#define USER_VRML_AUTOSCALE             2
262
320
#define USER_VRML_TWOSIDED              4
265
323
 
266
324
 
267
325
#endif
268