RNA: naming, user-preferences -> preferences

This commit is contained in:
Campbell Barton
2018-12-21 12:47:44 +11:00
parent 9dde3e42a7
commit 63fcbfc3a7
48 changed files with 220 additions and 220 deletions

View File

@@ -16,7 +16,7 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
const DRWContextState *draw_ctx = DRW_context_state_get();
const Scene *scene = draw_ctx->scene;
wpd->material_hash = BLI_ghash_ptr_new(__func__);
wpd->user_preferences = &U;
wpd->preferences = &U;
View3D *v3d = draw_ctx->v3d;
if (!v3d) {

View File

@@ -98,13 +98,13 @@ int workbench_taa_calculate_num_iterations(WORKBENCH_Data *vedata)
result = (scene->r.mode & R_OSA) ? scene->r.osa : 1;
}
else if (IN_RANGE_INCL(
wpd->user_preferences->gpu_viewport_quality,
wpd->preferences->gpu_viewport_quality,
GPU_VIEWPORT_QUALITY_TAA8, GPU_VIEWPORT_QUALITY_TAA16))
{
result = 8;
}
else if (IN_RANGE_INCL(
wpd->user_preferences->gpu_viewport_quality,
wpd->preferences->gpu_viewport_quality,
GPU_VIEWPORT_QUALITY_TAA16, GPU_VIEWPORT_QUALITY_TAA32))
{
result = 16;

View File

@@ -61,9 +61,9 @@
#define IS_NAVIGATING(wpd) ((DRW_context_state_get()->rv3d) && (DRW_context_state_get()->rv3d->rflag & RV3D_NAVIGATING))
#define FXAA_ENABLED(wpd) ((!DRW_state_is_opengl_render()) && \
(IN_RANGE(wpd->user_preferences->gpu_viewport_quality, GPU_VIEWPORT_QUALITY_FXAA, GPU_VIEWPORT_QUALITY_TAA8) || \
((IS_NAVIGATING(wpd) || wpd->is_playback) && (wpd->user_preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8))))
#define TAA_ENABLED(wpd) (DRW_state_is_image_render() || (wpd->user_preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8 && !IS_NAVIGATING(wpd) && !wpd->is_playback))
(IN_RANGE(wpd->preferences->gpu_viewport_quality, GPU_VIEWPORT_QUALITY_FXAA, GPU_VIEWPORT_QUALITY_TAA8) || \
((IS_NAVIGATING(wpd) || wpd->is_playback) && (wpd->preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8))))
#define TAA_ENABLED(wpd) (DRW_state_is_image_render() || (wpd->preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8 && !IS_NAVIGATING(wpd) && !wpd->is_playback))
#define SPECULAR_HIGHLIGHT_ENABLED(wpd) (STUDIOLIGHT_ENABLED(wpd) && (wpd->shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHT) && (!STUDIOLIGHT_TYPE_MATCAP_ENABLED(wpd)))
#define OBJECT_OUTLINE_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_OBJECT_OUTLINE)
#define OBJECT_ID_PASS_ENABLED(wpd) (OBJECT_OUTLINE_ENABLED(wpd) || CURVATURE_ENABLED(wpd))
@@ -179,7 +179,7 @@ typedef struct WORKBENCH_PrivateData {
struct GPUShader *transparent_accum_texture_hair_sh;
View3DShading shading;
StudioLight *studio_light;
UserDef *user_preferences;
const UserDef *preferences;
struct GPUUniformBuffer *world_ubo;
struct DRWShadingGroup *shadow_shgrp;
struct DRWShadingGroup *depth_shgrp;

View File

@@ -4751,7 +4751,7 @@ static void context_cycle_prop_get(
propname = "context";
break;
case SPACE_USERPREF:
RNA_pointer_create(NULL, &RNA_UserPreferences, &U, r_ptr);
RNA_pointer_create(NULL, &RNA_Preferences, &U, r_ptr);
propname = "active_section";
break;
default:

View File

@@ -610,7 +610,7 @@ extern StructRNA RNA_SpaceProperties;
extern StructRNA RNA_SpaceSequenceEditor;
extern StructRNA RNA_SpaceTextEditor;
extern StructRNA RNA_SpaceUVEditor;
extern StructRNA RNA_SpaceUserPreferences;
extern StructRNA RNA_SpacePreferences;
extern StructRNA RNA_SpaceView3D;
extern StructRNA RNA_Speaker;
extern StructRNA RNA_SpeedControlSequence;
@@ -685,7 +685,7 @@ extern StructRNA RNA_ThemeSpaceListGeneric;
extern StructRNA RNA_ThemeStyle;
extern StructRNA RNA_ThemeTextEditor;
extern StructRNA RNA_ThemeUserInterface;
extern StructRNA RNA_ThemeUserPreferences;
extern StructRNA RNA_ThemePreferences;
extern StructRNA RNA_ThemeView3D;
extern StructRNA RNA_ThemeWidgetColors;
extern StructRNA RNA_ThemeWidgetStateColors;
@@ -708,13 +708,13 @@ extern StructRNA RNA_UVProjector;
extern StructRNA RNA_UVWarpModifier;
extern StructRNA RNA_UnitSettings;
extern StructRNA RNA_UnknownType;
extern StructRNA RNA_UserPreferences;
extern StructRNA RNA_UserPreferencesEdit;
extern StructRNA RNA_UserPreferencesFilePaths;
extern StructRNA RNA_UserPreferencesInput;
extern StructRNA RNA_UserPreferencesSystem;
extern StructRNA RNA_UserPreferencesView;
extern StructRNA RNA_UserPreferencesWalkNavigation;
extern StructRNA RNA_Preferences;
extern StructRNA RNA_PreferencesEdit;
extern StructRNA RNA_PreferencesFilePaths;
extern StructRNA RNA_PreferencesInput;
extern StructRNA RNA_PreferencesSystem;
extern StructRNA RNA_PreferencesView;
extern StructRNA RNA_PreferencesWalkNavigation;
extern StructRNA RNA_UserSolidLight;
extern StructRNA RNA_VectorFont;
extern StructRNA RNA_VertexGroup;

View File

@@ -196,10 +196,10 @@ static PointerRNA rna_Context_tool_settings_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_ToolSettings, CTX_data_tool_settings(C));
}
static PointerRNA rna_Context_user_preferences_get(PointerRNA *UNUSED(ptr))
static PointerRNA rna_Context_preferences_get(PointerRNA *UNUSED(ptr))
{
PointerRNA newptr;
RNA_pointer_create(NULL, &RNA_UserPreferences, &U, &newptr);
RNA_pointer_create(NULL, &RNA_Preferences, &U, &newptr);
return newptr;
}
@@ -306,10 +306,10 @@ void RNA_def_context(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ToolSettings");
RNA_def_property_pointer_funcs(prop, "rna_Context_tool_settings_get", NULL, NULL, NULL);
prop = RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
prop = RNA_def_property(srna, "preferences", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "UserPreferences");
RNA_def_property_pointer_funcs(prop, "rna_Context_user_preferences_get", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "Preferences");
RNA_def_property_pointer_funcs(prop, "rna_Context_preferences_get", NULL, NULL, NULL);
prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_context_mode_items);

View File

@@ -102,7 +102,7 @@ const EnumPropertyItem rna_enum_space_type_items[] = {
{SPACE_OUTLINER, "OUTLINER", ICON_OUTLINER, "Outliner", "Overview of scene graph and all available data-blocks"},
{SPACE_BUTS, "PROPERTIES", ICON_PROPERTIES, "Properties", "Edit properties of active object and related data-blocks"},
{SPACE_FILE, "FILE_BROWSER", ICON_FILEBROWSER, "File Browser", "Browse for files and assets"},
{SPACE_USERPREF, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences",
{SPACE_USERPREF, "PREFERENCES", ICON_PREFERENCES, "Preferences",
"Edit persistent configuration settings"},
{0, NULL, 0, NULL, NULL}
};
@@ -417,7 +417,7 @@ static StructRNA *rna_Space_refine(struct PointerRNA *ptr)
case SPACE_CONSOLE:
return &RNA_SpaceConsole;
case SPACE_USERPREF:
return &RNA_SpaceUserPreferences;
return &RNA_SpacePreferences;
case SPACE_CLIP:
return &RNA_SpaceClipEditor;
default:
@@ -4733,7 +4733,7 @@ static void rna_def_space_userpref(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SpaceUserPreferences", "Space");
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");

View File

@@ -285,27 +285,27 @@ static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value)
static PointerRNA rna_UserDef_view_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesView, ptr->data);
return rna_pointer_inherit_refine(ptr, &RNA_PreferencesView, ptr->data);
}
static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->data);
return rna_pointer_inherit_refine(ptr, &RNA_PreferencesEdit, ptr->data);
}
static PointerRNA rna_UserDef_input_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesInput, ptr->data);
return rna_pointer_inherit_refine(ptr, &RNA_PreferencesInput, ptr->data);
}
static PointerRNA rna_UserDef_filepaths_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesFilePaths, ptr->data);
return rna_pointer_inherit_refine(ptr, &RNA_PreferencesFilePaths, ptr->data);
}
static PointerRNA rna_UserDef_system_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesSystem, ptr->data);
return rna_pointer_inherit_refine(ptr, &RNA_PreferencesSystem, ptr->data);
}
static void rna_UserDef_audio_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
@@ -2078,7 +2078,7 @@ static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
/* space_userpref */
srna = RNA_def_struct(brna, "ThemeUserPreferences", NULL);
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");
@@ -3202,7 +3202,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
{9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""},
{11, "PROPERTIES", ICON_PROPERTIES, "Properties", ""},
{12, "OUTLINER", ICON_OUTLINER, "Outliner", ""},
{14, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", ""},
{14, "PREFERENCES", ICON_PREFERENCES, "Preferences", ""},
{15, "INFO", ICON_INFO, "Info", ""},
{16, "FILE_BROWSER", ICON_FILEBROWSER, "File Browser", ""},
{17, "CONSOLE", ICON_CONSOLE, "Python Console", ""},
@@ -3307,11 +3307,11 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ThemeInfo");
RNA_def_property_ui_text(prop, "Info", "");
prop = RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
prop = RNA_def_property(srna, "preferences", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
RNA_def_property_ui_text(prop, "User Preferences", "");
RNA_def_property_struct_type(prop, "ThemePreferences");
RNA_def_property_ui_text(prop, "Preferences", "");
prop = RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -3670,9 +3670,9 @@ static void rna_def_userdef_view(BlenderRNA *brna)
PropertyRNA *prop;
StructRNA *srna;
srna = RNA_def_struct(brna, "UserPreferencesView", NULL);
srna = RNA_def_struct(brna, "PreferencesView", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_nested(brna, srna, "Preferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data");
@@ -3971,9 +3971,9 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "UserPreferencesEdit", NULL);
srna = RNA_def_struct(brna, "PreferencesEdit", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_nested(brna, srna, "Preferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data");
@@ -4295,9 +4295,9 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "UserPreferencesSystem", NULL);
srna = RNA_def_struct(brna, "PreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_nested(brna, srna, "Preferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings");
@@ -4633,9 +4633,9 @@ static void rna_def_userdef_input(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "UserPreferencesInput", NULL);
srna = RNA_def_struct(brna, "PreferencesInput", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_nested(brna, srna, "Preferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
@@ -4846,9 +4846,9 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
srna = RNA_def_struct(brna, "PreferencesFilePaths", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_nested(brna, srna, "Preferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files");
@@ -5031,7 +5031,7 @@ void RNA_def_userdef(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static const EnumPropertyItem user_pref_sections[] = {
static const EnumPropertyItem preference_section_items[] = {
{0, "", ICON_USER, "User Preferences", ""},
{USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
{USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
@@ -5059,14 +5059,14 @@ void RNA_def_userdef(BlenderRNA *brna)
rna_def_userdef_solidlight(brna);
rna_def_userdef_walk_navigation(brna);
srna = RNA_def_struct(brna, "UserPreferences", NULL);
srna = RNA_def_struct(brna, "Preferences", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "User Preferences", "Global user preferences");
RNA_def_struct_ui_text(srna, "Preferences", "Global preferences");
prop = RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "userpref");
RNA_def_property_enum_items(prop, user_pref_sections);
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");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -5101,31 +5101,31 @@ void RNA_def_userdef(BlenderRNA *brna)
/* nested structs */
prop = RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesView");
RNA_def_property_struct_type(prop, "PreferencesView");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "View & Controls", "Preferences related to viewing data");
prop = RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesEdit");
RNA_def_property_struct_type(prop, "PreferencesEdit");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data");
prop = RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesInput");
RNA_def_property_struct_type(prop, "PreferencesInput");
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, "filepaths", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesFilePaths");
RNA_def_property_struct_type(prop, "PreferencesFilePaths");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "File Paths", "Default paths for external files");
prop = RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesSystem");
RNA_def_property_struct_type(prop, "PreferencesSystem");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and operating system settings");

View File

@@ -225,7 +225,7 @@ static eSpace_Type rna_Space_refine_reverse(StructRNA *srna)
if (srna == &RNA_SpaceNLA) return SPACE_NLA;
if (srna == &RNA_SpaceNodeEditor) return SPACE_NODE;
if (srna == &RNA_SpaceConsole) return SPACE_CONSOLE;
if (srna == &RNA_SpaceUserPreferences) return SPACE_USERPREF;
if (srna == &RNA_SpacePreferences) return SPACE_USERPREF;
if (srna == &RNA_SpaceClipEditor) return SPACE_CLIP;
return SPACE_EMPTY;
}

View File

@@ -2423,9 +2423,9 @@ static uiBlock *block_create_autorun_warning(struct bContext *C, struct ARegion
uiItemS(layout);
PointerRNA userpref_ptr;
RNA_pointer_create(NULL, &RNA_UserPreferencesSystem, &U, &userpref_ptr);
uiItemR(layout, &userpref_ptr, "use_scripts_auto_execute", 0, IFACE_("Permanently allow execution of scripts"), ICON_NONE);
PointerRNA pref_ptr;
RNA_pointer_create(NULL, &RNA_PreferencesSystem, &U, &pref_ptr);
uiItemR(layout, &pref_ptr, "use_scripts_auto_execute", 0, IFACE_("Permanently allow execution of scripts"), ICON_NONE);
uiItemS(layout);