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
This commit is contained in:
Severin 2019-01-04 21:40:16 +01:00 committed by Julian Eisel
parent 4b486eaec9
commit a77b63c569
Notes: blender-bot 2023-02-14 10:54:29 +01:00
Referenced by commit e8d4304b55, Correct version patching of Preferences theme
Referenced by issue #60612, Blender 2.8 Beta, Motion Blur Flag disables soft shadows in Camera View.
Referenced by issue #60296, Window Sleep Issue
Referenced by issue #60219, 2.8 UV snap to pixel distortion
Referenced by issue #60195, Offset custom button in Header
Referenced by issue #60196, Reference Image Lost
Referenced by issue #60197, HDRI Backgrounds don't light scene
Referenced by issue #60201, Transparent subsurf edit cage occludes underlying vertices.
Referenced by issue #60203, Flip bone extend bug
Referenced by issue #60180, Can't select plane objects after changing Display As setting to Wire.
Referenced by issue #60182, Can't enter inches dimensions in the Dimensions settings.
Referenced by issue #60173, Subdivision Modifier problem with n-gons
Referenced by issue #60163, Multires modifier not always updating external data files when .blend is saved causing changes to be lost
Referenced by issue #59732, It's impossible to delete a Ruler
Referenced by issue #58592, Keyboard shortcut cut links (Ctrl + click) don't work in the Shader Editor
Referenced by issue #54115, Redesign User Preferences
25 changed files with 1729 additions and 1159 deletions

View File

@ -1485,7 +1485,6 @@ class CyclesPreferences(bpy.types.AddonPreferences):
def draw_impl(self, layout, context):
available_device_types = self.get_device_types(context)
layout.label(text="Cycles Compute Device:")
if len(available_device_types) == 1:
layout.label(text="No compatible GPUs found", icon='INFO')
return

View File

@ -821,7 +821,8 @@ const bTheme U_theme_default = {
.button_title = RGBA(0xffffffff),
.button_text = RGBA(0xe5e5e5ff),
.button_text_hi = RGBA(0xffffffff),
.navigation_bar = RGBA(0x373737ff),
.navigation_bar = RGBA(0x4b4b4bff),
.execution_buts = RGBA(0x4b4b4bff),
.panelcolors = {
.header = RGBA(0x42424200),
.back = RGBA(0x333333b3),

View File

@ -572,7 +572,7 @@ def preset_find(name, preset_path, display_name=False, ext=".py"):
def keyconfig_init():
# Key configuration initialization and refresh, called from the Blender
# window manager on startup and refresh.
active_config = _preferences.inputs.active_keyconfig
active_config = _preferences.keymap.active_keyconfig
# Load the default key configuration.
default_filepath = preset_find("blender", "keyconfig")

View File

@ -372,15 +372,24 @@ def draw_keymaps(context, layout):
subcol = subsplit.column()
col = subcol.column()
row = col.row(align=True)
# row.prop_search(wm.keyconfigs, "active", wm, "keyconfigs", text="Key Config")
text = bpy.path.display_name(kc_active.name)
if not text:
text = "Blender (default)"
row.menu("USERPREF_MT_keyconfigs", text=text)
row.operator("wm.keyconfig_preset_add", text="", icon='ADD')
row.operator("wm.keyconfig_preset_add", text="", icon='REMOVE').remove_active = True
row = col.row()
row.operator("wm.keyconfig_import", text="Import...", icon='IMPORT')
row.operator("wm.keyconfig_export", text="Export...", icon='EXPORT')
row.separator()
rowsub = row.row(align=True)
rowsub.menu("USERPREF_MT_keyconfigs", text=text)
rowsub.operator("wm.keyconfig_preset_add", text="", icon='ADD')
rowsub.operator("wm.keyconfig_preset_add", text="", icon='REMOVE').remove_active = True
# layout.context_pointer_set("keyconfig", wm.keyconfigs.active)
# row.operator("wm.keyconfig_remove", text="", icon='X')
@ -413,14 +422,14 @@ def draw_keymaps(context, layout):
box = col.box()
row = box.row(align=True)
prefs = context.preferences
inputs = prefs.inputs
show_ui_keyconfig = inputs.show_ui_keyconfig
pref = context.preferences
keymappref = pref.keymap
show_ui_keyconfig = keymappref.show_ui_keyconfig
row.prop(
inputs,
keymappref,
"show_ui_keyconfig",
text="",
icon='TRIA_DOWN' if show_ui_keyconfig else 'TRIA_RIGHT',
icon='DISCLOSURE_TRI_DOWN' if show_ui_keyconfig else 'DISCLOSURE_TRI_RIGHT',
emboss=False,
)
row.label(text="Preferences")

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 280
#define BLENDER_SUBVERSION 39
#define BLENDER_SUBVERSION 40
/* Several breakages with 280, e.g. collections vs layers */
#define BLENDER_MINVERSION 280
#define BLENDER_MINSUBVERSION 0

View File

@ -2382,12 +2382,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
ARegion *navigation_region = BKE_spacedata_find_region_type(slink, area, RGN_TYPE_NAV_BAR);
if (!navigation_region) {
ARegion *main_region = BKE_spacedata_find_region_type(slink, area, RGN_TYPE_WINDOW);
ListBase *regionbase = (slink == area->spacedata.first) ?
&area->regionbase : &slink->regionbase;
navigation_region = MEM_callocN(sizeof(ARegion), "userpref navigation-region do_versions");
BLI_addhead(regionbase, navigation_region); /* order matters, addhead not addtail! */
BLI_insertlinkbefore(regionbase, main_region, navigation_region); /* order matters, addhead not addtail! */
navigation_region->regiontype = RGN_TYPE_NAV_BAR;
navigation_region->alignment = RGN_ALIGN_LEFT;
}
@ -2691,9 +2692,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
{
/* Versioning code until next subversion bump goes here. */
if (!MAIN_VERSION_ATLEAST(bmain, 280, 40)) {
if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "char", "snap_transform_mode_flag")) {
for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
scene->toolsettings->snap_transform_mode_flag =
@ -2748,5 +2747,34 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
ca->gpu_dof.ratio = 0.01f;
}
}
for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
for (ScrArea *area = screen->areabase.first; area; area = area->next) {
for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_USERPREF) {
ARegion *execute_region = BKE_spacedata_find_region_type(sl, area, RGN_TYPE_EXECUTE);
if (!execute_region) {
ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase;
ARegion *ar_navbar = BKE_spacedata_find_region_type(sl, area, RGN_TYPE_NAV_BAR);
execute_region = MEM_callocN(sizeof(ARegion), "execute region for properties");
BLI_assert(ar_navbar);
BLI_insertlinkafter(regionbase, ar_navbar, execute_region);
execute_region->regiontype = RGN_TYPE_EXECUTE;
execute_region->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
execute_region->flag |= RGN_FLAG_DYNAMIC_SIZE;
}
}
}
}
}
}
{
/* Versioning code until next subversion bump goes here. */
}
}

View File

@ -106,6 +106,11 @@ static void do_versions_theme(UserDef *userdef, bTheme *btheme)
copy_v4_v4_char(btheme->tclip.metadatabg, U_theme_default.tima.metadatabg);
copy_v4_v4_char(btheme->tclip.metadatatext, U_theme_default.tima.metadatatext);
}
if (!USER_VERSION_ATLEAST(280, 40)) {
copy_v4_v4_char(btheme->tuserpref.execution_buts, btheme->tuserpref.navigation_bar);
}
#undef USER_VERSION_ATLEAST
}

View File

@ -143,7 +143,7 @@ void ED_area_tag_redraw_no_rebuild(ScrArea *sa);
void ED_area_tag_redraw_regiontype(ScrArea *sa, int type);
void ED_area_tag_refresh(ScrArea *sa);
void ED_area_do_refresh(struct bContext *C, ScrArea *sa);
void ED_area_azones_update(ScrArea *sa, const int mouse_xy[]);
struct AZone *ED_area_azones_update(ScrArea *sa, const int mouse_xy[]);
void ED_area_status_text(ScrArea *sa, const char *str);
void ED_area_newspace(struct bContext *C, ScrArea *sa, int type, const bool skip_ar_exit);
void ED_area_prevspace(struct bContext *C, ScrArea *sa);

View File

@ -658,7 +658,6 @@ static void ui_item_enum_expand_exec(
uiLayout *layout_radial = NULL;
const EnumPropertyItem *item, *item_array;
const char *name;
char group_name[UI_MAX_NAME_STR];
int itemw, icon, value;
bool free;
bool radial = (layout->root->type == UI_LAYOUT_PIEMENU);
@ -703,8 +702,7 @@ static void ui_item_enum_expand_exec(
if (!is_first) {
uiItemS(block->curlayout);
}
BLI_snprintf(group_name, sizeof(group_name), "%s:", item->name);
uiItemL(block->curlayout, group_name, item->icon);
uiItemL(block->curlayout, item->name, item->icon);
}
else if (radial && layout_radial) {
uiItemS(layout_radial);

View File

@ -1345,7 +1345,7 @@ static int edittranslation_exec(bContext *C, wmOperator *op)
if (!BLI_is_dir(root)) {
BKE_report(
op->reports, RPT_ERROR,
"Please set your User Preferences' 'Translation Branches "
"Please set your Preferences' 'Translation Branches "
"Directory' path to a valid directory");
return OPERATOR_CANCELLED;
}

View File

@ -147,7 +147,7 @@ static int panel_aligned(ScrArea *sa, ARegion *ar)
return BUT_VERTICAL;
else if (sa->spacetype == SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW)
return BUT_VERTICAL;
else if (ELEM(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS, RGN_TYPE_HUD, RGN_TYPE_NAV_BAR))
else if (ELEM(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS, RGN_TYPE_HUD, RGN_TYPE_NAV_BAR, RGN_TYPE_EXECUTE))
return BUT_VERTICAL;
return 0;

View File

@ -183,6 +183,8 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
cp = ts->header;
else if (theme_regionid == RGN_TYPE_NAV_BAR)
cp = ts->navigation_bar;
else if (theme_regionid == RGN_TYPE_EXECUTE)
cp = ts->execution_buts;
else
cp = ts->button;

View File

@ -186,52 +186,6 @@ void ED_area_do_refresh(bContext *C, ScrArea *sa)
sa->do_refresh = false;
}
/**
* Action zones are only updated if the mouse is inside of them, but in some cases (currently only fullscreen icon)
* it might be needed to update their properties and redraw if the mouse isn't inside.
*/
void ED_area_azones_update(ScrArea *sa, const int mouse_xy[2])
{
AZone *az;
bool changed = false;
for (az = sa->actionzones.first; az; az = az->next) {
if (az->type == AZONE_FULLSCREEN) {
/* only if mouse is not hovering the azone */
if (BLI_rcti_isect_pt_v(&az->rect, mouse_xy) == false) {
az->alpha = 0.0f;
changed = true;
/* can break since currently only this is handled here */
break;
}
}
else if (az->type == AZONE_REGION_SCROLL) {
/* only if mouse is not hovering the azone */
if (BLI_rcti_isect_pt_v(&az->rect, mouse_xy) == false) {
View2D *v2d = &az->ar->v2d;
if (az->direction == AZ_SCROLL_VERT) {
az->alpha = v2d->alpha_vert = 0;
changed = true;
}
else if (az->direction == AZ_SCROLL_HOR) {
az->alpha = v2d->alpha_hor = 0;
changed = true;
}
else {
BLI_assert(0);
}
}
}
}
if (changed) {
sa->flag &= ~AREA_FLAG_ACTIONZONES_UPDATE;
ED_area_tag_redraw_no_rebuild(sa);
}
}
/**
* \brief Corner widget use for quitting fullscreen.
*/
@ -412,18 +366,11 @@ static void region_draw_azones(ScrArea *sa, ARegion *ar)
}
else if (az->type == AZONE_FULLSCREEN) {
area_draw_azone_fullscreen(az->x1, az->y1, az->x2, az->y2, az->alpha);
if (az->alpha != 0.0f) {
area_azone_tag_update(sa);
}
}
else if (az->type == AZONE_REGION_SCROLL) {
if (az->alpha != 0.0f) {
area_azone_tag_update(sa);
}
/* Don't draw this azone. */
}
}
if (!IS_EQF(az->alpha, 0.0f) && ELEM(az->type, AZONE_FULLSCREEN, AZONE_REGION_SCROLL)) {
area_azone_tag_update(sa);
}
}
GPU_matrix_pop();
@ -1605,6 +1552,7 @@ void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *ar
if (!(area->flag & AREA_FLAG_REGION_SIZE_UPDATE)) {
return;
}
const bScreen *screen = WM_window_get_active_screen(win);
WM_window_rect_calc(win, &window_rect);
area_calc_totrct(area, &window_rect);
@ -1614,6 +1562,9 @@ void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *ar
overlap_rect = rect;
region_rect_recursive(area, area->regionbase.first, &rect, &overlap_rect, 0);
/* Dynamically sized regions may have changed region sizes, so we have to force azone update. */
area_azone_initialize(win, screen, area);
for (ARegion *ar = area->regionbase.first; ar; ar = ar->next) {
region_subwindow(ar);
@ -1621,7 +1572,11 @@ void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *ar
if (ar->type->init) {
ar->type->init(wm, ar);
}
/* Some AZones use View2D data which is only updated in region init, so call that first! */
region_azones_add(screen, area, ar, ar->alignment & ~RGN_SPLIT_PREV);
}
ED_area_azones_update(area, &win->eventstate->x);
area->flag &= ~AREA_FLAG_REGION_SIZE_UPDATE;
}
@ -2386,6 +2341,9 @@ void ED_region_panels_draw(const bContext *C, ARegion *ar)
/* set the view */
UI_view2d_view_ortho(v2d);
/* View2D matrix might have changed due to dynamic sized regions. */
UI_blocklist_update_window_matrix(C, &ar->uiblocks);
/* draw panels */
UI_panels_draw(C, ar);

View File

@ -639,7 +639,7 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2])
ED_screen_areas_iter(win, scr, area_iter) {
if (xy[0] > area_iter->totrct.xmin && xy[0] < area_iter->totrct.xmax) {
if (xy[1] > area_iter->totrct.ymin && xy[1] < area_iter->totrct.ymax) {
if (ED_area_actionzone_refresh_xy(area_iter, xy) == NULL) {
if (ED_area_azones_update(area_iter, xy) == NULL) {
sa = area_iter;
break;
}
@ -1251,7 +1251,7 @@ ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *sa, const s
for (ar = newa->regionbase.first; ar; ar = ar->next) {
ar->flagfullscreen = ar->flag;
if (ELEM(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_NAV_BAR)) {
if (ELEM(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_NAV_BAR, RGN_TYPE_EXECUTE)) {
ar->flag |= RGN_FLAG_HIDDEN;
}
}

View File

@ -57,7 +57,6 @@ int screen_area_join(struct bContext *C, bScreen *scr, ScrArea *sa1, Scr
int area_getorientation(ScrArea *sa, ScrArea *sb);
struct AZone *ED_area_actionzone_find_xy(ScrArea *sa, const int xy[2]);
struct AZone *ED_area_actionzone_refresh_xy(ScrArea *sa, const int xy[2]);
/* screen_geometry.c */
int screen_geom_area_height(const ScrArea *area);

View File

@ -798,6 +798,32 @@ static AZone *area_actionzone_refresh_xy(ScrArea *sa, const int xy[2], const boo
}
}
}
else if (!test_only && !IS_EQF(az->alpha, 0.0f)) {
bool changed = false;
if (az->type == AZONE_FULLSCREEN) {
az->alpha = 0.0f;
changed = true;
}
else if (az->type == AZONE_REGION_SCROLL) {
if (az->direction == AZ_SCROLL_VERT) {
az->alpha = az->ar->v2d.alpha_vert = 0;
changed = true;
}
else if (az->direction == AZ_SCROLL_HOR) {
az->alpha = az->ar->v2d.alpha_hor = 0;
changed = true;
}
else {
BLI_assert(0);
}
}
if (changed) {
sa->flag &= ~AREA_FLAG_ACTIONZONES_UPDATE;
ED_area_tag_redraw_no_rebuild(sa);
}
}
}
return az;
@ -808,7 +834,7 @@ AZone *ED_area_actionzone_find_xy(ScrArea *sa, const int xy[2])
return area_actionzone_refresh_xy(sa, xy, true);
}
AZone *ED_area_actionzone_refresh_xy(ScrArea *sa, const int xy[2])
AZone *ED_area_azones_update(ScrArea *sa, const int xy[2])
{
return area_actionzone_refresh_xy(sa, xy, false);
}
@ -2382,8 +2408,12 @@ static int region_scale_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (!(rmd->ar->flag & RGN_FLAG_HIDDEN))
region_scale_toggle_hidden(C, rmd);
}
else if (rmd->ar->flag & RGN_FLAG_HIDDEN)
else if (rmd->ar->flag & RGN_FLAG_HIDDEN) {
region_scale_toggle_hidden(C, rmd);
}
else if (rmd->ar->flag & RGN_FLAG_DYNAMIC_SIZE) {
rmd->ar->sizex = rmd->origval;
}
}
else {
int maxsize = region_scale_get_maxsize(rmd);
@ -2411,10 +2441,15 @@ static int region_scale_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (!(rmd->ar->flag & RGN_FLAG_HIDDEN))
region_scale_toggle_hidden(C, rmd);
}
else if (maxsize > 0 && (rmd->ar->sizey > maxsize))
else if (maxsize > 0 && (rmd->ar->sizey > maxsize)) {
rmd->ar->sizey = maxsize;
else if (rmd->ar->flag & RGN_FLAG_HIDDEN)
}
else if (rmd->ar->flag & RGN_FLAG_HIDDEN) {
region_scale_toggle_hidden(C, rmd);
}
else if (rmd->ar->flag & RGN_FLAG_DYNAMIC_SIZE) {
rmd->ar->sizey = rmd->origval;
}
}
ED_area_tag_redraw(rmd->sa);
WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
@ -4349,11 +4384,15 @@ static void SCREEN_OT_back_to_previous(struct wmOperatorType *ot)
static int userpref_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
int sizex = (800 + UI_NAVIGATION_REGION_WIDTH) * UI_DPI_FAC;
int sizey = 500 * UI_DPI_FAC;
int sizex = (500 + UI_NAVIGATION_REGION_WIDTH) * UI_DPI_FAC;
int sizey = 520 * UI_DPI_FAC;
/* changes context! */
if (WM_window_open_temp(C, event->x, event->y, sizex, sizey, WM_WINDOW_USERPREFS) != NULL) {
/* The header only contains the editor switcher and looks empty. So hiding in the temp window makes sense. */
ScrArea *area = CTX_wm_area(C);
ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_HEADER);
region->flag |= RGN_FLAG_HIDDEN;
return OPERATOR_FINISHED;
}
else {

View File

@ -61,13 +61,6 @@ static SpaceLink *userpref_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
spref = MEM_callocN(sizeof(SpaceUserPref), "inituserpref");
spref->spacetype = SPACE_USERPREF;
/* navigation region */
ar = MEM_callocN(sizeof(ARegion), "navigation region for userpref");
BLI_addtail(&spref->regionbase, ar);
ar->regiontype = RGN_TYPE_NAV_BAR;
ar->alignment = RGN_ALIGN_LEFT;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for userpref");
@ -76,6 +69,21 @@ static SpaceLink *userpref_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
/* Ignore user preference "USER_HEADER_BOTTOM" here (always show bottom for new types). */
ar->alignment = RGN_ALIGN_BOTTOM;
/* navigation region */
ar = MEM_callocN(sizeof(ARegion), "navigation region for userpref");
BLI_addtail(&spref->regionbase, ar);
ar->regiontype = RGN_TYPE_NAV_BAR;
ar->alignment = RGN_ALIGN_LEFT;
/* execution region */
ar = MEM_callocN(sizeof(ARegion), "execution region for userpref");
BLI_addtail(&spref->regionbase, ar);
ar->regiontype = RGN_TYPE_EXECUTE;
ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
ar->flag |= RGN_FLAG_DYNAMIC_SIZE;
/* main region */
ar = MEM_callocN(sizeof(ARegion), "main region for userpref");
@ -159,6 +167,13 @@ static void userpref_navigation_region_draw(const bContext *C, ARegion *ar)
ED_region_panels(C, ar);
}
/* add handlers, stuff you only do once or on area/region changes */
static void userpref_execute_region_init(wmWindowManager *wm, ARegion *ar)
{
ED_region_panels_init(wm, ar);
ar->v2d.keepzoom |= V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y;
}
static void userpref_main_region_listener(
wmWindow *UNUSED(win), ScrArea *UNUSED(sa), ARegion *UNUSED(ar),
wmNotifier *UNUSED(wmn), const Scene *UNUSED(scene))
@ -186,6 +201,13 @@ static void userpref_navigation_region_listener(
/* context changes */
}
static void userpref_execute_region_listener(
wmWindow *UNUSED(win), ScrArea *UNUSED(sa), ARegion *UNUSED(ar),
wmNotifier *UNUSED(wmn), const Scene *UNUSED(scene))
{
/* context changes */
}
/* only called once, from space/spacetypes.c */
void ED_spacetype_userpref(void)
{
@ -234,6 +256,17 @@ void ED_spacetype_userpref(void)
BLI_addhead(&st->regiontypes, art);
/* regions: execution window */
art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
art->regionid = RGN_TYPE_EXECUTE;
art->init = userpref_execute_region_init;
art->layout = ED_region_panels_layout;
art->draw = ED_region_panels_draw;
art->listener = userpref_execute_region_listener;
art->keymapflag = ED_KEYMAP_UI;
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);
}

View File

@ -476,6 +476,8 @@ enum {
RGN_TYPE_HUD = 8,
/* Region to navigate the main region from (RGN_TYPE_WINDOW). */
RGN_TYPE_NAV_BAR = 9,
/* A place for buttons to trigger execution of somthing that was set up in other regions. */
RGN_TYPE_EXECUTE = 10,
};
/* use for function args */
#define RGN_TYPE_ANY -1

View File

@ -236,7 +236,7 @@ typedef struct ThemeSpace {
/* navigation bar regions */
char navigation_bar[4]; /* region background */
int pad2;
char execution_buts[4]; /* region background */
/* float panel */
/* char panel[4]; unused */
@ -687,14 +687,15 @@ typedef enum eUserPref_Section {
USER_SECTION_INPUT = 5,
USER_SECTION_ADDONS = 6,
USER_SECTION_LIGHT = 7,
USER_SECTION_KEYMAP = 8,
#ifdef WITH_USERDEF_WORKSPACES
USER_SECTION_WORKSPACE_CONFIG = 8,
USER_SECTION_WORKSPACE_ADDONS = 9,
USER_SECTION_WORKSPACE_KEYMAPS = 10,
USER_SECTION_WORKSPACE_CONFIG = 9,
USER_SECTION_WORKSPACE_ADDONS = 10,
USER_SECTION_WORKSPACE_KEYMAPS = 11,
#endif
#ifdef WITH_USERDEF_SYSTEM_SPLIT
USER_SECTION_SYSTEM_DISPLAY = 11,
USER_SECTION_SYSTEM_DEVICES = 12,
USER_SECTION_SYSTEM_DISPLAY = 12,
USER_SECTION_SYSTEM_DEVICES = 13,
#endif
} eUserPref_Section;

View File

@ -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;

View File

@ -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}
};

View File

@ -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");

View File

@ -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");
/* OpenGL */
/* Language. */
/* 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_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");
/* 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, "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_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_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)");
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");
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");
/* 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_EDIT, "EDITING", 0, "Editing", ""},
{USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
{USER_SECTION_ADDONS, "ADDONS", 0, "Add-ons", ""},
{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", ""},
#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);

View File

@ -1684,7 +1684,7 @@ void WM_OT_save_userpref(wmOperatorType *ot)
{
ot->name = "Save Preferences";
ot->idname = "WM_OT_save_userpref";
ot->description = "Save user preferences separately, overrides startup file preferences";
ot->description = "Save preferences separately, overrides startup file preferences";
ot->invoke = WM_operator_confirm;
ot->exec = wm_userpref_write_exec;
@ -1825,7 +1825,7 @@ void WM_OT_read_factory_settings(wmOperatorType *ot)
ot->name = "Load Factory Settings";
ot->idname = "WM_OT_read_factory_settings";
ot->description = "Load default file and user preferences";
ot->description = "Load default file and preferences";
ot->invoke = WM_operator_confirm;
ot->exec = wm_homefile_read_exec;