Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeverin <eiseljulian@gmail.com>2019-01-04 23:40:16 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-01-05 00:18:23 +0300
commita77b63c56943ebd0046f738e6abbea4c85dc65b6 (patch)
tree173dddb28838298d2319f4f062586ba8985728c1 /source/blender/makesrna
parent4b486eaec9763108fd471b7705133c45116df966 (diff)
UI: Preferences Redesign Part 2
(Part 1 was 00963afc14978b) Does the following changes visible to users: * Use panels and sub-panels for more structured & logical grouping * Re-organized options more logically than before (see images in D4148) * Use flow layout (single column by default). * New layout uses horizontal margin if there's enough space. * Change size of Preferences window to suit new layout. * Move keymap related options from "Input" into own section. * Own, left-bottom aligned region for Save Preferences button. * Adjustments of names, tooltips & icons. * Move buttons from header into the main region (except editor switch). * Hide Preferences header when opened in temporary window. * Use full area width for header. * Don't use slider but regular number widget for UI scale. * Gray out animation player path option if player isn't "Custom" Internal changes: * Rearrange RNA properties to match changed UI structure. * Introduces new "EXECUTE" region type, see reasoning in D3982. * Changes to panel layout and AZone code for dynamic panel region. * Bumps subversion and does versioning for new regions. RNA changes are documented in the release notes: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Preferences_API Design & implementation mostly done by @billreynish and myself. I recommend checking out the screenshots posted by William: https://developer.blender.org/D4148#93787 Reviewed By: brecht Maniphest Tasks: T54115 Differential Revision: https://developer.blender.org/D4148
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/intern/rna_screen.c1
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c469
4 files changed, 262 insertions, 211 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 7ac03d5d3f8..5d473ed635d 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -712,6 +712,7 @@ extern StructRNA RNA_Preferences;
extern StructRNA RNA_PreferencesEdit;
extern StructRNA RNA_PreferencesFilePaths;
extern StructRNA RNA_PreferencesInput;
+extern StructRNA RNA_PreferencesKeymap;
extern StructRNA RNA_PreferencesSystem;
extern StructRNA RNA_PreferencesView;
extern StructRNA RNA_PreferencesWalkNavigation;
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index ab2a1b3dd82..709abdd1779 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -47,6 +47,7 @@ const EnumPropertyItem rna_enum_region_type_items[] = {
{RGN_TYPE_TOOL_PROPS, "TOOL_PROPS", 0, "Tool Properties", ""},
{RGN_TYPE_PREVIEW, "PREVIEW", 0, "Preview", ""},
{RGN_TYPE_NAV_BAR, "NAVIGATION_BAR", 0, "Navigation Bar", ""},
+ {RGN_TYPE_EXECUTE, "EXECUTE", 0, "Execute Buttons", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8bdf947449e..d18ffd422e0 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -4735,7 +4735,7 @@ static void rna_def_space_userpref(BlenderRNA *brna)
srna = RNA_def_struct(brna, "SpacePreferences", "Space");
RNA_def_struct_sdna(srna, "SpaceUserPref");
- RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data");
+ RNA_def_struct_ui_text(srna, "Space Preferences", "Blender preferences space data");
prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filter_type");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index f582c7ce399..7c7a484dd49 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -298,6 +298,11 @@ static PointerRNA rna_UserDef_input_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_PreferencesInput, ptr->data);
}
+static PointerRNA rna_UserDef_keymap_get(PointerRNA *ptr)
+{
+ return rna_pointer_inherit_refine(ptr, &RNA_PreferencesKeymap, ptr->data);
+}
+
static PointerRNA rna_UserDef_filepaths_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_PreferencesFilePaths, ptr->data);
@@ -1369,6 +1374,11 @@ static void rna_def_userdef_theme_space_common(StructRNA *srna)
RNA_def_property_ui_text(prop, "Navigation Bar Background", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+ prop = RNA_def_property(srna, "execution_buts", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Execution Region Background", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
/* tabs */
prop = RNA_def_property(srna, "tab_active", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -2084,7 +2094,7 @@ static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ThemePreferences", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
- RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences");
+ RNA_def_struct_ui_text(srna, "Theme Preferences", "Theme settings for the Blender Preferences");
rna_def_userdef_theme_spaces_main(srna);
}
@@ -3656,6 +3666,17 @@ static void rna_def_userdef_view(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static const EnumPropertyItem color_picker_types[] = {
+ {USER_CP_CIRCLE_HSV, "CIRCLE_HSV", 0, "Circle (HSV)", "A circular Hue/Saturation color wheel, with "
+ "Value slider"},
+ {USER_CP_CIRCLE_HSL, "CIRCLE_HSL", 0, "Circle (HSL)", "A circular Hue/Saturation color wheel, with "
+ "Lightness slider"},
+ {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square showing Saturation/Value, with Hue slider"},
+ {USER_CP_SQUARE_HS, "SQUARE_HS", 0, "Square (HS + V)", "A square showing Hue/Saturation, with Value slider"},
+ {USER_CP_SQUARE_HV, "SQUARE_HV", 0, "Square (HV + S)", "A square showing Hue/Value, with Saturation slider"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
static const EnumPropertyItem zoom_frame_modes[] = {
{ZOOM_FRAME_MODE_KEEP_RANGE, "KEEP_RANGE", 0, "Keep Range", ""},
{ZOOM_FRAME_MODE_SECONDS, "SECONDS", 0, "Seconds", ""},
@@ -3680,7 +3701,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data");
/* View */
- prop = RNA_def_property(srna, "ui_scale", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "ui_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "UI Scale", "Changes the size of the fonts and buttons in the interface");
RNA_def_property_range(prop, 0.25f, 4.0f);
RNA_def_property_ui_range(prop, 0.5f, 2.0f, 1, 2);
@@ -3734,6 +3755,23 @@ static void rna_def_userdef_view(BlenderRNA *brna)
"Show the frames per second screen refresh rate, while animation is played back");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+ /* Weight Paint */
+
+ prop = RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
+ RNA_def_property_ui_text(prop, "Use Weight Color Range",
+ "Enable color range used for weight visualization in weight painting mode");
+ RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
+
+ prop = RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
+ RNA_def_property_struct_type(prop, "ColorRamp");
+ RNA_def_property_ui_text(prop, "Weight Color Range",
+ "Color range used for weight visualization in weight painting mode");
+ RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
+
+
/* app flags (use for app-templates) */
prop = RNA_def_property(srna, "show_layout_ui", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "app_flag", USER_APP_LOCK_UI_LAYOUT);
@@ -3758,6 +3796,12 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay",
"Time delay in 1/10 seconds before automatically opening sub level menus");
+ prop = RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, color_picker_types);
+ RNA_def_property_enum_sdna(prop, NULL, "color_picker_type");
+ RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of displaying the color picker widget");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
/* pie menus */
prop = RNA_def_property(srna, "pie_initial_timeout", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
@@ -3822,44 +3866,13 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Header Position", "Default header position for new space-types");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_NAVIGATE);
- RNA_def_property_ui_text(prop, "Auto Depth",
- "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
-
- prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_CURSOR);
- RNA_def_property_ui_text(prop, "Cursor Surface Project",
- "Use the surface depth for cursor placement");
-
- prop = RNA_def_property(srna, "use_cursor_lock_adjust", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCK_CURSOR_ADJUST);
- RNA_def_property_ui_text(prop, "Cursor Lock Adjust",
- "Place the cursor without 'jumping' to the new location (when lock-to-cursor is used)");
-
- prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
- RNA_def_property_ui_text(prop, "Camera Parent Lock",
- "When the camera is locked to the view and in fly mode, "
- "transform the parent rather than the camera");
-
- /* view zoom */
- prop = RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);
- RNA_def_property_ui_text(prop, "Zoom To Mouse Position",
- "Zoom in towards the mouse pointer's position in the 3D view, "
- "rather than the 2D window center");
-
- /* view rotation */
- prop = RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP);
- RNA_def_property_ui_text(prop, "Auto Perspective",
- "Automatically switch between orthographic and perspective when changing "
- "from top/front/side views");
-
- prop = RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION);
- RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point");
+ static const EnumPropertyItem text_hinting_items[] = {
+ {0, "AUTO", 0, "Auto", ""},
+ {USER_TEXT_HINTING_NONE, "NONE", 0, "None", ""},
+ {USER_TEXT_HINTING_SLIGHT, "SLIGHT", 0, "Slight", ""},
+ {USER_TEXT_HINTING_FULL, "FULL", 0, "Full", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
/* mini axis */
static const EnumPropertyItem mini_axis_type_items[] = {
@@ -3948,6 +3961,64 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Zoom Seconds",
"Seconds around cursor that we zoom around");
+
+ /* Text. */
+
+ prop = RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_AA);
+ RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased");
+ RNA_def_property_update(prop, 0, "rna_userdef_text_update");
+
+ prop = RNA_def_property(srna, "text_hinting", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "text_render");
+ RNA_def_property_enum_items(prop, text_hinting_items);
+ RNA_def_property_ui_text(prop, "Text Hinting", "Method for making user interface text render sharp");
+ RNA_def_property_update(prop, 0, "rna_userdef_text_update");
+
+ prop = RNA_def_property(srna, "font_path_ui", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_string_sdna(prop, NULL, "font_path_ui");
+ RNA_def_property_ui_text(prop, "Interface Font", "Path to interface font");
+ RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
+
+ prop = RNA_def_property(srna, "font_path_ui_mono", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_string_sdna(prop, NULL, "font_path_ui_mono");
+ RNA_def_property_ui_text(prop, "Mono-space Font", "Path to interface mono-space Font");
+ RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
+
+
+ /* Language. */
+
+ prop = RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
+ RNA_def_property_ui_text(prop, "Translate UI", "Enable UI translation and use international fonts");
+ RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
+
+ prop = RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, rna_enum_language_default_items);
+#ifdef WITH_INTERNATIONAL
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_lang_enum_properties_itemf");
+#endif
+ RNA_def_property_ui_text(prop, "Language", "Language used for translation");
+ RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
+
+ prop = RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
+ RNA_def_property_ui_text(prop, "Translate Tooltips",
+ "Translate the descriptions when hovering UI elements (recommended)");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_IFACE);
+ RNA_def_property_ui_text(prop, "Translate Interface",
+ "Translate all labels in menus, buttons and panels "
+ "(note that this might make it hard to follow tutorials or the manual)");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "use_translate_new_dataname", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_NEWDATANAME);
+ RNA_def_property_ui_text(prop, "Translate New Names",
+ "Translate the names of new data-blocks (objects, materials...)");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_edit(BlenderRNA *brna)
@@ -4011,8 +4082,8 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
"When entering numbers while transforming, "
"default to advanced mode for full math expression evaluation");
-
/* Undo */
+
prop = RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "undosteps");
RNA_def_property_range(prop, 0, 256);
@@ -4030,13 +4101,13 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
"Global undo works by keeping a full copy of the file itself in memory, "
"so takes extra memory");
+
/* auto keyframing */
prop = RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
RNA_def_property_ui_text(prop, "Auto Keying Enable",
"Automatic keyframe insertion for Objects and Bones "
"(default setting used for new Scenes)");
- RNA_def_property_ui_icon(prop, ICON_REC, 0);
prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, auto_key_modes);
@@ -4258,15 +4329,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem color_picker_types[] = {
- {USER_CP_CIRCLE_HSV, "CIRCLE_HSV", 0, "Circle (HSV)", "A circular Hue/Saturation color wheel, with Value slider"},
- {USER_CP_CIRCLE_HSL, "CIRCLE_HSL", 0, "Circle (HSL)", "A circular Hue/Saturation color wheel, with Lightness slider"},
- {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square showing Saturation/Value, with Hue slider"},
- {USER_CP_SQUARE_HS, "SQUARE_HS", 0, "Square (HS + V)", "A square showing Hue/Saturation, with Value slider"},
- {USER_CP_SQUARE_HV, "SQUARE_HV", 0, "Square (HV + S)", "A square showing Hue/Value, with Saturation slider"},
- {0, NULL, 0, NULL, NULL}
- };
-
static const EnumPropertyItem multi_sample_levels[] = {
{USER_MULTISAMPLE_NONE, "NONE", 0, "No MultiSample", "Do not use OpenGL MultiSample"},
{USER_MULTISAMPLE_2, "2", 0, "MultiSample: 2", "Use 2x OpenGL MultiSample (requires restart)"},
@@ -4290,14 +4352,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem text_hinting_items[] = {
- {0, "AUTO", 0, "Auto", ""},
- {USER_TEXT_HINTING_NONE, "NONE", 0, "None", ""},
- {USER_TEXT_HINTING_SLIGHT, "SLIGHT", 0, "Slight", ""},
- {USER_TEXT_HINTING_FULL, "FULL", 0, "Full", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
srna = RNA_def_struct(brna, "PreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "Preferences");
@@ -4328,63 +4382,57 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_sdna(prop, NULL, "pixelsize");
- prop = RNA_def_property(srna, "font_path_ui", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "font_path_ui");
- RNA_def_property_ui_text(prop, "Interface Font", "Path to interface font");
- RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
- prop = RNA_def_property(srna, "font_path_ui_mono", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "font_path_ui_mono");
- RNA_def_property_ui_text(prop, "Mono-space Font", "Path to interface mono-space Font");
- RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
+ /* Memory */
+
+ prop = RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_range(prop, 0, 500, 1, -1);
+ RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback (sequencer only)");
+
+ prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
+ RNA_def_property_range(prop, 0, max_memory_in_megabytes_int());
+ RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit (in megabytes)");
+ RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
prop = RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "scrollback");
RNA_def_property_range(prop, 32, 32768);
RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer");
- prop = RNA_def_property(srna, "author", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "author");
- RNA_def_property_string_maxlength(prop, 80);
- RNA_def_property_ui_text(prop, "Author",
- "Name that will be used in exported files when format supports such feature");
-
- /* Language. */
+ /* OpenGL */
- prop = RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
- RNA_def_property_ui_text(prop, "Translate UI", "Enable UI translation and use international fonts");
- RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
-
- prop = RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_language_default_items);
-#ifdef WITH_INTERNATIONAL
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_lang_enum_properties_itemf");
-#endif
- RNA_def_property_ui_text(prop, "Language", "Language used for translation");
- RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
+ /* Full scene anti-aliasing */
+ prop = RNA_def_property(srna, "multi_sample", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "ogl_multisamples");
+ RNA_def_property_enum_items(prop, multi_sample_levels);
+ RNA_def_property_ui_text(prop, "MultiSample",
+ "Enable OpenGL multi-sampling, only for systems that support it, requires restart");
+ RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
- prop = RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
- RNA_def_property_ui_text(prop, "Translate Tooltips",
- "Translate the descriptions when hovering UI elements (recommended)");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ /* grease pencil anti-aliasing */
+ prop = RNA_def_property(srna, "gpencil_multi_sample", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_multisamples");
+ RNA_def_property_enum_items(prop, multi_sample_levels);
+ RNA_def_property_ui_text(prop, "Gpencil MultiSample",
+ "Enable Grease Pencil OpenGL multi-sampling, only for systems that support it");
+ RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
- prop = RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_IFACE);
- RNA_def_property_ui_text(prop, "Translate Interface",
- "Translate all labels in menus, buttons and panels "
- "(note that this might make it hard to follow tutorials or the manual)");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ prop = RNA_def_property(srna, "use_region_overlap", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", USER_REGION_OVERLAP);
+ RNA_def_property_ui_text(prop, "Region Overlap",
+ "Draw tool/property regions over the main region, when using Triple Buffer");
+ RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
- prop = RNA_def_property(srna, "use_translate_new_dataname", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_NEWDATANAME);
- RNA_def_property_ui_text(prop, "Translate New Names",
- "Translate the names of new data-blocks (objects, materials...)");
+ prop = RNA_def_property(srna, "gpu_viewport_quality", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "gpu_viewport_quality");
+ RNA_def_property_float_default(prop, 0.6f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Viewport Quality", "Quality setting for Solid mode rendering in the 3d viewport");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- /* System & OpenGL */
-
prop = RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "light_param", "");
RNA_def_property_struct_type(prop, "UserSolidLight");
@@ -4402,56 +4450,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
"View the result of the studio light editor in the viewport");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
- prop = RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
- RNA_def_property_ui_text(prop, "Use Weight Color Range",
- "Enable color range used for weight visualization in weight painting mode");
- RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
-
- prop = RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
- RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Weight Color Range",
- "Color range used for weight visualization in weight painting mode");
- RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
-
- prop = RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, color_picker_types);
- RNA_def_property_enum_sdna(prop, NULL, "color_picker_type");
- RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of displaying the color picker widget");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
- prop = RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_AUTOEXEC_DISABLE);
- RNA_def_property_ui_text(prop, "Auto Run Python Scripts",
- "Allow any .blend file to run scripts automatically "
- "(unsafe with blend files from an untrusted source)");
- RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
-
- prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES_DISABLE);
- RNA_def_property_ui_text(prop, "Tabs as Spaces",
- "Automatically convert all new tabs into spaces for new and loaded text files");
-
- prop = RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_range(prop, 0, 500, 1, -1);
- RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback (sequencer only)");
-
- prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
- RNA_def_property_range(prop, 0, max_memory_in_megabytes_int());
- RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit (in megabytes)");
- RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
-
prop = RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3D textured view");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+ /* Textures */
+
prop = RNA_def_property(srna, "use_16bit_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_16bit_textures", 1);
RNA_def_property_ui_text(prop, "16 Bit Float Textures", "Use 16 bit per component texture for float images");
@@ -4465,7 +4471,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop = RNA_def_property(srna, "image_draw_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, image_draw_methods);
RNA_def_property_enum_sdna(prop, NULL, "image_draw_method");
- RNA_def_property_ui_text(prop, "Image Draw Method", "Method used for displaying images on the screen");
+ RNA_def_property_ui_text(prop, "Image Display Method", "Method used for displaying images on the screen");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE);
@@ -4496,6 +4502,20 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Texture Collection Rate",
"Number of seconds between each run of the GL texture garbage collector");
+ /* Select */
+
+ prop = RNA_def_property(srna, "select_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "gpu_select_method");
+ RNA_def_property_enum_items(prop, gpu_select_method_items);
+ RNA_def_property_ui_text(prop, "Selection Method",
+ "Use OpenGL occlusion queries or selection render mode to accelerate selection");
+
+ prop = RNA_def_property(srna, "use_select_pick_depth", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gpu_select_pick_deph", 1);
+ RNA_def_property_ui_text(prop, "OpenGL Depth Picking", "Use the depth buffer for picking 3D View selection");
+
+ /* Audio */
+
prop = RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
RNA_def_property_enum_items(prop, audio_mixing_samples_items);
@@ -4527,56 +4547,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
- prop = RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_AA);
- RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased");
- RNA_def_property_update(prop, 0, "rna_userdef_text_update");
-
- prop = RNA_def_property(srna, "text_hinting", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "text_render");
- RNA_def_property_enum_items(prop, text_hinting_items);
- RNA_def_property_ui_text(prop, "Text Hinting", "Method for making user interface text render sharp");
- RNA_def_property_update(prop, 0, "rna_userdef_text_update");
-
- prop = RNA_def_property(srna, "select_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "gpu_select_method");
- RNA_def_property_enum_items(prop, gpu_select_method_items);
- RNA_def_property_ui_text(prop, "Selection Method",
- "Use OpenGL occlusion queries or selection render mode to accelerate selection");
-
- prop = RNA_def_property(srna, "use_select_pick_depth", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "gpu_select_pick_deph", 1);
- RNA_def_property_ui_text(prop, "OpenGL Depth Picking", "Use the depth buffer for picking 3D View selection");
-
- /* Full scene anti-aliasing */
- prop = RNA_def_property(srna, "multi_sample", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "ogl_multisamples");
- RNA_def_property_enum_items(prop, multi_sample_levels);
- RNA_def_property_ui_text(prop, "MultiSample",
- "Enable OpenGL multi-sampling, only for systems that support it, requires restart");
- RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
-
- /* grease pencil anti-aliasing */
- prop = RNA_def_property(srna, "gpencil_multi_sample", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_multisamples");
- RNA_def_property_enum_items(prop, multi_sample_levels);
- RNA_def_property_ui_text(prop, "Gpencil MultiSample",
- "Enable Grease Pencil OpenGL multi-sampling, only for systems that support it");
- RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
-
- prop = RNA_def_property(srna, "use_region_overlap", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", USER_REGION_OVERLAP);
- RNA_def_property_ui_text(prop, "Region Overlap",
- "Draw tool/property regions over the main region, when using Triple Buffer");
- RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
-
- prop = RNA_def_property(srna, "gpu_viewport_quality", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "gpu_viewport_quality");
- RNA_def_property_float_default(prop, 0.6f);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Viewport Quality", "Quality setting for Solid mode rendering in the 3d viewport");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
#ifdef WITH_OPENSUBDIV
prop = RNA_def_property(srna, "opensubdiv_compute_type", PROP_ENUM, PROP_NONE);
@@ -4603,8 +4573,8 @@ static void rna_def_userdef_input(BlenderRNA *brna)
StructRNA *srna;
static const EnumPropertyItem view_rotation_items[] = {
- {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"},
- {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"},
+ {0, "TURNTABLE", 0, "Turntable", "Turntable keeps the Z-axis upright while orbiting"},
+ {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Trackball allows you to tumble your view at any angle"},
{0, NULL, 0, NULL, NULL}
};
@@ -4642,10 +4612,6 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
- prop = RNA_def_property(srna, "show_ui_keyconfig", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "userpref_flag", USER_SECTION_INPUT_HIDE_UI_KEYCONFIG);
- RNA_def_property_ui_text(prop, "Show UI Key-Config", "");
-
prop = RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
RNA_def_property_enum_items(prop, view_zoom_styles);
@@ -4660,10 +4626,49 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT);
RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis of mouse movement for zooming");
+ prop = RNA_def_property(srna, "use_cursor_lock_adjust", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCK_CURSOR_ADJUST);
+ RNA_def_property_ui_text(prop, "Cursor Lock Adjust",
+ "Place the cursor without 'jumping' to the new location (when lock-to-cursor is used)");
+
+ prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_NAVIGATE);
+ RNA_def_property_ui_text(prop, "Auto Depth",
+ "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
+
+ prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_CURSOR);
+ RNA_def_property_ui_text(prop, "Cursor Surface Project",
+ "Use the surface depth for cursor placement");
+
+ prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
+ RNA_def_property_ui_text(prop, "Camera Parent Lock",
+ "When the camera is locked to the view and in fly mode, "
+ "transform the parent rather than the camera");
+
+ /* view zoom */
+ prop = RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);
+ RNA_def_property_ui_text(prop, "Zoom To Mouse Position",
+ "Zoom in towards the mouse pointer's position in the 3D view, "
+ "rather than the 2D window center");
+
+ /* view rotation */
+ prop = RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP);
+ RNA_def_property_ui_text(prop, "Auto Perspective",
+ "Automatically switch between orthographic and perspective when changing "
+ "from top/front/side views");
+
+ prop = RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION);
+ RNA_def_property_ui_text(prop, "Orbit Around Selection", "Use selection as the pivot point");
+
prop = RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, view_rotation_items);
- RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the viewport");
+ RNA_def_property_ui_text(prop, "Orbit Method", "Orbit method in the viewport");
prop = RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUSE);
@@ -4807,7 +4812,7 @@ static void rna_def_userdef_input(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE);
RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse",
- "Emulate Middle Mouse with Alt+Left Mouse (doesn't work with Left Mouse Select option)");
+ "Emulate Middle Mouse with Alt+Left Mouse");
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_userdef_keyconfig_reload_update");
@@ -4828,6 +4833,21 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", USER_TRACKPAD_NATURAL);
RNA_def_property_ui_text(prop, "Trackpad Natural",
"If your system uses 'natural' scrolling, this option keeps consistent trackpad usage throughout the UI");
+}
+
+static void rna_def_userdef_keymap(BlenderRNA *brna)
+{
+ PropertyRNA *prop;
+
+ StructRNA *srna = RNA_def_struct(brna, "PreferencesKeymap", NULL);
+ RNA_def_struct_sdna(srna, "UserDef");
+ RNA_def_struct_nested(brna, srna, "Preferences");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
+ RNA_def_struct_ui_text(srna, "Keymap", "Shortcut setup for keyboards and other input devices");
+
+ prop = RNA_def_property(srna, "show_ui_keyconfig", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "userpref_flag", USER_SECTION_INPUT_HIDE_UI_KEYCONFIG);
+ RNA_def_property_ui_text(prop, "Show UI Key-Config", "");
prop = RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "keyconfigstr");
@@ -4889,6 +4909,27 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files");
RNA_def_property_update(prop, 0, "rna_userdef_load_ui_update");
+
+ prop = RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_AUTOEXEC_DISABLE);
+ RNA_def_property_ui_text(prop, "Auto Run Python Scripts",
+ "Allow any .blend file to run scripts automatically "
+ "(unsafe with blend files from an untrusted source)");
+ RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
+
+ prop = RNA_def_property(srna, "author", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "author");
+ RNA_def_property_string_maxlength(prop, 80);
+ RNA_def_property_ui_text(prop, "Author",
+ "Name that will be used in exported files when format supports such feature");
+
+ prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES_DISABLE);
+ RNA_def_property_ui_text(prop, "Tabs as Spaces",
+ "Automatically convert all new tabs into spaces for new and loaded text files");
+
+ /* Directories */
+
prop = RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "fontdir");
RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts");
@@ -5035,13 +5076,14 @@ void RNA_def_userdef(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem preference_section_items[] = {
- {0, "", ICON_USER, "User Preferences", ""},
+ {0, "", ICON_USER, "User", ""},
{USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
+ {USER_SECTION_THEME, "THEMES", 0, "Themes", ""},
+ {USER_SECTION_LIGHT, "LIGHTS", 0, "Lights", ""},
{USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
{USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
+ {USER_SECTION_KEYMAP, "KEYMAP", 0, "Keymap", ""},
{USER_SECTION_ADDONS, "ADDONS", 0, "Add-ons", ""},
- {USER_SECTION_THEME, "THEMES", 0, "Themes", ""},
- {USER_SECTION_LIGHT, "LIGHTS", 0, "Lights", ""},
#ifdef WITH_USERDEF_WORKSPACES
{0, "", ICON_WORKSPACE, "Workspaces", ""},
{USER_SECTION_WORKSPACE_CONFIG, "WORKSPACE_CONFIG", 0, "Configuration File", ""},
@@ -5071,7 +5113,7 @@ void RNA_def_userdef(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "userpref");
RNA_def_property_enum_items(prop, preference_section_items);
RNA_def_property_ui_text(prop, "Active Section",
- "Active section of the user preferences shown in the user interface");
+ "Active section of the preferences shown in the user interface");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* don't expose this directly via the UI, modify via an operator */
@@ -5120,6 +5162,12 @@ void RNA_def_userdef(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_UserDef_input_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices");
+ prop = RNA_def_property(srna, "keymap", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "PreferencesKeymap");
+ RNA_def_property_pointer_funcs(prop, "rna_UserDef_keymap_get", NULL, NULL, NULL);
+ RNA_def_property_ui_text(prop, "Keymap", "Shortcut setup for keyboards and other input devices");
+
prop = RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "PreferencesFilePaths");
@@ -5151,6 +5199,7 @@ void RNA_def_userdef(BlenderRNA *brna)
rna_def_userdef_view(brna);
rna_def_userdef_edit(brna);
rna_def_userdef_input(brna);
+ rna_def_userdef_keymap(brna);
rna_def_userdef_filepaths(brna);
rna_def_userdef_system(brna);
rna_def_userdef_addon(brna);