Files
test2/release/datafiles/userdef/userdef_default.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

252 lines
7.8 KiB
C
Raw Normal View History

/* SPDX-FileCopyrightText: 2019-2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/* Preferences Data File 'U_default'. */
/* For constants. */
#include "BLI_math_base.h"
2020-05-07 16:06:37 +02:00
#include "DNA_anim_types.h"
#include "DNA_curve_types.h"
UI: Remember File Browser Display Options in Preferences This makes it so that some display related properties of the file browser state are remembered in the Preferences. Otherwise, users often end up doing the same set up work over and over again, so this is a nice way to save users some work. It's typical for other file browsers to remember their state too, so another benefit is having a more conventional behavior, meeting user expectations better. Some points: * We currently store: Window size, display type, thumbnail size, enabled details-columns, sort options, "Show Hidden" option. More can be added easily. * No changes are stored to the Preferences if "Auto-save Preferences" is disabled. This is how Quick Favorites behave too and it's a reasonable way to make this behavior optional. * The Preferences are only saved to permanent memory upon closing Blender, following existing convention of Preferences and Quick Favorites. * If settings weren't actually changed, Preference saving is skipped. * Only temporary file browsers save their state (invoked through actions like open or save), not regular file browser editors. These are usually used for different purposes and workflows. * Removes "Show Thumbnails" Preferences option. It would need some special handling, possibly introducing bugs. For users, this simplifies behavior and should make things more predictable. Left in DNA data in case we decide to bring it back. Reviewers: brecht, #user_interface, billreynish, campbellbarton Reviewed By: #user_interface, William Reynish, Campbell Barton, Brecht van Lommel (quick first pass review in person) Maniphest Tasks: T69460 Differential Revision: https://developer.blender.org/D5893
2019-09-30 18:54:11 +02:00
#include "DNA_space_types.h"
2020-05-07 16:06:37 +02:00
#include "DNA_userdef_types.h"
#include "BLI_math_rotation.h"
#include "BKE_blender_version.h"
#include "GPU_platform_backend_enum.h"
#include "BLO_userdef_default.h" /* own include */
const UserDef U_default = {
.versionfile = BLENDER_FILE_VERSION,
.subversionfile = BLENDER_FILE_SUBVERSION,
.flag = (USER_AUTOSAVE | USER_TOOLTIPS | USER_RELPATHS | USER_RELEASECONFIRM |
USER_SCRIPT_AUTOEXEC_DISABLE | USER_NONEGFRAMES),
.dupflag = USER_DUP_MESH | USER_DUP_CURVE | USER_DUP_SURF | USER_DUP_LATTICE | USER_DUP_FONT |
USER_DUP_MBALL | USER_DUP_LAMP | USER_DUP_ARM | USER_DUP_CAMERA | USER_DUP_SPEAKER |
USER_DUP_ACT | USER_DUP_LIGHTPROBE | USER_DUP_GPENCIL | USER_DUP_CURVES |
USER_DUP_POINTCLOUD,
.pref_flag = USER_PREF_FLAG_SAVE,
.savetime = 2,
.tempdir = "",
/* Overwritten by #BKE_appdir_font_folder_default(..)
* unless the system font's cannot be found. */
.fontdir = "//",
.renderdir = "//",
.render_cachedir = "",
.textudir = "//",
.script_directories = {NULL, NULL},
.sounddir = "//",
.i18ndir = "",
.image_editor = "",
.text_editor = "",
.text_editor_args = "",
.anim_player = "",
.anim_player_preset = 0,
.v2d_min_gridsize = 45,
.timecode_style = USER_TIMECODE_MINIMAL,
.versions = 1,
.dbl_click_time = 350,
.mini_axis_type = USER_MINI_AXIS_TYPE_GIZMO,
.uiflag = (USER_FILTERFILEEXTS | USER_DRAWVIEWINFO | USER_PLAINMENUS |
USER_LOCK_CURSOR_ADJUST | USER_DEPTH_CURSOR | USER_AUTOPERSP |
USER_NODE_AUTO_OFFSET | USER_GLOBALUNDO | USER_HIDE_DOT | USER_SHOW_GIZMO_NAVIGATE |
USER_SHOW_VIEWPORTNAME | USER_SHOW_FPS | USER_CONTINUOUS_MOUSE | USER_SAVE_PROMPT),
.uiflag2 = USER_REGION_OVERLAP,
OpenSubDiv: add support for an OpenGL evaluator This evaluator is used in order to evaluate subdivision at render time, allowing for faster renders of meshes with a subdivision surface modifier placed at the last position in the modifier list. When evaluating the subsurf modifier, we detect whether we can delegate evaluation to the draw code. If so, the subdivision is first evaluated on the GPU using our own custom evaluator (only the coarse data needs to be initially sent to the GPU), then, buffers for the final `MeshBufferCache` are filled on the GPU using a set of compute shaders. However, some buffers are still filled on the CPU side, if doing so on the GPU is impractical (e.g. the line adjacency buffer used for x-ray, whose logic is hardly GPU compatible). This is done at the mesh buffer extraction level so that the result can be readily used in the various OpenGL engines, without having to write custom geometry or tesselation shaders. We use our own subdivision evaluation shaders, instead of OpenSubDiv's vanilla one, in order to control the data layout, and interpolation. For example, we store vertex colors as compressed 16-bit integers, while OpenSubDiv's default evaluator only work for float types. In order to still access the modified geometry on the CPU side, for use in modifiers or transform operators, a dedicated wrapper type is added `MESH_WRAPPER_TYPE_SUBD`. Subdivision will be lazily evaluated via `BKE_object_get_evaluated_mesh` which will create such a wrapper if possible. If the final subdivision surface is not needed on the CPU side, `BKE_object_get_evaluated_mesh_no_subsurf` should be used. Enabling or disabling GPU subdivision can be done through the user preferences (under Viewport -> Subdivision). See patch description for benchmarks. Reviewed By: campbellbarton, jbakker, fclem, brecht, #eevee_viewport Differential Revision: https://developer.blender.org/D12406
2021-12-27 16:34:47 +01:00
.gpu_flag = USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE | USER_GPU_FLAG_SUBDIVISION_EVALUATION,
.app_flag = 0,
/** Default language of English (1), not Automatic (0). */
.language = 1,
.viewzoom = USER_ZOOM_DOLLY,
.mixbufsize = 2048,
.audiodevice = 0,
.audiorate = 48000,
.audioformat = 0x24,
.audiochannels = 2,
.ui_scale = 1.0,
.ui_line_width = 0,
/** Default so DPI is detected automatically. */
.dpi = 0,
.scale_factor = 0.0,
.inv_scale_factor = 0.0, /* run-time. */
.pixelsize = 1,
.virtual_pixel = 0,
.scrollback = 256,
.node_margin = 40,
Nodes: experimental node previews in the shader editor First implementation of node previews in the shader node editor. Using the same user interface as compositor node previews, most shader nodes can now be previewed (except group in/output and material output). This is currently still an experimental feature, as polishing of the user experience and performance improvements are planned. These will be easier to do as incremental changes on this implementation. See #110353 for details on the work that remains to be done and known limitations. Implementation notes: We take advantage of the `RenderResult` available as `ImBuf` images to store a `Render` for every viewed nested node tree present in a `SpaceNode`. The computation is initiated at the moment of drawing nodes overlays. One render is started for the current nodetree, having a `ViewLayer` associated with each previewed node. We separate the previewed nodes in two categories: the shader ones and the non-shader ones. - For non-shader nodes, we use AOVs which highly speed up the rendering process by rendering every non-shader nodes at the same time. They are rendered in the first `ViewLayer`. - For shader nodes, we render them each in a different `ViewLayer`, by rerouting the node to the output of the material in the preview scene. The preview scene takes the same aspect as the Material preview scene, and the same preview object is used. At the moment of drawing the node overlay, we take the `Render` of the viewed node tree and extract the `ImBuf` of the wanted viewlayer/pass for each previewed node. Pull Request: https://projects.blender.org/blender/blender/pulls/110065
2023-08-08 17:36:06 +02:00
.node_preview_res = 120,
.transopts = USER_TR_TOOLTIPS,
.menuthreshold1 = 5,
.menuthreshold2 = 2,
.app_template = "",
/** Initialized by #UI_theme_init_default. */
.themes = {NULL},
/** Initialized by #uiStyleInit. */
.uifonts = {NULL},
.uistyles = {NULL},
.user_keymaps = {NULL},
.user_keyconfig_prefs = {NULL},
/** Initialized by #BKE_blendfile_userdef_from_defaults. */
.addons = {NULL},
.autoexec_paths = {NULL},
.user_menus = {NULL},
.keyconfigstr = "Blender",
.network_timeout = 10,
.network_connection_limit = 5,
.undosteps = 32,
.undomemory = 0,
.gp_manhattandist = 1,
.gp_euclideandist = 2,
.gp_eraser = 25,
.gp_settings = 0,
.playback_fps_samples = 8,
#ifdef __APPLE__
.gpu_backend = GPU_BACKEND_METAL,
#else
.gpu_backend = GPU_BACKEND_OPENGL,
#endif
GPU: Add GPU_shader_batch_create_from_infos This is the first commit of the several required to support subprocess-based parallel compilation on OpenGL. This provides the base API and implementation, and exposes the max subprocesses setting on the UI, but it's not used by any code yet. More information and the rest of the code can be found in #121925. This one includes: - A new `GPU_shader_batch` API that allows requesting the compilation of multiple shaders at once, allowing GPU backed to compile them in parallel and asynchronously without blocking the Blender UI. - A virtual `ShaderCompiler` class that backends can use to add their own implementation. - A `ShaderCompilerGeneric` class that implements synchronous/blocking compilation of batches for backends that don't have their own implementation yet. - A `GLShaderCompiler` that supports parallel compilation using subprocesses. - A new `BLI_subprocess` API, including IPC (required for the `GLShaderCompiler` implementation). - The implementation of the subprocess program in `GPU_compilation_subprocess`. - A new `Max Shader Compilation Subprocesses` option in `Preferences > System > Memory & Limits` to enable parallel shader compilation and the max number of subprocesses to allocate (each subprocess has a relatively high memory footprint). Implementation Overview: There's a single `GLShaderCompiler` shared by all OpenGL contexts. This class stores a pool of up to `GCaps.max_parallel_compilations` subprocesses that can be used for compilation. Each subprocess has a shared memory pool used for sending the shader source code from the main Blender process and for receiving the already compiled shader binary from the subprocess. This is synchronized using a series of shared semaphores. The subprocesses maintain a shader cache on disk inside a `BLENDER_SHADER_CACHE` folder at the OS temporary folder. Shaders that fail to compile are tried to be compiled again locally for proper error reports. Hanged subprocesses are currently detected using a timeout of 30s. Pull Request: https://projects.blender.org/blender/blender/pulls/122232
2024-06-05 18:45:57 +02:00
.max_shader_compilation_subprocesses = 0,
/** Initialized by: #BKE_studiolight_default. */
.light_param = {{0}},
.light_ambient = {0, 0, 0},
.gizmo_flag = USER_GIZMO_DRAW,
.gizmo_size = 75,
.gizmo_size_navigate_v3d = 80,
.edit_studio_light = 0,
.lookdev_sphere_size = 150,
.vbotimeout = 120,
.vbocollectrate = 60,
.textimeout = 120,
.texcollectrate = 60,
/** Clamped by half the systems memory. */
.memcachelimit = 4096,
.prefetchframes = 0,
.pad_rot_angle = 15,
.rvisize = 25,
.rvibright = 8,
.recent_files = 20,
.smooth_viewtx = 200,
.glreslimit = 0,
.color_picker_type = USER_CP_CIRCLE_HSV,
.auto_smoothing_new = FCURVE_SMOOTH_CONT_ACCEL,
.ipo_new = BEZT_IPO_BEZ,
.keyhandles_new = HD_AUTO_ANIM,
.view_frame_type = ZOOM_FRAME_MODE_KEEP_RANGE,
.view_frame_keyframes = 0,
.view_frame_seconds = 0.0,
.widget_unit = 0, /* run-time initialized. */
.anisotropic_filter = 2,
.tablet_api = USER_TABLET_AUTOMATIC,
.pressure_threshold_max = 1.0,
.pressure_softness = 0.0,
.ndof_sensitivity = 4.0,
.ndof_orbit_sensitivity = 4.0,
.ndof_deadzone = 0.0,
.ndof_flag = (NDOF_MODE_ORBIT | NDOF_LOCK_HORIZON | NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM |
NDOF_SHOULD_ROTATE |
/* Software from the driver authors follows this convention
* so invert this by default, see: #67579. */
NDOF_ROTX_INVERT_AXIS | NDOF_ROTY_INVERT_AXIS | NDOF_ROTZ_INVERT_AXIS |
NDOF_PANX_INVERT_AXIS | NDOF_PANY_INVERT_AXIS | NDOF_PANZ_INVERT_AXIS |
NDOF_ZOOM_INVERT | NDOF_CAMERA_PAN_ZOOM),
.image_draw_method = IMAGE_DRAW_METHOD_AUTO,
.glalphaclip = 0.004,
.autokey_mode = (AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON),
.keying_flag = KEYING_FLAG_XYZ2RGB | AUTOKEY_FLAG_INSERTNEEDED,
.key_insert_channels = (USER_ANIM_KEY_CHANNEL_LOCATION | USER_ANIM_KEY_CHANNEL_ROTATION |
USER_ANIM_KEY_CHANNEL_SCALE | USER_ANIM_KEY_CHANNEL_CUSTOM_PROPERTIES),
.animation_flag = USER_ANIM_HIGH_QUALITY_DRAWING,
.text_render = 0,
.navigation_mode = VIEW_NAVIGATION_WALK,
.view_rotate_sensitivity_turntable = DEG2RAD(0.4),
.view_rotate_sensitivity_trackball = 1.0f,
/** Initialized by #BKE_colorband_init. */
.coba_weight = {0},
.sculpt_paint_overlay_col = {0, 0, 0},
.gpencil_new_layer_col = {0.38, 0.61, 0.78, 0.9},
.drag_threshold_mouse = 3,
.drag_threshold_tablet = 10,
.drag_threshold = 30,
.move_threshold = 2,
.font_path_ui = "",
.font_path_ui_mono = "",
.compute_device_type = 0,
.fcu_inactive_alpha = 0.25,
.pie_tap_timeout = 20,
.pie_initial_timeout = 0,
.pie_animation_timeout = 6,
.pie_menu_confirm = 0,
.pie_menu_radius = 100,
.pie_menu_threshold = 12,
.factor_display_type = USER_FACTOR_AS_FACTOR,
.render_display_type = USER_RENDER_DISPLAY_WINDOW,
.filebrowser_display_type = USER_TEMP_SPACE_DISPLAY_WINDOW,
.viewport_aa = 8,
.walk_navigation =
{
.mouse_speed = 1,
.walk_speed = 2.5,
.walk_speed_factor = 5,
.view_height = 1.6,
.jump_height = 0.4,
.teleport_time = 0.2,
.flag = 0,
},
.space_data =
{
.section_active = USER_SECTION_INTERFACE,
},
UI: Remember File Browser Display Options in Preferences This makes it so that some display related properties of the file browser state are remembered in the Preferences. Otherwise, users often end up doing the same set up work over and over again, so this is a nice way to save users some work. It's typical for other file browsers to remember their state too, so another benefit is having a more conventional behavior, meeting user expectations better. Some points: * We currently store: Window size, display type, thumbnail size, enabled details-columns, sort options, "Show Hidden" option. More can be added easily. * No changes are stored to the Preferences if "Auto-save Preferences" is disabled. This is how Quick Favorites behave too and it's a reasonable way to make this behavior optional. * The Preferences are only saved to permanent memory upon closing Blender, following existing convention of Preferences and Quick Favorites. * If settings weren't actually changed, Preference saving is skipped. * Only temporary file browsers save their state (invoked through actions like open or save), not regular file browser editors. These are usually used for different purposes and workflows. * Removes "Show Thumbnails" Preferences option. It would need some special handling, possibly introducing bugs. For users, this simplifies behavior and should make things more predictable. Left in DNA data in case we decide to bring it back. Reviewers: brecht, #user_interface, billreynish, campbellbarton Reviewed By: #user_interface, William Reynish, Campbell Barton, Brecht van Lommel (quick first pass review in person) Maniphest Tasks: T69460 Differential Revision: https://developer.blender.org/D5893
2019-09-30 18:54:11 +02:00
.file_space_data =
{
.display_type = FILE_VERTICALDISPLAY,
.thumbnail_size = 96,
UI: Remember File Browser Display Options in Preferences This makes it so that some display related properties of the file browser state are remembered in the Preferences. Otherwise, users often end up doing the same set up work over and over again, so this is a nice way to save users some work. It's typical for other file browsers to remember their state too, so another benefit is having a more conventional behavior, meeting user expectations better. Some points: * We currently store: Window size, display type, thumbnail size, enabled details-columns, sort options, "Show Hidden" option. More can be added easily. * No changes are stored to the Preferences if "Auto-save Preferences" is disabled. This is how Quick Favorites behave too and it's a reasonable way to make this behavior optional. * The Preferences are only saved to permanent memory upon closing Blender, following existing convention of Preferences and Quick Favorites. * If settings weren't actually changed, Preference saving is skipped. * Only temporary file browsers save their state (invoked through actions like open or save), not regular file browser editors. These are usually used for different purposes and workflows. * Removes "Show Thumbnails" Preferences option. It would need some special handling, possibly introducing bugs. For users, this simplifies behavior and should make things more predictable. Left in DNA data in case we decide to bring it back. Reviewers: brecht, #user_interface, billreynish, campbellbarton Reviewed By: #user_interface, William Reynish, Campbell Barton, Brecht van Lommel (quick first pass review in person) Maniphest Tasks: T69460 Differential Revision: https://developer.blender.org/D5893
2019-09-30 18:54:11 +02:00
.sort_type = FILE_SORT_ALPHA,
.details_flags = FILE_DETAILS_SIZE | FILE_DETAILS_DATETIME,
.flag = FILE_HIDE_DOT,
.filter_id = FILTER_ID_ALL,
UI: Remember File Browser Display Options in Preferences This makes it so that some display related properties of the file browser state are remembered in the Preferences. Otherwise, users often end up doing the same set up work over and over again, so this is a nice way to save users some work. It's typical for other file browsers to remember their state too, so another benefit is having a more conventional behavior, meeting user expectations better. Some points: * We currently store: Window size, display type, thumbnail size, enabled details-columns, sort options, "Show Hidden" option. More can be added easily. * No changes are stored to the Preferences if "Auto-save Preferences" is disabled. This is how Quick Favorites behave too and it's a reasonable way to make this behavior optional. * The Preferences are only saved to permanent memory upon closing Blender, following existing convention of Preferences and Quick Favorites. * If settings weren't actually changed, Preference saving is skipped. * Only temporary file browsers save their state (invoked through actions like open or save), not regular file browser editors. These are usually used for different purposes and workflows. * Removes "Show Thumbnails" Preferences option. It would need some special handling, possibly introducing bugs. For users, this simplifies behavior and should make things more predictable. Left in DNA data in case we decide to bring it back. Reviewers: brecht, #user_interface, billreynish, campbellbarton Reviewed By: #user_interface, William Reynish, Campbell Barton, Brecht van Lommel (quick first pass review in person) Maniphest Tasks: T69460 Differential Revision: https://developer.blender.org/D5893
2019-09-30 18:54:11 +02:00
.temp_win_sizex = 1060,
UI: Remember File Browser Display Options in Preferences This makes it so that some display related properties of the file browser state are remembered in the Preferences. Otherwise, users often end up doing the same set up work over and over again, so this is a nice way to save users some work. It's typical for other file browsers to remember their state too, so another benefit is having a more conventional behavior, meeting user expectations better. Some points: * We currently store: Window size, display type, thumbnail size, enabled details-columns, sort options, "Show Hidden" option. More can be added easily. * No changes are stored to the Preferences if "Auto-save Preferences" is disabled. This is how Quick Favorites behave too and it's a reasonable way to make this behavior optional. * The Preferences are only saved to permanent memory upon closing Blender, following existing convention of Preferences and Quick Favorites. * If settings weren't actually changed, Preference saving is skipped. * Only temporary file browsers save their state (invoked through actions like open or save), not regular file browser editors. These are usually used for different purposes and workflows. * Removes "Show Thumbnails" Preferences option. It would need some special handling, possibly introducing bugs. For users, this simplifies behavior and should make things more predictable. Left in DNA data in case we decide to bring it back. Reviewers: brecht, #user_interface, billreynish, campbellbarton Reviewed By: #user_interface, William Reynish, Campbell Barton, Brecht van Lommel (quick first pass review in person) Maniphest Tasks: T69460 Differential Revision: https://developer.blender.org/D5893
2019-09-30 18:54:11 +02:00
.temp_win_sizey = 600,
},
.sequencer_disk_cache_dir = "",
.sequencer_disk_cache_compression = 0,
.sequencer_disk_cache_size_limit = 100,
.sequencer_disk_cache_flag = 0,
.sequencer_proxy_setup = USER_SEQ_PROXY_SETUP_AUTOMATIC,
.collection_instance_empty_size = 1.0f,
.statusbar_flag = STATUSBAR_SHOW_VERSION | STATUSBAR_SHOW_EXTENSIONS_UPDATES,
.file_preview_type = USER_FILE_PREVIEW_AUTO,
.sequencer_editor_flag = USER_SEQ_ED_SIMPLE_TWEAKING,
.runtime =
{
.is_dirty = 0,
},
};