10#define DNA_DEPRECATED_ALLOW
57# define N_(msgid) msgid
61#define U BLI_STATIC_ASSERT(false, "Global 'U' not allowed, only use arguments passed in!")
66#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_FILE_ATLEAST(userdef, ver, subver)
67#define FROM_DEFAULT_V4_UCHAR(member) copy_v4_v4_uchar(btheme->member, U_theme_default.member)
214#undef FROM_DEFAULT_V4_UCHAR
216#undef USER_VERSION_ATLEAST
220#define USER_LMOUSESELECT (1 << 14)
226 ACTIONMOUSE = 0x0005,
227 SELECTMOUSE = 0x0006,
228 EVT_TWEAK_A = 0x5005,
229 EVT_TWEAK_S = 0x5006,
271 EVT_TWEAK_L = 0x5002,
272 EVT_TWEAK_M = 0x5003,
273 EVT_TWEAK_R = 0x5004,
303#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_FILE_ATLEAST(userdef, ver, subver)
365 userdef->
flag &= ~USER_TWOBUTTONMOUSE;
418 if (
STREQ(km->idname,
"Armature_Sketch")) {
419 STRNCPY(km->idname,
"Armature Sketch");
421 else if (
STREQ(km->idname,
"View3D")) {
422 STRNCPY(km->idname,
"3D View");
424 else if (
STREQ(km->idname,
"View3D Generic")) {
425 STRNCPY(km->idname,
"3D View Generic");
427 else if (
STREQ(km->idname,
"EditMesh")) {
430 else if (
STREQ(km->idname,
"UVEdit")) {
431 STRNCPY(km->idname,
"UV Editor");
433 else if (
STREQ(km->idname,
"Animation_Channels")) {
434 STRNCPY(km->idname,
"Animation Channels");
436 else if (
STREQ(km->idname,
"GraphEdit Keys")) {
437 STRNCPY(km->idname,
"Graph Editor");
439 else if (
STREQ(km->idname,
"GraphEdit Generic")) {
440 STRNCPY(km->idname,
"Graph Editor Generic");
442 else if (
STREQ(km->idname,
"Action_Keys")) {
443 STRNCPY(km->idname,
"Dopesheet");
445 else if (
STREQ(km->idname,
"NLA Data")) {
446 STRNCPY(km->idname,
"NLA Editor");
448 else if (
STREQ(km->idname,
"Node Generic")) {
449 STRNCPY(km->idname,
"Node Editor");
451 else if (
STREQ(km->idname,
"Logic Generic")) {
452 STRNCPY(km->idname,
"Logic Editor");
454 else if (
STREQ(km->idname,
"File")) {
455 STRNCPY(km->idname,
"File Browser");
457 else if (
STREQ(km->idname,
"FileMain")) {
458 STRNCPY(km->idname,
"File Browser Main");
460 else if (
STREQ(km->idname,
"FileButtons")) {
461 STRNCPY(km->idname,
"File Browser Buttons");
463 else if (
STREQ(km->idname,
"Buttons Generic")) {
464 STRNCPY(km->idname,
"Property Editor");
471 userdef->
flag &= ~USER_TWOBUTTONMOUSE;
482 userdef->
keying_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
568 userdef->gpu_viewport_quality = 0.6f;
591 if (kmdi->remove_item) {
594 if (kmdi->add_item) {
618 userdef->
flag &= ~USER_LMOUSESELECT;
687 const float GPU_VIEWPORT_QUALITY_FXAA = 0.10f;
688 const float GPU_VIEWPORT_QUALITY_TAA8 = 0.25f;
689 const float GPU_VIEWPORT_QUALITY_TAA16 = 0.6f;
690 const float GPU_VIEWPORT_QUALITY_TAA32 = 0.8f;
692 if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_FXAA) {
695 else if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_TAA8) {
698 else if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_TAA16) {
701 else if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_TAA32) {
750 params.check_diff_item_add =
true;
778 userdef->
transopts &= ~USER_DOTRANSLATE_DEPRECATED;
796 userdef->
uiflag &= ~USER_UIFLAG_UNUSED_3;
807 const char *replace_table[][2] = {
808 {
"blender",
"Blender"},
809 {
"blender_27x",
"Blender_27x"},
810 {
"industry_compatible",
"Industry_Compatible"},
812 const int replace_table_len =
ARRAY_SIZE(replace_table);
818 kpt->idname,
sizeof(kpt->idname), replace_table, replace_table_len);
839 userdef->
flag &= ~USER_FLAG_UNUSED_5;
856 if (
STREQ(asset_library->name,
"Default")) {
865 const int default_title_points = 11;
866 style->paneltitle.points = default_title_points;
867 style->grouplabel.points = default_title_points;
878 params.check_diff_item_add =
true;
913 if (userdef->pythondir_legacy[0]) {
915 MEM_callocN(
sizeof(*script_dir),
"Versioning user script path"));
949 userdef->
uiflag &= ~(1 << 23);
962 style->paneltitle.character_weight = 400;
963 style->grouplabel.character_weight = 400;
964 style->widget.character_weight = 400;
983 if (
STREQ(km->idname,
"NLA Channels")) {
984 STRNCPY(km->idname,
"NLA Tracks");
1018 const char *addon_modules[] = {
1021 "io_import_images_as_planes",
1025 for (
int i = 0; i <
ARRAY_SIZE(addon_modules); i++) {
1046 userdef,
"VIEW3D_AST_brush_sculpt",
"Brushes/Mesh Sculpt/Cloth");
1048 userdef,
"VIEW3D_AST_brush_sculpt",
"Brushes/Mesh Sculpt/General");
1050 userdef,
"VIEW3D_AST_brush_sculpt",
"Brushes/Mesh Sculpt/Paint");
1055 style->tooltip.points = 11.0f;
1056 style->tooltip.character_weight = 400;
1057 style->tooltip.shadow = 0;
1058 style->tooltip.shady = -1;
1059 style->tooltip.shadowalpha = 0.5f;
1060 style->tooltip.shadowcolor = 0.0f;
1068 userdef->
uiflag &= ~USER_FILTER_BRUSHES_BY_TOOL;
1071 userdef,
"VIEW3D_AST_brush_gpencil_paint",
"Brushes/Grease Pencil Draw/Draw");
1073 userdef,
"VIEW3D_AST_brush_gpencil_paint",
"Brushes/Grease Pencil Draw/Erase");
1075 userdef,
"VIEW3D_AST_brush_gpencil_paint",
"Brushes/Grease Pencil Draw/Utilities");
1078 userdef,
"VIEW3D_AST_brush_gpencil_sculpt",
"Brushes/Grease Pencil Sculpt/Contrast");
1080 userdef,
"VIEW3D_AST_brush_gpencil_sculpt",
"Brushes/Grease Pencil Sculpt/Transform");
1082 userdef,
"VIEW3D_AST_brush_gpencil_sculpt",
"Brushes/Grease Pencil Sculpt/Utilities");
1095#undef USER_VERSION_ATLEAST
1108#ifdef WITH_EXPERIMENTAL_FEATURES
1117#undef USER_LMOUSESELECT
struct bAddon * BKE_addon_ensure(struct ListBase *addon_list, const char *module)
bool BKE_addon_remove_safe(struct ListBase *addon_list, const char *module)
bool BKE_blender_version_is_alpha(void)
void BKE_colorband_init(ColorBand *coba, bool rangetype)
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BKE_keyconfig_pref_filter_items(struct UserDef *userdef, const struct wmKeyConfigFilterItemParams *params, bool(*filter_fn)(struct wmKeyMapItem *kmi, void *user_data), void *user_data)
void BKE_keyconfig_pref_set_select_mouse(struct UserDef *userdef, int value, bool override)
void BKE_preferences_asset_library_default_add(struct UserDef *userdef) ATTR_NONNULL()
void BKE_preferences_extension_repo_remove(UserDef *userdef, bUserExtensionRepo *repo)
bUserExtensionRepo * BKE_preferences_extension_repo_add_default_user(UserDef *userdef)
#define BKE_PREFS_ASSET_LIBRARY_DEFAULT_NAME
void BKE_preferences_asset_library_name_set(struct UserDef *userdef, struct bUserAssetLibrary *library, const char *name) ATTR_NONNULL()
bUserExtensionRepo * BKE_preferences_extension_repo_add_default_system(UserDef *userdef)
bUserExtensionRepo * BKE_preferences_extension_repo_add_default_remote(UserDef *userdef)
bool BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled(UserDef *userdef, const char *shelf_idname, const char *catalog_path)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
#define STRNCPY(dst, src)
#define STRNCPY_UTF8(dst, src)
void BLI_uniquename(const struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
bool BLI_string_replace_table_exact(char *string, size_t string_len, const char *replace_table[][2], int replace_table_len)
#define ARRAY_SET_ITEMS(...)
#define MEMSET_STRUCT_AFTER(struct_var, value, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
external readfile function prototypes.
const bTheme U_theme_default
@ FCURVE_SMOOTH_CONT_ACCEL
@ ASSET_IMPORT_APPEND_REUSE
@ ASSET_LIBRARY_RELATIVE_PATH
@ SCE_DISPLAY_AA_SAMPLES_32
@ SCE_DISPLAY_AA_SAMPLES_8
@ SCE_DISPLAY_AA_SAMPLES_16
@ AUTOKEY_FLAG_INSERTNEEDED
@ MANUALKEY_FLAG_INSERTNEEDED
@ USER_DOTRANSLATE_DEPRECATED
@ USER_LOCK_CURSOR_ADJUST
@ USER_REGISTER_ALL_USERS
@ USER_SHOW_GIZMO_NAVIGATE
@ USER_NO_MULTITOUCH_GESTURES
@ USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE
@ USER_SEQ_PROXY_SETUP_AUTOMATIC
@ USER_FLAG_NUMINPUT_ADVANCED
@ STATUSBAR_SHOW_EXTENSIONS_UPDATES
@ USER_ANIM_HIGH_QUALITY_DRAWING
@ USER_ANIM_SHOW_CHANNEL_GROUP_COLORS
@ USER_RENDER_DISPLAY_WINDOW
@ USER_ANIM_KEY_CHANNEL_SCALE
@ USER_ANIM_KEY_CHANNEL_ROTATION
@ USER_ANIM_KEY_CHANNEL_LOCATION
@ USER_ANIM_KEY_CHANNEL_CUSTOM_PROPERTIES
@ USER_TEXT_RENDER_SUBPIXELAA
@ USER_SEQ_ED_CONNECT_STRIPS_BY_DEFAULT
@ USER_SEQ_ED_SIMPLE_TWEAKING
@ USER_TEMP_SPACE_DISPLAY_WINDOW
Read Guarded memory(de)allocation.
void *(* MEM_callocN)(size_t len, const char *str)
unsigned char grid_levels
struct WalkNavigation walk_navigation
float pressure_threshold_max
short key_insert_channels
ListBase script_directories
short playback_fps_samples
float view_rotate_sensitivity_trackball
short pie_animation_timeout
float ndof_orbit_sensitivity
float view_rotate_sensitivity_turntable
UserDef_FileSpaceData file_space_data
UserDef_Experimental experimental
uint8_t network_connection_limit
struct ListBase user_keymaps
char drag_threshold_mouse
float gpencil_new_layer_col[4]
short lookdev_sphere_size
char gizmo_size_navigate_v3d
short sequencer_proxy_setup
struct ListBase user_keyconfig_prefs
char drag_threshold_tablet
struct ListBase extension_repos
struct SolidLight light_param[4]
char filebrowser_display_type
int sequencer_editor_flag
float collection_instance_empty_size
struct ListBase asset_libraries
struct ColorBand coba_weight
static bool keymap_item_update_tweak_event(wmKeyMapItem *kmi, void *)
static void do_version_select_mouse(const UserDef *userdef, wmKeyMapItem *kmi)
static bool keymap_item_has_invalid_wm_context_data_path(wmKeyMapItem *kmi, void *)
void BLO_sanitize_experimental_features_userpref_blend(UserDef *userdef)
#define USER_VERSION_ATLEAST(ver, subver)
#define FROM_DEFAULT_V4_UCHAR(member)
#define USER_LMOUSESELECT
void blo_do_versions_userdef(UserDef *userdef)
static void do_versions_theme(const UserDef *userdef, bTheme *btheme)