2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file DNA_userdef_types.h
34 #ifndef __DNA_USERDEF_TYPES_H__
35 #define __DNA_USERDEF_TYPES_H__
37 #include "DNA_listBase.h"
38 #include "DNA_texture_types.h" /* ColorBand */
44 /* themes; defines in BIF_resource.h */
47 /* ************************ style definitions ******************** */
49 #define MAX_STYLE_NAME 64
51 /* default uifont_id offered by Blender */
52 typedef enum eUIFont_ID {
54 /* UIFONT_BITMAP = 1 */ /* UNUSED */
61 /* default fonts to load/initalize */
62 /* first font is the default (index 0), others optional */
63 typedef struct uiFont {
64 struct uiFont *next, *prev;
65 char filename[1024];/* 1024 = FILE_MAX */
66 short blf_id; /* from blfont lib */
67 short uifont_id; /* own id */
68 short r_to_l; /* fonts that read from left to right */
72 /* this state defines appearance of text */
73 typedef struct uiFontStyle {
74 short uifont_id; /* saved in file, 0 is default */
75 short points; /* actual size depends on 'global' dpi */
76 short kerning; /* unfitted or default kerning value. */
77 char word_wrap; /* enable word-wrap when drawing */
79 short italic, bold; /* style hint */
80 short shadow; /* value is amount of pixels blur */
81 short shadx, shady; /* shadow offset in pixels */
82 short align; /* text align hint */
83 float shadowalpha; /* total alpha */
84 float shadowcolor; /* 1 value, typically white or black anyway */
87 /* uiFontStyle->align */
88 typedef enum eFontStyle_Align {
89 UI_STYLE_TEXT_LEFT = 0,
90 UI_STYLE_TEXT_CENTER = 1,
91 UI_STYLE_TEXT_RIGHT = 2
95 /* this is fed to the layout engine and widget code */
97 typedef struct uiStyle {
98 struct uiStyle *next, *prev;
100 char name[64]; /* MAX_STYLE_NAME */
102 uiFontStyle paneltitle;
103 uiFontStyle grouplabel;
104 uiFontStyle widgetlabel;
109 short minlabelchars; /* in characters */
110 short minwidgetchars; /* in characters */
123 typedef struct uiWidgetColors {
131 short shadetop, shadedown;
135 typedef struct uiWidgetStateColors {
137 char inner_anim_sel[4];
139 char inner_key_sel[4];
140 char inner_driven[4];
141 char inner_driven_sel[4];
143 } uiWidgetStateColors;
145 typedef struct uiPanelColors {
153 typedef struct uiGradientColors {
155 char high_gradient[4];
160 typedef struct ThemeUI {
161 /* Interface Elements (buttons, menus, icons) */
162 uiWidgetColors wcol_regular, wcol_tool, wcol_text;
163 uiWidgetColors wcol_radio, wcol_option, wcol_toggle;
164 uiWidgetColors wcol_num, wcol_numslider;
165 uiWidgetColors wcol_menu, wcol_pulldown, wcol_menu_back, wcol_menu_item, wcol_tooltip;
166 uiWidgetColors wcol_box, wcol_scroll, wcol_progress, wcol_list_item, wcol_pie_menu;
168 uiWidgetStateColors wcol_state;
170 uiPanelColors panel; /* depricated, but we keep it for do_versions (2.66.1) */
172 char widget_emboss[4];
174 /* fac: 0 - 1 for blend factor, width in pixels */
175 float menu_shadow_fac;
176 short menu_shadow_width;
180 char iconfile[256]; // FILE_MAXFILE length
184 char xaxis[4], yaxis[4], zaxis[4];
187 /* try to put them all in one, if needed a special struct can be created as well
188 * for example later on, when we introduce wire colors for ob types or so...
190 typedef struct ThemeSpace {
191 /* main window colors */
193 char title[4]; /* panel title */
198 char header[4]; /* region background */
199 char header_title[4]; /* unused */
201 char header_text_hi[4];
205 char tab_inactive[4];
209 /* button/tool regions */
210 char button[4]; /* region background */
211 char button_title[4]; /* panel title */
213 char button_text_hi[4];
215 /* listview regions */
216 char list[4]; /* region background */
217 char list_title[4]; /* panel title */
219 char list_text_hi[4];
222 /* char panel[4]; unused */
223 /* char panel_title[4]; unused */
224 /* char panel_text[4]; unused */
225 /* char panel_text_hi[4]; unused */
227 /* note, cannot use name 'panel' because of DNA mapping old files */
228 uiPanelColors panelcolors;
230 uiGradientColors gradients;
238 char view_overlay[4];
240 char wire[4], wire_edit[4], select[4];
241 char lamp[4], speaker[4], empty[4], camera[4];
242 char active[4], group[4], group_active[4], transform[4];
243 char vertex[4], vertex_select[4], vertex_unreferenced[4];
244 char edge[4], edge_select[4];
245 char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4];
246 char face[4], face_select[4]; /* solid faces */
247 char face_dot[4]; /* selected color */
248 char extra_edge_len[4], extra_edge_angle[4], extra_face_angle[4], extra_face_area[4];
250 char vertex_normal[4];
252 char bone_solid[4], bone_pose[4], bone_pose_active[4];
253 char strip[4], strip_select[4];
255 char time_keyframe[4], time_gp_keyframe[4];
256 char freestyle_edge_mark[4], freestyle_face_mark[4];
258 char nurb_uline[4], nurb_vline[4];
259 char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4], lastsel_point[4];
261 char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4];
262 char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4];
264 char ds_channel[4], ds_subchannel[4]; /* dopesheet */
265 char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4]; /* keytypes */
266 char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4]; /* keytypes */
267 char keyborder[4], keyborder_select[4];
269 char console_output[4], console_input[4], console_info[4], console_error[4];
270 char console_cursor[4], console_select[4];
272 char vertex_size, outline_width, facedot_size;
275 /* syntax for textwindow and nodes */
276 char syntaxl[4], syntaxs[4]; // in nodespace used for backdrop matte
277 char syntaxb[4], syntaxn[4]; // in nodespace used for color input
278 char syntaxv[4], syntaxc[4]; // in nodespace used for converter group
279 char syntaxd[4], syntaxr[4]; // in nodespace used for distort
281 char nodeclass_output[4], nodeclass_filter[4];
282 char nodeclass_vector[4], nodeclass_texture[4];
283 char nodeclass_shader[4], nodeclass_script[4];
284 char nodeclass_pattern[4], nodeclass_layout[4];
286 char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4]; /* for sequence editor */
287 char effect[4], transition[4], meta[4], text_strip[4], pad[4];
288 char editmesh_active[4];
290 char handle_vertex[4];
291 char handle_vertex_select[4];
293 char handle_vertex_size;
295 char clipping_border_3d[4];
297 char marker_outline[4], marker[4], act_marker[4], sel_marker[4], dis_marker[4], lock_marker[4];
298 char bundle_solid[4];
299 char path_before[4], path_after[4];
304 char gp_vertex[4], gp_vertex_select[4];
306 char preview_back[4];
307 char preview_stitch_face[4];
308 char preview_stitch_edge[4];
309 char preview_stitch_vert[4];
310 char preview_stitch_stitchable[4];
311 char preview_stitch_unstitchable[4];
312 char preview_stitch_active[4];
314 char uv_shadow[4]; /* two uses, for uvs with modifier applied on mesh and uvs during painting */
315 char uv_others[4]; /* uvs of other objects */
317 char match[4]; /* outliner - filter match */
318 char selected_highlight[4]; /* outliner - selected item */
320 char skin_root[4]; /* Skin modifier root color */
323 char anim_active[4]; /* Active Action + Summary Channel */
324 char anim_non_active[4]; /* Active Action = NULL */
326 char nla_tweaking[4]; /* NLA 'Tweaking' action/strip */
327 char nla_tweakdupli[4]; /* NLA - warning color for duplicate instances of tweaking strip */
329 char nla_transition[4], nla_transition_sel[4]; /* NLA "Transition" strips */
330 char nla_meta[4], nla_meta_sel[4]; /* NLA "Meta" strips */
331 char nla_sound[4], nla_sound_sel[4]; /* NLA "Sound" strips */
334 char info_selected[4], info_selected_text[4];
335 char info_error[4], info_error_text[4];
336 char info_warning[4], info_warning_text[4];
337 char info_info[4], info_info_text[4];
338 char info_debug[4], info_debug_text[4];
340 char paint_curve_pivot[4];
341 char paint_curve_handle[4];
344 char metadatatext[4];
348 /* set of colors for use as a custom color set for Objects/Bones wire drawing */
349 typedef struct ThemeWireColor {
358 /* flags for ThemeWireColor */
359 typedef enum eWireColor_Flags {
360 TH_WIRECOLOR_CONSTCOLS = (1 << 0),
361 TH_WIRECOLOR_TEXTCOLS = (1 << 1),
365 typedef struct bTheme {
366 struct bTheme *next, *prev;
371 /* Individual Spacetypes */
372 /* note: ensure UI_THEMESPACE_END is updated when adding */
387 ThemeSpace tuserpref;
391 /* 20 sets of bone colors for this theme */
392 ThemeWireColor tarm[20];
393 /*ThemeWireColor tobj[20];*/
395 int active_theme_area, pad;
398 #define UI_THEMESPACE_START(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), &((btheme)->tbuts))
399 #define UI_THEMESPACE_END(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), (&((btheme)->tclip) + 1))
401 /* for the moment only the name. may want to store options with this later */
402 typedef struct bAddon {
403 struct bAddon *next, *prev;
405 IDProperty *prop; /* User-Defined Properties on this Addon (for storing preferences) */
408 typedef struct bPathCompare {
409 struct bPathCompare *next, *prev;
410 char path[768]; /* FILE_MAXDIR */
414 typedef struct SolidLight {
416 float col[4], spec[4], vec[4];
419 typedef struct WalkNavigation {
420 float mouse_speed; /* speed factor for look around */
422 float walk_speed_factor;
425 float teleport_time; /* duration to use for teleporting */
430 typedef struct UserDef {
431 /* UserDef has separate do-version handling, and can be read from other files */
432 int versionfile, subversionfile;
436 char tempdir[768]; /* FILE_MAXDIR length */
438 char renderdir[1024]; /* FILE_MAX length */
440 char render_cachedir[768]; /* 768 = FILE_MAXDIR */
445 char image_editor[1024]; /* 1024 = FILE_MAX */
446 char anim_player[1024]; /* 1024 = FILE_MAX */
447 int anim_player_preset;
449 short v2d_min_gridsize; /* minimum spacing between gridlines in View2D grids */
450 short timecode_style; /* style of timecode display */
453 short dbl_click_time;
456 short wheellinescroll;
459 short userpref, viewzoom;
467 int scrollback; /* console scrollback limit */
468 int dpi; /* range 48-128? */
469 char node_margin; /* node insert offset (aka auto-offset) margin, but might be useful for later stuff as well */
472 short menuthreshold1, menuthreshold2;
474 struct ListBase themes;
475 struct ListBase uifonts;
476 struct ListBase uistyles;
477 struct ListBase keymaps DNA_DEPRECATED; /* deprecated in favor of user_keymaps */
478 struct ListBase user_keymaps;
479 struct ListBase addons;
480 struct ListBase autoexec_paths;
481 char keyconfigstr[64];
485 short gp_manhattendist, gp_euclideandist, gp_eraser;
487 short tb_leftmouse, tb_rightmouse;
488 struct SolidLight light[3];
489 short tw_hotspot, tw_flag, tw_handlesize, tw_size;
490 short textimeout, texcollectrate;
491 short wmdrawmethod; /* removed wmpad */
495 float pad_rot_angle; /* control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use */
496 short frameserverport;
499 short rvisize; /* rotating view icon size */
500 short rvibright; /* rotating view icon brightness */
501 short recent_files; /* maximum number of recently used files to remember */
502 short smooth_viewtx; /* miliseconds to spend spinning the view */
505 short color_picker_type;
506 char ipo_new; /* interpolation mode for newly added F-Curves */
507 char keyhandles_new; /* handle types for newly added keyframes */
508 char gpu_select_method;
509 char view_frame_type;
511 int view_frame_keyframes; /* number of keyframes to zoom around current frame */
512 float view_frame_seconds; /* seconds to zoom around current frame */
514 short scrcastfps; /* frame rate for screencast to be played back */
515 short scrcastwait; /* milliseconds between screencast snapshots */
517 short widget_unit; /* private, defaults to 20 for 72 DPI setting */
518 short anisotropic_filter;
519 short use_16bit_textures, use_gpu_mipmap;
521 float ndof_sensitivity; /* overall sensitivity of 3D mouse */
522 float ndof_orbit_sensitivity;
523 float ndof_deadzone; /* deadzone of 3D mouse */
524 int ndof_flag; /* flags for 3D mouse */
526 short ogl_multisamples; /* amount of samples for OpenGL FSA, if zero no FSA */
528 short image_draw_method; /* Method to be used to draw the images (AUTO, GLSL, Textures or DrawPixels) */
532 short autokey_mode; /* autokeying mode */
533 short autokey_flag; /* flags for autokeying */
535 short text_render, pad9; /* options for text rendering */
537 struct ColorBand coba_weight; /* from texture.h */
539 float sculpt_paint_overlay_col[3];
540 float gpencil_new_layer_col[4]; /* default color for newly created Grease Pencil layers */
542 short tweak_threshold;
543 char navigation_mode, pad;
545 char author[80]; /* author name for file formats supporting it */
547 char font_path_ui[1024];
548 char font_path_ui_mono[1024];
550 int compute_device_type;
551 int compute_device_id;
553 float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */
554 float pixelsize; /* private, set by GHOST, to multiply DPI with */
555 int virtual_pixel; /* virtual pixelsize mode */
557 short pie_interaction_type; /* if keeping a pie menu spawn button pressed after this time, it turns into
558 * a drag/release pie menu */
559 short pie_initial_timeout; /* direction in the pie menu will always be calculated from the initial position
560 * within this time limit */
561 short pie_animation_timeout;
562 short pie_menu_confirm;
563 short pie_menu_radius; /* pie menu radius */
564 short pie_menu_threshold; /* pie menu distance from center before a direction is set */
566 struct WalkNavigation walk_navigation;
568 short opensubdiv_compute_type;
572 extern UserDef U; /* from blenkernel blender.c */
574 /* ***************** USERDEF ****************** */
576 /* userpref/section */
577 typedef enum eUserPref_Section {
578 USER_SECTION_INTERFACE = 0,
579 USER_SECTION_EDIT = 1,
580 USER_SECTION_FILE = 2,
581 USER_SECTION_SYSTEM = 3,
582 USER_SECTION_THEME = 4,
583 USER_SECTION_INPUT = 5,
584 USER_SECTION_ADDONS = 6,
588 typedef enum eUserPref_Flag {
589 USER_AUTOSAVE = (1 << 0),
590 /* USER_AUTOGRABGRID = (1 << 1), deprecated */
591 /* USER_AUTOROTGRID = (1 << 2), deprecated */
592 /* USER_AUTOSIZEGRID = (1 << 3), deprecated */
593 USER_SCENEGLOBAL = (1 << 4),
594 USER_TRACKBALL = (1 << 5),
595 /* USER_DUPLILINK = (1 << 6), deprecated */
596 /* USER_FSCOLLUM = (1 << 7), deprecated */
597 USER_MAT_ON_OB = (1 << 8),
598 /* USER_NO_CAPSLOCK = (1 << 9), */ /* not used anywhere */
599 /* USER_VIEWMOVE = (1 << 10), */ /* not used anywhere */
600 USER_TOOLTIPS = (1 << 11),
601 USER_TWOBUTTONMOUSE = (1 << 12),
602 USER_NONUMPAD = (1 << 13),
603 USER_LMOUSESELECT = (1 << 14),
604 USER_FILECOMPRESS = (1 << 15),
605 USER_SAVE_PREVIEWS = (1 << 16),
606 USER_CUSTOM_RANGE = (1 << 17),
607 USER_ADD_EDITMODE = (1 << 18),
608 USER_ADD_VIEWALIGNED = (1 << 19),
609 USER_RELPATHS = (1 << 20),
610 USER_RELEASECONFIRM = (1 << 21),
611 USER_SCRIPT_AUTOEXEC_DISABLE = (1 << 22),
612 USER_FILENOUI = (1 << 23),
613 USER_NONEGFRAMES = (1 << 24),
614 USER_TXT_TABSTOSPACES_DISABLE = (1 << 25),
615 USER_TOOLTIPS_PYTHON = (1 << 26),
619 typedef enum ePathCompare_Flag {
620 USER_PATHCMP_GLOB = (1 << 0),
623 /* helper macro for checking frame clamping */
624 #define FRAMENUMBER_MIN_CLAMP(cfra) { \
625 if ((U.flag & USER_NONEGFRAMES) && (cfra < 0)) \
630 typedef enum eViewZoom_Style {
636 /* navigation_mode */
637 typedef enum eViewNavigation_Method {
638 VIEW_NAVIGATION_WALK = 0,
639 VIEW_NAVIGATION_FLY = 1,
640 } eViewNavigation_Method;
643 typedef enum eWalkNavigation_Flag {
644 USER_WALK_GRAVITY = (1 << 0),
645 USER_WALK_MOUSE_REVERSE = (1 << 1),
646 } eWalkNavigation_Flag;
649 typedef enum eUserpref_UI_Flag {
650 /* flags 0 and 1 were old flags (for autokeying) that aren't used anymore */
651 USER_WHEELZOOMDIR = (1 << 2),
652 USER_FILTERFILEEXTS = (1 << 3),
653 USER_DRAWVIEWINFO = (1 << 4),
654 USER_PLAINMENUS = (1 << 5),
655 /* flags 6 and 7 were old flags that are no-longer used */
656 USER_ALLWINCODECS = (1 << 8),
657 USER_MENUOPENAUTO = (1 << 9),
658 USER_ZBUF_CURSOR = (1 << 10),
659 USER_AUTOPERSP = (1 << 11),
660 USER_LOCKAROUND = (1 << 12),
661 USER_GLOBALUNDO = (1 << 13),
662 USER_ORBIT_SELECTION = (1 << 14),
663 USER_ZBUF_ORBIT = (1 << 15),
664 USER_HIDE_DOT = (1 << 16),
665 USER_SHOW_ROTVIEWICON = (1 << 17),
666 USER_SHOW_VIEWPORTNAME = (1 << 18),
667 USER_CAM_LOCK_NO_PARENT = (1 << 19),
668 USER_ZOOM_TO_MOUSEPOS = (1 << 20),
669 USER_SHOW_FPS = (1 << 21),
670 USER_MMB_PASTE = (1 << 22),
671 USER_MENUFIXEDORDER = (1 << 23),
672 USER_CONTINUOUS_MOUSE = (1 << 24),
673 USER_ZOOM_INVERT = (1 << 25),
674 USER_ZOOM_HORIZ = (1 << 26), /* for CONTINUE and DOLLY zoom */
675 USER_SPLASH_DISABLE = (1 << 27),
676 USER_HIDE_RECENT = (1 << 28),
677 USER_SHOW_THUMBNAILS = (1 << 29),
678 USER_QUIT_PROMPT = (1 << 30),
679 USER_HIDE_SYSTEM_BOOKMARKS = (1 << 31)
683 typedef enum eUserpref_UI_Flag2 {
684 USER_KEEP_SESSION = (1 << 0),
685 USER_REGION_OVERLAP = (1 << 1),
686 USER_TRACKPAD_NATURAL = (1 << 2),
687 } eUserpref_UI_Flag2;
689 /* Auto-Keying mode */
690 typedef enum eAutokey_Mode {
691 /* AUTOKEY_ON is a bitflag */
694 /* AUTOKEY_ON + 2**n... (i.e. AUTOKEY_MODE_NORMAL = AUTOKEY_ON + 2) to preserve setting, even when autokey turned off */
695 AUTOKEY_MODE_NORMAL = 3,
696 AUTOKEY_MODE_EDITKEYS = 5
699 /* Zoom to frame mode */
700 typedef enum eZoomFrame_Mode {
701 ZOOM_FRAME_MODE_KEEP_RANGE = 0,
702 ZOOM_FRAME_MODE_SECONDS = 1,
703 ZOOM_FRAME_MODE_KEYFRAMES = 2
707 * U.autokey_flag (not strictly used when autokeying only - is also used when keyframing these days)
708 * note: AUTOKEY_FLAG_* is used with a macro, search for lines like IS_AUTOKEY_FLAG(INSERTAVAIL)
710 typedef enum eAutokey_Flag {
711 AUTOKEY_FLAG_INSERTAVAIL = (1 << 0),
712 AUTOKEY_FLAG_INSERTNEEDED = (1 << 1),
713 AUTOKEY_FLAG_AUTOMATKEY = (1 << 2),
714 AUTOKEY_FLAG_XYZ2RGB = (1 << 3),
716 /* toolsettings->autokey_flag */
717 AUTOKEY_FLAG_ONLYKEYINGSET = (1 << 6),
718 AUTOKEY_FLAG_NOWARNING = (1 << 7),
719 ANIMRECORD_FLAG_WITHNLA = (1 << 10),
723 typedef enum eUserpref_Translation_Flags {
724 USER_TR_TOOLTIPS = (1 << 0),
725 USER_TR_IFACE = (1 << 1),
726 /* USER_TR_MENUS = (1 << 2), deprecated */
727 /* USER_TR_FILESELECT = (1 << 3), deprecated */
728 /* USER_TR_TEXTEDIT = (1 << 4), deprecated */
729 USER_DOTRANSLATE = (1 << 5),
730 USER_USETEXTUREFONT = (1 << 6),
731 /* CONVERT_TO_UTF8 = (1 << 7), deprecated */
732 USER_TR_NEWDATANAME = (1 << 8),
733 } eUserpref_Translation_Flags;
736 typedef enum eDupli_ID_Flags {
737 USER_DUP_MESH = (1 << 0),
738 USER_DUP_CURVE = (1 << 1),
739 USER_DUP_SURF = (1 << 2),
740 USER_DUP_FONT = (1 << 3),
741 USER_DUP_MBALL = (1 << 4),
742 USER_DUP_LAMP = (1 << 5),
743 USER_DUP_IPO = (1 << 6),
744 USER_DUP_MAT = (1 << 7),
745 USER_DUP_TEX = (1 << 8),
746 USER_DUP_ARM = (1 << 9),
747 USER_DUP_ACT = (1 << 10),
748 USER_DUP_PSYS = (1 << 11)
752 typedef enum eOpenGL_RenderingOptions {
753 /* USER_DEPRECATED_FLAG = (1 << 0), */
754 /* USER_DISABLE_SOUND = (1 << 1), */ /* deprecated, don't use without checking for */
755 /* backwards compatibilty in do_versions! */
756 USER_DISABLE_MIPMAP = (1 << 2),
757 /* USER_DISABLE_VBO = (1 << 3), */ /* DEPRECATED we always use vertex buffers now */
758 /* USER_DISABLE_AA = (1 << 4), */ /* DEPRECATED */
759 } eOpenGL_RenderingOptions;
761 /* selection method for opengl gpu_select_method */
762 typedef enum eOpenGL_SelectOptions {
763 USER_SELECT_AUTO = 0,
764 USER_SELECT_USE_OCCLUSION_QUERY = 1,
765 USER_SELECT_USE_SELECT_RENDERMODE = 2
766 } eOpenGL_SelectOptions;
769 typedef enum eWM_DrawMethod {
770 USER_DRAW_TRIPLE = 0,
771 USER_DRAW_OVERLAP = 1,
773 USER_DRAW_AUTOMATIC = 3,
774 USER_DRAW_OVERLAP_FLIP = 4,
777 /* text draw options */
778 typedef enum eText_Draw_Options {
779 USER_TEXT_DISABLE_AA = (1 << 0),
780 } eText_Draw_Options;
782 /* tw_flag (transform widget) */
784 /* gp_settings (Grease Pencil Settings) */
785 typedef enum eGP_UserdefSettings {
786 GP_PAINT_DOSMOOTH = (1 << 0),
787 GP_PAINT_DOSIMPLIFY = (1 << 1),
788 } eGP_UserdefSettings;
790 /* color picker types */
791 typedef enum eColorPicker_Types {
792 USER_CP_CIRCLE_HSV = 0,
793 USER_CP_SQUARE_SV = 1,
794 USER_CP_SQUARE_HS = 2,
795 USER_CP_SQUARE_HV = 3,
796 USER_CP_CIRCLE_HSL = 4,
797 } eColorPicker_Types;
799 /* timecode display styles */
800 typedef enum eTimecodeStyles {
801 /* as little info as is necessary to show relevant info
802 * with '+' to denote the frames
803 * i.e. HH:MM:SS+FF, MM:SS+FF, SS+FF, or MM:SS
805 USER_TIMECODE_MINIMAL = 0,
807 /* reduced SMPTE - (HH:)MM:SS:FF */
808 USER_TIMECODE_SMPTE_MSF = 1,
810 /* full SMPTE - HH:MM:SS:FF */
811 USER_TIMECODE_SMPTE_FULL = 2,
813 /* milliseconds for sub-frames - HH:MM:SS.sss */
814 USER_TIMECODE_MILLISECONDS = 3,
817 USER_TIMECODE_SECONDS_ONLY = 4,
819 /* Private (not exposed as generic choices) options. */
820 /* milliseconds for sub-frames , SubRip format- HH:MM:SS,sss */
821 USER_TIMECODE_SUBRIP = 100,
824 /* theme drawtypes */
825 /* XXX: These are probably only for the old UI engine? */
826 typedef enum eTheme_DrawTypes {
834 /* ndof_flag (3D mouse options) */
835 typedef enum eNdof_Flag {
836 NDOF_SHOW_GUIDE = (1 << 0),
837 NDOF_FLY_HELICOPTER = (1 << 1),
838 NDOF_LOCK_HORIZON = (1 << 2),
840 /* the following might not need to be saved between sessions,
841 * but they do need to live somewhere accessible... */
842 NDOF_SHOULD_PAN = (1 << 3),
843 NDOF_SHOULD_ZOOM = (1 << 4),
844 NDOF_SHOULD_ROTATE = (1 << 5),
846 /* orbit navigation modes */
848 /* exposed as Orbit|Explore in the UI */
849 NDOF_MODE_ORBIT = (1 << 6),
851 /* actually... users probably don't care about what the mode
852 * is called, just that it feels right */
853 /* zoom is up/down if this flag is set (otherwise forward/backward) */
854 NDOF_PAN_YZ_SWAP_AXIS = (1 << 7),
855 NDOF_ZOOM_INVERT = (1 << 8),
856 NDOF_ROTX_INVERT_AXIS = (1 << 9),
857 NDOF_ROTY_INVERT_AXIS = (1 << 10),
858 NDOF_ROTZ_INVERT_AXIS = (1 << 11),
859 NDOF_PANX_INVERT_AXIS = (1 << 12),
860 NDOF_PANY_INVERT_AXIS = (1 << 13),
861 NDOF_PANZ_INVERT_AXIS = (1 << 14),
862 NDOF_TURNTABLE = (1 << 15),
865 #define NDOF_PIXELS_PER_SECOND 600.0f
867 /* compute_device_type */
868 typedef enum eCompute_Device_Type {
869 USER_COMPUTE_DEVICE_NONE = 0,
870 USER_COMPUTE_DEVICE_OPENCL = 1,
871 USER_COMPUTE_DEVICE_CUDA = 2,
872 } eCompute_Device_Type;
875 typedef enum eMultiSample_Type {
876 USER_MULTISAMPLE_NONE = 0,
877 USER_MULTISAMPLE_2 = 2,
878 USER_MULTISAMPLE_4 = 4,
879 USER_MULTISAMPLE_8 = 8,
880 USER_MULTISAMPLE_16 = 16,
883 typedef enum eImageDrawMethod {
884 /* IMAGE_DRAW_METHOD_AUTO = 0, */ /* Currently unused */
885 IMAGE_DRAW_METHOD_GLSL = 1,
886 IMAGE_DRAW_METHOD_2DTEXTURE = 2,
887 IMAGE_DRAW_METHOD_DRAWPIXELS = 3,
890 typedef enum eUserpref_VirtualPixel {
891 VIRTUAL_PIXEL_NATIVE = 0,
892 VIRTUAL_PIXEL_DOUBLE = 1,
893 } eUserpref_VirtualPixel;
895 typedef enum eOpensubdiv_Computee_Type {
896 USER_OPENSUBDIV_COMPUTE_NONE = 0,
897 USER_OPENSUBDIV_COMPUTE_CPU = 1,
898 USER_OPENSUBDIV_COMPUTE_OPENMP = 2,
899 USER_OPENSUBDIV_COMPUTE_OPENCL = 3,
900 USER_OPENSUBDIV_COMPUTE_CUDA = 4,
901 USER_OPENSUBDIV_COMPUTE_GLSL_TRANSFORM_FEEDBACK = 5,
902 USER_OPENSUBDIV_COMPUTE_GLSL_COMPUTE = 6,
903 } eOpensubdiv_Computee_Type;