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 #define GPU_VIEWPORT_QUALITY_FXAA 0.10f
52 #define GPU_VIEWPORT_QUALITY_TAA8 0.25f
53 #define GPU_VIEWPORT_QUALITY_TAA16 0.6f
54 #define GPU_VIEWPORT_QUALITY_TAA32 0.8f
56 /* default offered by Blender.
58 typedef enum eUIFont_ID {
60 /* UIFONT_BITMAP = 1 */ /* UNUSED */
67 /* default fonts to load/initialize */
68 /* first font is the default (index 0), others optional */
69 typedef struct uiFont {
70 struct uiFont *next, *prev;
71 /** 1024 = FILE_MAX. */
73 /** From blfont lib. */
75 /** Own id (eUIFont_ID). */
77 /** Fonts that read from left to right. */
82 /* this state defines appearance of text */
83 typedef struct uiFontStyle {
84 /** Saved in file, 0 is default. */
86 /** Actual size depends on 'global' dpi. */
88 /** Unfitted or default kerning value. */
92 /** Value is amount of pixels blur. */
94 /** Shadow offset in pixels. */
98 /** 1 value, typically white or black anyway. */
102 /* this is fed to the layout engine and widget code */
104 typedef struct uiStyle {
105 struct uiStyle *next, *prev;
107 /** MAX_STYLE_NAME. */
110 uiFontStyle paneltitle;
111 uiFontStyle grouplabel;
112 uiFontStyle widgetlabel;
117 /** In characters. */
119 /** In characters. */
120 short minwidgetchars;
133 typedef struct uiWidgetColors {
142 short shadetop, shadedown;
146 typedef struct uiWidgetStateColors {
148 char inner_anim_sel[4];
150 char inner_key_sel[4];
151 char inner_driven[4];
152 char inner_driven_sel[4];
153 char inner_overridden[4];
154 char inner_overridden_sel[4];
155 char inner_changed[4];
156 char inner_changed_sel[4];
158 } uiWidgetStateColors;
160 typedef struct uiPanelColors {
167 typedef struct uiGradientColors {
169 char high_gradient[4];
174 typedef struct ThemeUI {
175 /* Interface Elements (buttons, menus, icons) */
176 uiWidgetColors wcol_regular, wcol_tool, wcol_toolbar_item, wcol_text;
177 uiWidgetColors wcol_radio, wcol_option, wcol_toggle;
178 uiWidgetColors wcol_num, wcol_numslider, wcol_tab;
179 uiWidgetColors wcol_menu, wcol_pulldown, wcol_menu_back, wcol_menu_item, wcol_tooltip;
180 uiWidgetColors wcol_box, wcol_scroll, wcol_progress, wcol_list_item, wcol_pie_menu;
182 uiWidgetStateColors wcol_state;
184 /** Deprecated, but we keep it for do_versions (2.66.1). */
187 char widget_emboss[4];
189 /* fac: 0 - 1 for blend factor, width in pixels */
190 float menu_shadow_fac;
191 short menu_shadow_width;
193 char editor_outline[4];
196 char iconfile[256]; // FILE_MAXFILE length
198 float icon_saturation;
202 char xaxis[4], yaxis[4], zaxis[4];
206 char gizmo_primary[4];
207 char gizmo_secondary[4];
212 /** Collection items. */
213 char icon_collection[4];
216 /** Object data items. */
217 char icon_object_data[4];
218 /** Modifier and constraint items. */
219 char icon_modifier[4];
220 /** Shading related items. */
221 char icon_shading[4];
224 /* try to put them all in one, if needed a special struct can be created as well
225 * for example later on, when we introduce wire colors for ob types or so...
227 typedef struct ThemeSpace {
228 /* main window colors */
236 /** Region background. */
239 char header_title[4];
241 char header_text_hi[4];
245 char tab_inactive[4];
249 /* button/tool regions */
250 /** Region background. */
253 char button_title[4];
255 char button_text_hi[4];
257 /* listview regions */
258 /** Region background. */
263 char list_text_hi[4];
265 /* navigation bar regions */
266 /** Region background. */
267 char navigation_bar[4];
268 /** Region background. */
269 char execution_buts[4];
272 /* char panel[4]; unused */
273 /* char panel_title[4]; unused */
274 /* char panel_text[4]; unused */
275 /* char panel_text_hi[4]; unused */
277 /* note, cannot use name 'panel' because of DNA mapping old files */
278 uiPanelColors panelcolors;
280 uiGradientColors gradients;
288 char view_overlay[4];
290 char wire[4], wire_edit[4], select[4];
291 char lamp[4], speaker[4], empty[4], camera[4];
292 char active[4], group[4], group_active[4], transform[4];
293 char vertex[4], vertex_select[4], vertex_bevel[4], vertex_unreferenced[4];
294 char edge[4], edge_select[4];
295 char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4], edge_bevel[4];
297 char face[4], face_select[4];
298 /** selected color. */
300 char extra_edge_len[4], extra_edge_angle[4], extra_face_angle[4], extra_face_area[4];
302 char vertex_normal[4];
304 char bone_solid[4], bone_pose[4], bone_pose_active[4];
305 char strip[4], strip_select[4];
307 char time_keyframe[4], time_gp_keyframe[4];
308 char freestyle_edge_mark[4], freestyle_face_mark[4];
310 char nurb_uline[4], nurb_vline[4];
311 char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4], lastsel_point[4];
313 char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4];
314 char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4];
317 char ds_channel[4], ds_subchannel[4], ds_ipoline[4];
319 char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4], keytype_movehold[4];
321 char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4], keytype_movehold_select[4];
322 char keyborder[4], keyborder_select[4];
325 char console_output[4], console_input[4], console_info[4], console_error[4];
326 char console_cursor[4], console_select[4];
328 char vertex_size, outline_width, facedot_size;
331 /* syntax for textwindow and nodes */
332 char syntaxl[4], syntaxs[4]; // in nodespace used for backdrop matte
333 char syntaxb[4], syntaxn[4]; // in nodespace used for color input
334 char syntaxv[4], syntaxc[4]; // in nodespace used for converter group
335 char syntaxd[4], syntaxr[4]; // in nodespace used for distort
337 char nodeclass_output[4], nodeclass_filter[4];
338 char nodeclass_vector[4], nodeclass_texture[4];
339 char nodeclass_shader[4], nodeclass_script[4];
340 char nodeclass_pattern[4], nodeclass_layout[4];
342 /** For sequence editor. */
343 char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4];
344 char effect[4], transition[4], meta[4], text_strip[4];
346 /** For dopesheet - scale factor for size of keyframes (i.e. height of channels). */
347 float keyframe_scale_fac;
349 char editmesh_active[4];
351 char handle_vertex[4];
352 char handle_vertex_select[4];
354 char handle_vertex_size;
356 char clipping_border_3d[4];
358 char marker_outline[4], marker[4], act_marker[4], sel_marker[4], dis_marker[4], lock_marker[4];
359 char bundle_solid[4];
360 char path_before[4], path_after[4];
365 char gp_vertex[4], gp_vertex_select[4];
367 char preview_back[4];
368 char preview_stitch_face[4];
369 char preview_stitch_edge[4];
370 char preview_stitch_vert[4];
371 char preview_stitch_stitchable[4];
372 char preview_stitch_unstitchable[4];
373 char preview_stitch_active[4];
375 /** Two uses, for uvs with modifier applied on mesh and uvs during painting. */
377 /** Uvs of other objects. */
380 /** Outliner - filter match. */
382 /** Outliner - selected item. */
383 char selected_highlight[4];
385 /** Skin modifier root color. */
389 /** Active Action + Summary Channel. */
391 /** Active Action = NULL. */
392 char anim_non_active[4];
393 /** Preview range overlay. */
394 char anim_preview_range[4];
397 /** NLA 'Tweaking' action/strip. */
398 char nla_tweaking[4];
399 /** NLA - warning color for duplicate instances of tweaking strip. */
400 char nla_tweakdupli[4];
402 /** NLA "Transition" strips. */
403 char nla_transition[4], nla_transition_sel[4];
404 /** NLA "Meta" strips. */
405 char nla_meta[4], nla_meta_sel[4];
406 /** NLA "Sound" strips. */
407 char nla_sound[4], nla_sound_sel[4];
410 char info_selected[4], info_selected_text[4];
411 char info_error[4], info_error_text[4];
412 char info_warning[4], info_warning_text[4];
413 char info_info[4], info_info_text[4];
414 char info_debug[4], info_debug_text[4];
416 char paint_curve_pivot[4];
417 char paint_curve_handle[4];
420 char metadatatext[4];
424 /* set of colors for use as a custom color set for Objects/Bones wire drawing */
425 typedef struct ThemeWireColor {
430 /** #eWireColor_Flags. */
435 /* ThemeWireColor.flag */
436 typedef enum eWireColor_Flags {
437 TH_WIRECOLOR_CONSTCOLS = (1 << 0),
438 TH_WIRECOLOR_TEXTCOLS = (1 << 1),
442 typedef struct bTheme {
443 struct bTheme *next, *prev;
448 /* Individual Spacetypes */
449 /* note: ensure UI_THEMESPACE_END is updated when adding */
463 ThemeSpace tuserpref;
467 ThemeSpace tstatusbar;
469 /* 20 sets of bone colors for this theme */
470 ThemeWireColor tarm[20];
471 /*ThemeWireColor tobj[20];*/
473 int active_theme_area, pad;
476 #define UI_THEMESPACE_START(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), &((btheme)->tbuts))
477 #define UI_THEMESPACE_END(btheme) (CHECK_TYPE_INLINE(btheme, bTheme *), (&((btheme)->tclip) + 1))
479 typedef struct bAddon {
480 struct bAddon *next, *prev;
482 /** User-Defined Properties on this Addon (for storing preferences). */
486 typedef struct bPathCompare {
487 struct bPathCompare *next, *prev;
493 typedef struct bUserMenu {
494 struct bUserMenu *next, *prev;
502 /* May be part of bUserMenu or other list. */
503 typedef struct bUserMenuItem {
504 struct bUserMenuItem *next, *prev;
510 typedef struct bUserMenuItem_Op {
513 struct IDProperty *prop;
518 typedef struct bUserMenuItem_Menu {
521 } bUserMenuItem_Menu;
523 typedef struct bUserMenuItem_Prop {
525 char context_data_path[256];
529 } bUserMenuItem_Prop;
532 USER_MENU_TYPE_SEP = 1,
533 USER_MENU_TYPE_OPERATOR = 2,
534 USER_MENU_TYPE_MENU = 3,
535 USER_MENU_TYPE_PROP = 4,
538 typedef struct SolidLight {
542 float col[4], spec[4], vec[4];
545 typedef struct WalkNavigation {
546 /** Speed factor for look around. */
549 float walk_speed_factor;
552 /** Duration to use for teleporting. */
558 typedef struct UserDef {
559 /* UserDef has separate do-version handling, and can be read from other files */
560 int versionfile, subversionfile;
562 /** #eUserPref_Flag. */
564 /** #eDupli_ID_Flags. */
567 /** FILE_MAXDIR length. */
570 /** FILE_MAX length. */
571 char renderdir[1024];
573 /** 768 = FILE_MAXDIR. */
574 char render_cachedir[768];
579 /** 1024 = FILE_MAX. */
580 char image_editor[1024];
581 /** 1024 = FILE_MAX. */
582 char anim_player[1024];
583 int anim_player_preset;
585 /** Minimum spacing between gridlines in View2D grids. */
586 short v2d_min_gridsize;
587 /** #eTimecodeStyles, style of timecode display. */
588 short timecode_style;
591 short dbl_click_time;
594 short wheellinescroll;
595 /** #eUserpref_UI_Flag. */
597 /** #eUserpref_UI_Flag2. */
599 /* Experimental flag for app-templates to make changes to behavior
600 * which are outside the scope of typical preferences. */
613 /** Setting for UI scale. */
615 /** Setting for UI line width. */
617 /** Runtime, full DPI divided by pixelsize. */
619 /** Runtime, multiplier to scale UI elements based on DPI. */
621 /** Runtime, line width and point size based on DPI. */
623 /** Deprecated, for forward compatibility. */
626 /** Console scrollback limit. */
628 /** Node insert offset (aka auto-offset) margin, but might be useful for later stuff as well. */
631 /** #eUserpref_Translation_Flags. */
633 short menuthreshold1, menuthreshold2;
635 /* startup template */
636 char app_template[64];
638 struct ListBase themes;
639 struct ListBase uifonts;
640 struct ListBase uistyles;
641 struct ListBase user_keymaps;
642 /** #wmKeyConfigPref. */
643 struct ListBase user_keyconfig_prefs;
644 struct ListBase addons;
645 struct ListBase autoexec_paths;
647 struct ListBase user_menus;
649 char keyconfigstr[64];
654 float gpu_viewport_quality;
655 short gp_manhattendist, gp_euclideandist, gp_eraser;
656 /** #eGP_UserdefSettings. */
658 short tb_leftmouse, tb_rightmouse;
659 /* Was using non-aligned struct! */
660 /* struct SolidLight light[3] DNA_DEPRECATED; */
661 struct SolidLight light_param[4];
662 float light_ambient[3], pad7;
663 short gizmo_flag, gizmo_size;
664 short edit_studio_light;
666 short textimeout, texcollectrate;
670 /** Control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use. */
674 /** Rotating view icon size. */
676 /** Rotating view icon brightness. */
678 /** Maximum number of recently used files to remember . */
680 /** Milliseconds to spend spinning the view. */
684 /** #eColorPicker_Types. */
685 short color_picker_type;
686 /** Interpolation mode for newly added F-Curves. */
688 /** Handle types for newly added keyframes. */
690 char gpu_select_method;
691 char gpu_select_pick_deph;
693 /** #eZoomFrame_Mode. */
694 char view_frame_type;
696 /** Number of keyframes to zoom around current frame. */
697 int view_frame_keyframes;
698 /** Seconds to zoom around current frame. */
699 float view_frame_seconds;
703 /** Private, defaults to 20 for 72 DPI setting. */
705 short anisotropic_filter;
706 short use_16bit_textures, use_gpu_mipmap;
708 /** Raw tablet pressure that maps to 100%. */
709 float pressure_threshold_max;
710 /** Curve non-linearity parameter. */
711 float pressure_softness;
713 /** Overall sensitivity of 3D mouse. */
714 float ndof_sensitivity;
715 float ndof_orbit_sensitivity;
716 /** Deadzone of 3D mouse. */
718 /** #eNdof_Flag, flags for 3D mouse. */
721 /** #eMultiSample_Type, amount of samples for OpenGL FSA, if zero no FSA. */
722 short ogl_multisamples;
724 /* eImageDrawMethod, Method to be used to draw the images (AUTO, GLSL, Textures or DrawPixels) */
725 short image_draw_method;
729 /** #eAutokey_Mode, autokeying mode. */
731 /** Flags for autokeying. */
734 /** Options for text rendering. */
735 short text_render, pad9;
737 /** From texture.h. */
738 struct ColorBand coba_weight;
740 float sculpt_paint_overlay_col[3];
741 /** Default color for newly created Grease Pencil layers. */
742 float gpencil_new_layer_col[4];
744 short tweak_threshold;
745 char navigation_mode, pad10;
747 char font_path_ui[1024];
748 char font_path_ui_mono[1024];
750 int compute_device_type;
751 int compute_device_id;
753 /** Opacity of inactive F-Curves in F-Curve Editor. */
754 float fcu_inactive_alpha;
757 * If keeping a pie menu spawn button pressed after this time,
758 * it turns into a drag/release pie menu.
760 short pie_tap_timeout;
762 * Direction in the pie menu will always be calculated from the
763 * initial position within this time limit.
765 short pie_initial_timeout;
766 short pie_animation_timeout;
767 short pie_menu_confirm;
768 /** Pie menu radius. */
769 short pie_menu_radius;
770 /** Pie menu distance from center before a direction is set. */
771 short pie_menu_threshold;
773 struct WalkNavigation walk_navigation;
775 short opensubdiv_compute_type;
776 /** #eMultiSample_Type, amount of samples for Grease Pencil. */
777 short gpencil_multisamples;
782 /* from blenkernel blender.c */
785 /* ***************** USERDEF ****************** */
787 /* Toggles for unfinished 2.8 UserPref design. */
788 //#define WITH_USERDEF_WORKSPACES
789 //#define WITH_USERDEF_SYSTEM_SPLIT
791 /* UserDef.userpref (UI active_section) */
792 typedef enum eUserPref_Section {
793 USER_SECTION_INTERFACE = 0,
794 USER_SECTION_EDIT = 1,
795 USER_SECTION_SYSTEM_FILES = 2,
796 USER_SECTION_SYSTEM_GENERAL = 3,
797 USER_SECTION_THEME = 4,
798 USER_SECTION_INPUT = 5,
799 USER_SECTION_ADDONS = 6,
800 USER_SECTION_LIGHT = 7,
801 USER_SECTION_KEYMAP = 8,
802 #ifdef WITH_USERDEF_WORKSPACES
803 USER_SECTION_WORKSPACE_CONFIG = 9,
804 USER_SECTION_WORKSPACE_ADDONS = 10,
805 USER_SECTION_WORKSPACE_KEYMAPS = 11,
807 #ifdef WITH_USERDEF_SYSTEM_SPLIT
808 USER_SECTION_SYSTEM_DISPLAY = 12,
809 USER_SECTION_SYSTEM_DEVICES = 13,
813 /* UserDef.userpref_flag (State of the user preferences UI). */
814 typedef enum eUserPref_SectionFlag {
815 /* Hide/expand keymap preferences. */
816 USER_SECTION_INPUT_HIDE_UI_KEYCONFIG = (1 << 0),
817 } eUserPref_SectionFlag;
820 typedef enum eUserPref_Flag {
821 USER_AUTOSAVE = (1 << 0),
822 USER_FLAG_NUMINPUT_ADVANCED = (1 << 1),
823 USER_FLAG_DEPRECATED_2 = (1 << 2), /* cleared */
824 USER_FLAG_DEPRECATED_3 = (1 << 3), /* cleared */
825 USER_FLAG_DEPRECATED_4 = (1 << 4), /* cleared */
826 USER_TRACKBALL = (1 << 5),
827 USER_FLAG_DEPRECATED_6 = (1 << 6), /* cleared */
828 USER_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */
829 USER_MAT_ON_OB = (1 << 8),
830 USER_FLAG_DEPRECATED_9 = (1 << 9), /* cleared */
831 USER_DEVELOPER_UI = (1 << 10),
832 USER_TOOLTIPS = (1 << 11),
833 USER_TWOBUTTONMOUSE = (1 << 12),
834 USER_NONUMPAD = (1 << 13),
835 USER_FLAG_DEPRECATED_14 = (1 << 14), /* cleared */
836 USER_FILECOMPRESS = (1 << 15),
837 USER_SAVE_PREVIEWS = (1 << 16),
838 USER_CUSTOM_RANGE = (1 << 17),
839 USER_ADD_EDITMODE = (1 << 18),
840 USER_ADD_VIEWALIGNED = (1 << 19),
841 USER_RELPATHS = (1 << 20),
842 USER_RELEASECONFIRM = (1 << 21),
843 USER_SCRIPT_AUTOEXEC_DISABLE = (1 << 22),
844 USER_FILENOUI = (1 << 23),
845 USER_NONEGFRAMES = (1 << 24),
846 USER_TXT_TABSTOSPACES_DISABLE = (1 << 25),
847 USER_TOOLTIPS_PYTHON = (1 << 26),
850 /* bPathCompare.flag */
851 typedef enum ePathCompare_Flag {
852 USER_PATHCMP_GLOB = (1 << 0),
855 /* helper macro for checking frame clamping */
856 #define FRAMENUMBER_MIN_CLAMP(cfra) { \
857 if ((U.flag & USER_NONEGFRAMES) && (cfra < 0)) \
861 /* UserDef.viewzoom */
862 typedef enum eViewZoom_Style {
868 /* UserDef.navigation_mode */
869 typedef enum eViewNavigation_Method {
870 VIEW_NAVIGATION_WALK = 0,
871 VIEW_NAVIGATION_FLY = 1,
872 } eViewNavigation_Method;
875 typedef enum eWalkNavigation_Flag {
876 USER_WALK_GRAVITY = (1 << 0),
877 USER_WALK_MOUSE_REVERSE = (1 << 1),
878 } eWalkNavigation_Flag;
881 typedef enum eUserpref_UI_Flag {
882 /* flags 0 and 1 were old flags (for autokeying) that aren't used anymore */
883 USER_WHEELZOOMDIR = (1 << 2),
884 USER_FILTERFILEEXTS = (1 << 3),
885 USER_DRAWVIEWINFO = (1 << 4),
886 USER_PLAINMENUS = (1 << 5),
887 USER_LOCK_CURSOR_ADJUST = (1 << 6),
888 USER_HEADER_BOTTOM = (1 << 7),
889 USER_UIFLAG_DEPRECATED_8 = (1 << 8), /* cleared */
890 USER_MENUOPENAUTO = (1 << 9),
891 USER_DEPTH_CURSOR = (1 << 10),
892 USER_AUTOPERSP = (1 << 11),
893 USER_UIFLAG_DEPRECATED_12 = (1 << 12), /* cleared */
894 USER_GLOBALUNDO = (1 << 13),
895 USER_ORBIT_SELECTION = (1 << 14),
896 USER_DEPTH_NAVIGATE = (1 << 15),
897 USER_HIDE_DOT = (1 << 16),
898 USER_SHOW_GIZMO_AXIS = (1 << 17),
899 USER_SHOW_VIEWPORTNAME = (1 << 18),
900 USER_CAM_LOCK_NO_PARENT = (1 << 19),
901 USER_ZOOM_TO_MOUSEPOS = (1 << 20),
902 USER_SHOW_FPS = (1 << 21),
903 USER_UIFLAG_DEPRECATED_22 = (1 << 22), /* cleared */
904 USER_MENUFIXEDORDER = (1 << 23),
905 USER_CONTINUOUS_MOUSE = (1 << 24),
906 USER_ZOOM_INVERT = (1 << 25),
907 USER_ZOOM_HORIZ = (1 << 26), /* for CONTINUE and DOLLY zoom */
908 USER_SPLASH_DISABLE = (1 << 27),
909 USER_HIDE_RECENT = (1 << 28),
910 USER_SHOW_THUMBNAILS = (1 << 29),
911 USER_QUIT_PROMPT = (1 << 30),
912 USER_HIDE_SYSTEM_BOOKMARKS = (1u << 31)
915 /* UserDef.uiflag2 */
916 typedef enum eUserpref_UI_Flag2 {
917 USER_KEEP_SESSION = (1 << 0),
918 USER_REGION_OVERLAP = (1 << 1),
919 USER_TRACKPAD_NATURAL = (1 << 2),
920 } eUserpref_UI_Flag2;
922 /* UserDef.app_flag */
923 typedef enum eUserpref_APP_Flag {
924 USER_APP_LOCK_UI_LAYOUT = (1 << 0),
925 } eUserpref_APP_Flag;
928 * UserDef.autokey_mode */
929 typedef enum eAutokey_Mode {
930 /* AUTOKEY_ON is a bitflag */
933 /* AUTOKEY_ON + 2**n... (i.e. AUTOKEY_MODE_NORMAL = AUTOKEY_ON + 2) to preserve setting, even when autokey turned off */
934 AUTOKEY_MODE_NORMAL = 3,
935 AUTOKEY_MODE_EDITKEYS = 5
938 /* Zoom to frame mode.
939 * UserDef.view_frame_type */
940 typedef enum eZoomFrame_Mode {
941 ZOOM_FRAME_MODE_KEEP_RANGE = 0,
942 ZOOM_FRAME_MODE_SECONDS = 1,
943 ZOOM_FRAME_MODE_KEYFRAMES = 2
947 * U.autokey_flag (not strictly used when autokeying only - is also used when keyframing these days)
948 * note: AUTOKEY_FLAG_* is used with a macro, search for lines like IS_AUTOKEY_FLAG(INSERTAVAIL)
950 typedef enum eAutokey_Flag {
951 AUTOKEY_FLAG_INSERTAVAIL = (1 << 0),
952 AUTOKEY_FLAG_INSERTNEEDED = (1 << 1),
953 AUTOKEY_FLAG_AUTOMATKEY = (1 << 2),
954 AUTOKEY_FLAG_XYZ2RGB = (1 << 3),
956 /* toolsettings->autokey_flag */
957 AUTOKEY_FLAG_ONLYKEYINGSET = (1 << 6),
958 AUTOKEY_FLAG_NOWARNING = (1 << 7),
959 AUTOKEY_FLAG_CYCLEAWARE = (1 << 8),
960 ANIMRECORD_FLAG_WITHNLA = (1 << 10),
963 /* UserDef.transopts */
964 typedef enum eUserpref_Translation_Flags {
965 USER_TR_TOOLTIPS = (1 << 0),
966 USER_TR_IFACE = (1 << 1),
967 USER_TR_DEPRECATED_2 = (1 << 2), /* cleared */
968 USER_TR_DEPRECATED_3 = (1 << 3), /* cleared */
969 USER_TR_DEPRECATED_4 = (1 << 4), /* cleared */
970 USER_DOTRANSLATE = (1 << 5),
971 USER_TR_DEPRECATED_6 = (1 << 6), /* cleared */
972 USER_TR_DEPRECATED_7 = (1 << 7), /* cleared */
973 USER_TR_NEWDATANAME = (1 << 8),
974 } eUserpref_Translation_Flags;
976 /* UserDef.dupflag */
977 typedef enum eDupli_ID_Flags {
978 USER_DUP_MESH = (1 << 0),
979 USER_DUP_CURVE = (1 << 1),
980 USER_DUP_SURF = (1 << 2),
981 USER_DUP_FONT = (1 << 3),
982 USER_DUP_MBALL = (1 << 4),
983 USER_DUP_LAMP = (1 << 5),
984 USER_DUP_IPO = (1 << 6),
985 USER_DUP_MAT = (1 << 7),
986 USER_DUP_TEX = (1 << 8),
987 USER_DUP_ARM = (1 << 9),
988 USER_DUP_ACT = (1 << 10),
989 USER_DUP_PSYS = (1 << 11)
992 /* selection method for opengl gpu_select_method */
993 typedef enum eOpenGL_SelectOptions {
994 USER_SELECT_AUTO = 0,
995 USER_SELECT_USE_OCCLUSION_QUERY = 1,
996 USER_SELECT_USE_SELECT_RENDERMODE = 2
997 } eOpenGL_SelectOptions;
999 /* max anti alias draw method UserDef.gpu_viewport_antialias */
1000 typedef enum eOpenGL_AntiAliasMethod {
1004 } eOpenGL_AntiAliasMethod;
1006 /* text draw options
1007 * UserDef.text_render */
1008 typedef enum eText_Draw_Options {
1009 USER_TEXT_DISABLE_AA = (1 << 0),
1011 USER_TEXT_HINTING_NONE = (1 << 1),
1012 USER_TEXT_HINTING_SLIGHT = (1 << 2),
1013 USER_TEXT_HINTING_FULL = (1 << 3),
1014 } eText_Draw_Options;
1016 /* tw_flag (transform widget) */
1018 /* Grease Pencil Settings.
1019 * UserDef.gp_settings */
1020 typedef enum eGP_UserdefSettings {
1021 GP_PAINT_DOSMOOTH = (1 << 0),
1022 GP_PAINT_DOSIMPLIFY = (1 << 1),
1023 } eGP_UserdefSettings;
1026 USER_GIZMO_DRAW = (1 << 0),
1029 /* Color Picker Types.
1030 * UserDef.color_picker_type */
1031 typedef enum eColorPicker_Types {
1032 USER_CP_CIRCLE_HSV = 0,
1033 USER_CP_SQUARE_SV = 1,
1034 USER_CP_SQUARE_HS = 2,
1035 USER_CP_SQUARE_HV = 3,
1036 USER_CP_CIRCLE_HSL = 4,
1037 } eColorPicker_Types;
1039 /* timecode display styles
1040 * UserDef.timecode_style */
1041 typedef enum eTimecodeStyles {
1042 /* as little info as is necessary to show relevant info
1043 * with '+' to denote the frames
1044 * i.e. HH:MM:SS+FF, MM:SS+FF, SS+FF, or MM:SS
1046 USER_TIMECODE_MINIMAL = 0,
1048 /* reduced SMPTE - (HH:)MM:SS:FF */
1049 USER_TIMECODE_SMPTE_MSF = 1,
1051 /* full SMPTE - HH:MM:SS:FF */
1052 USER_TIMECODE_SMPTE_FULL = 2,
1054 /* milliseconds for sub-frames - HH:MM:SS.sss */
1055 USER_TIMECODE_MILLISECONDS = 3,
1058 USER_TIMECODE_SECONDS_ONLY = 4,
1060 /* Private (not exposed as generic choices) options. */
1061 /* milliseconds for sub-frames , SubRip format- HH:MM:SS,sss */
1062 USER_TIMECODE_SUBRIP = 100,
1065 /* theme drawtypes */
1066 /* XXX: These are probably only for the old UI engine? */
1067 typedef enum eTheme_DrawTypes {
1075 /* UserDef.ndof_flag (3D mouse options) */
1076 typedef enum eNdof_Flag {
1077 NDOF_SHOW_GUIDE = (1 << 0),
1078 NDOF_FLY_HELICOPTER = (1 << 1),
1079 NDOF_LOCK_HORIZON = (1 << 2),
1081 /* the following might not need to be saved between sessions,
1082 * but they do need to live somewhere accessible... */
1083 NDOF_SHOULD_PAN = (1 << 3),
1084 NDOF_SHOULD_ZOOM = (1 << 4),
1085 NDOF_SHOULD_ROTATE = (1 << 5),
1087 /* orbit navigation modes */
1089 /* exposed as Orbit|Explore in the UI */
1090 NDOF_MODE_ORBIT = (1 << 6),
1092 /* actually... users probably don't care about what the mode
1093 * is called, just that it feels right */
1094 /* zoom is up/down if this flag is set (otherwise forward/backward) */
1095 NDOF_PAN_YZ_SWAP_AXIS = (1 << 7),
1096 NDOF_ZOOM_INVERT = (1 << 8),
1097 NDOF_ROTX_INVERT_AXIS = (1 << 9),
1098 NDOF_ROTY_INVERT_AXIS = (1 << 10),
1099 NDOF_ROTZ_INVERT_AXIS = (1 << 11),
1100 NDOF_PANX_INVERT_AXIS = (1 << 12),
1101 NDOF_PANY_INVERT_AXIS = (1 << 13),
1102 NDOF_PANZ_INVERT_AXIS = (1 << 14),
1103 NDOF_TURNTABLE = (1 << 15),
1106 #define NDOF_PIXELS_PER_SECOND 600.0f
1108 /* UserDef.ogl_multisamples and gpencil_multisamples */
1109 typedef enum eMultiSample_Type {
1110 USER_MULTISAMPLE_NONE = 0,
1111 USER_MULTISAMPLE_2 = 2,
1112 USER_MULTISAMPLE_4 = 4,
1113 USER_MULTISAMPLE_8 = 8,
1114 USER_MULTISAMPLE_16 = 16,
1115 } eMultiSample_Type;
1117 /* UserDef.image_draw_method */
1118 typedef enum eImageDrawMethod {
1119 /* IMAGE_DRAW_METHOD_AUTO = 0, */ /* Currently unused */
1120 IMAGE_DRAW_METHOD_GLSL = 1,
1121 IMAGE_DRAW_METHOD_2DTEXTURE = 2,
1122 IMAGE_DRAW_METHOD_DRAWPIXELS = 3,
1125 /* UserDef.virtual_pixel */
1126 typedef enum eUserpref_VirtualPixel {
1127 VIRTUAL_PIXEL_NATIVE = 0,
1128 VIRTUAL_PIXEL_DOUBLE = 1,
1129 } eUserpref_VirtualPixel;
1131 typedef enum eOpensubdiv_Computee_Type {
1132 USER_OPENSUBDIV_COMPUTE_NONE = 0,
1133 USER_OPENSUBDIV_COMPUTE_CPU = 1,
1134 USER_OPENSUBDIV_COMPUTE_OPENMP = 2,
1135 USER_OPENSUBDIV_COMPUTE_OPENCL = 3,
1136 USER_OPENSUBDIV_COMPUTE_CUDA = 4,
1137 USER_OPENSUBDIV_COMPUTE_GLSL_TRANSFORM_FEEDBACK = 5,
1138 USER_OPENSUBDIV_COMPUTE_GLSL_COMPUTE = 6,
1139 } eOpensubdiv_Computee_Type;