forked from bartvdbraak/blender
-Shuffled some user prefs around to make better use of the available space in Preferences.
-Temporarily disabled the Themes tab until we figure out how to manage themes properly.
This commit is contained in:
parent
a08b16436d
commit
a133907c92
@ -195,7 +195,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
|
||||
sub1 = sub.column()
|
||||
sub1.itemL(text="Keyframing:")
|
||||
sub1.itemR(edit, "use_visual_keying")
|
||||
sub1.itemR(edit, "new_interpolation_type")
|
||||
sub1.itemR(edit, "new_interpolation_type", text="New F-Curves")
|
||||
sub1.itemS()
|
||||
sub1.itemR(edit, "auto_keying_enable", text="Auto Keyframing")
|
||||
sub2 = sub1.column()
|
||||
@ -203,13 +203,16 @@ class USERPREF_PT_edit(bpy.types.Panel):
|
||||
sub2.row().itemR(edit, "auto_keying_mode", expand=True)
|
||||
sub2.itemR(edit, "auto_keyframe_insert_available", text="Only Insert Available")
|
||||
sub2.itemR(edit, "auto_keyframe_insert_needed", text="Only Insert Needed")
|
||||
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
|
||||
sub1.itemL(text="Undo:")
|
||||
sub1.itemR(edit, "global_undo")
|
||||
sub1.itemR(edit, "undo_steps", text="Steps")
|
||||
sub1.itemR(edit, "undo_memory_limit", text="Memory Limit")
|
||||
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
@ -218,7 +221,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
|
||||
sub = col.split(percentage=0.85)
|
||||
|
||||
sub1 = sub.column()
|
||||
sub1.itemL(text="Duplicate:")
|
||||
sub1.itemL(text="Duplicate Data:")
|
||||
sub1.itemR(edit, "duplicate_mesh", text="Mesh")
|
||||
sub1.itemR(edit, "duplicate_surface", text="Surface")
|
||||
sub1.itemR(edit, "duplicate_curve", text="Curve")
|
||||
@ -246,63 +249,64 @@ class USERPREF_PT_system(bpy.types.Panel):
|
||||
|
||||
userpref = context.user_preferences
|
||||
system = userpref.system
|
||||
lan = userpref.language
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = col.split(percentage=0.85)
|
||||
sub = col.split(percentage=0.9)
|
||||
|
||||
sub1 = sub.column()
|
||||
sub1.itemR(system, "emulate_numpad")
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
|
||||
#Weight Colors
|
||||
sub1.itemL(text="Weight Colors:")
|
||||
sub1.itemR(system, "use_weight_color_range", text="Use Custom Range")
|
||||
|
||||
sub2 = sub1.column()
|
||||
sub2.active = system.use_weight_color_range
|
||||
sub2.template_color_ramp(system, "weight_color_range", expand=True)
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
|
||||
#sequencer
|
||||
sub1.itemL(text="Sequencer:")
|
||||
sub1.itemR(system, "prefetch_frames")
|
||||
sub1.itemR(system, "memory_cache_limit")
|
||||
|
||||
col = split.column()
|
||||
sub = col.split(percentage=0.85)
|
||||
|
||||
sub1 = sub .column()
|
||||
#System
|
||||
sub1.itemL(text="System:")
|
||||
sub1.itemR(lan, "dpi")
|
||||
sub1.itemR(system, "auto_run_python_scripts")
|
||||
sub1.itemL(text="General:")
|
||||
sub1.itemR(system, "dpi")
|
||||
sub1.itemR(system, "frame_server_port")
|
||||
sub1.itemR(system, "filter_file_extensions")
|
||||
sub1.itemR(system, "hide_dot_files_datablocks")
|
||||
sub1.itemR(lan, "scrollback", text="Console Scrollback")
|
||||
sub1.itemR(system, "scrollback", text="Console Scrollback")
|
||||
sub1.itemR(system, "emulate_numpad")
|
||||
sub1.itemR(system, "auto_run_python_scripts")
|
||||
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
|
||||
sub1.itemL(text="Sound:")
|
||||
sub1.itemR(system, "audio_device")
|
||||
sub1.row().itemR(system, "audio_device", expand=True)
|
||||
sub2 = sub1.column()
|
||||
sub2.active = system.audio_device != 'AUDIO_DEVICE_NULL'
|
||||
sub2.itemR(system, "enable_all_codecs")
|
||||
sub2.itemR(system, "game_sound")
|
||||
sub2.itemR(system, "audio_channels")
|
||||
sub2.itemR(system, "audio_mixing_buffer")
|
||||
sub2.itemR(system, "audio_sample_rate")
|
||||
sub2.itemR(system, "audio_sample_format")
|
||||
sub2.itemR(system, "audio_channels", text="Channels")
|
||||
sub2.itemR(system, "audio_mixing_buffer", text="Mixing Buffer")
|
||||
sub2.itemR(system, "audio_sample_rate", text="Sample Rate")
|
||||
sub2.itemR(system, "audio_sample_format", text="Sample Format")
|
||||
|
||||
col = split.column()
|
||||
sub = col.split(percentage=0.85)
|
||||
sub = col.split(percentage=0.9)
|
||||
|
||||
sub1 = sub .column()
|
||||
sub1.itemL(text="Weight Colors:")
|
||||
sub1.itemR(system, "use_weight_color_range", text="Use Custom Range")
|
||||
sub2 = sub1.column()
|
||||
sub2.active = system.use_weight_color_range
|
||||
sub2.template_color_ramp(system, "weight_color_range", expand=True)
|
||||
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
|
||||
sub1.itemR(system, "language")
|
||||
sub1.itemL(text="Translate:")
|
||||
sub1.itemR(system, "translate_tooltips", text="Tooltips")
|
||||
sub1.itemR(system, "translate_buttons", text="Labels")
|
||||
sub1.itemR(system, "translate_toolbox", text="Toolbox")
|
||||
|
||||
sub1.itemS()
|
||||
|
||||
sub1.itemR(system, "use_textured_fonts")
|
||||
|
||||
col = split.column()
|
||||
sub = col.split(percentage=0.9)
|
||||
|
||||
sub1 = sub.column()
|
||||
#OpenGL
|
||||
|
||||
sub1.itemL(text="OpenGL:")
|
||||
sub1.itemR(system, "clip_alpha", slider=True)
|
||||
sub1.itemR(system, "use_mipmaps")
|
||||
@ -313,6 +317,14 @@ class USERPREF_PT_system(bpy.types.Panel):
|
||||
sub1.itemR(system, "texture_time_out", text="Time Out")
|
||||
sub1.itemR(system, "texture_collection_rate", text="Collection Rate")
|
||||
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
sub1.itemS()
|
||||
|
||||
sub1.itemL(text="Sequencer:")
|
||||
sub1.itemR(system, "prefetch_frames")
|
||||
sub1.itemR(system, "memory_cache_limit")
|
||||
|
||||
class USERPREF_PT_filepaths(bpy.types.Panel):
|
||||
__space_type__ = 'USER_PREFERENCES'
|
||||
__label__ = "File Paths"
|
||||
@ -328,7 +340,7 @@ class USERPREF_PT_filepaths(bpy.types.Panel):
|
||||
userpref = context.user_preferences
|
||||
paths = userpref.filepaths
|
||||
|
||||
split = layout.split()
|
||||
split = layout.split(percentage=0.6)
|
||||
|
||||
col = split.column()
|
||||
col.itemL(text="File Paths:")
|
||||
@ -366,6 +378,8 @@ class USERPREF_PT_filepaths(bpy.types.Panel):
|
||||
sub2.itemR(paths, "use_relative_paths")
|
||||
sub2.itemR(paths, "compress_file")
|
||||
sub2.itemR(paths, "load_ui")
|
||||
sub2.itemR(paths, "filter_file_extensions")
|
||||
sub2.itemR(paths, "hide_dot_files_datablocks")
|
||||
sub2.itemS()
|
||||
sub2.itemS()
|
||||
sub2.itemL(text="Auto Save:")
|
||||
@ -377,36 +391,6 @@ class USERPREF_PT_filepaths(bpy.types.Panel):
|
||||
sub3.enabled = paths.auto_save_temporary_files
|
||||
sub3.itemR(paths, "auto_save_time", text="Timer (mins)")
|
||||
|
||||
class USERPREF_PT_language(bpy.types.Panel):
|
||||
__space_type__ = 'USER_PREFERENCES'
|
||||
__label__ = "Language"
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
userpref = context.user_preferences
|
||||
return (userpref.active_section == 'LANGUAGE_COLORS')
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
userpref = context.user_preferences
|
||||
lan = userpref.language
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
|
||||
col.itemR(lan, "language")
|
||||
col.itemL(text="Translate:")
|
||||
col.itemR(lan, "translate_tooltips", text="Tooltips")
|
||||
col.itemR(lan, "translate_buttons", text="Labels")
|
||||
col.itemR(lan, "translate_toolbox", text="Toolbox")
|
||||
col.itemS()
|
||||
col.itemS()
|
||||
col.itemR(lan, "use_textured_fonts")
|
||||
|
||||
col = split.column()
|
||||
|
||||
|
||||
bpy.types.register(USERPREF_HT_header)
|
||||
bpy.types.register(USERPREF_MT_view)
|
||||
bpy.types.register(USERPREF_PT_tabs)
|
||||
@ -414,5 +398,4 @@ bpy.types.register(USERPREF_PT_view)
|
||||
bpy.types.register(USERPREF_PT_edit)
|
||||
bpy.types.register(USERPREF_PT_system)
|
||||
bpy.types.register(USERPREF_PT_filepaths)
|
||||
bpy.types.register(USERPREF_PT_language)
|
||||
|
||||
|
@ -109,11 +109,6 @@ static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr)
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->data);
|
||||
}
|
||||
|
||||
static PointerRNA rna_UserDef_language_get(PointerRNA *ptr)
|
||||
{
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesLanguage, ptr->data);
|
||||
}
|
||||
|
||||
static PointerRNA rna_UserDef_filepaths_get(PointerRNA *ptr)
|
||||
{
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesFilePaths, ptr->data);
|
||||
@ -2121,11 +2116,83 @@ static void rna_def_userdef_system(BlenderRNA *brna)
|
||||
{USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails."},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
/* hardcoded here, could become dynamic somehow */
|
||||
static EnumPropertyItem language_items[] = {
|
||||
{0, "ENGLISH", 0, "English", ""},
|
||||
{1, "JAPANESE", 0, "Japanese", ""},
|
||||
{2, "DUTCH", 0, "Dutch", ""},
|
||||
{3, "ITALIAN", 0, "Italian", ""},
|
||||
{4, "GERMAN", 0, "German", ""},
|
||||
{5, "FINNISH", 0, "Finnish", ""},
|
||||
{6, "SWEDISH", 0, "Swedish", ""},
|
||||
{7, "FRENCH", 0, "French", ""},
|
||||
{8, "SPANISH", 0, "Spanish", ""},
|
||||
{9, "CATALAN", 0, "Catalan", ""},
|
||||
{10, "CZECH", 0, "Czech", ""},
|
||||
{11, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese", ""},
|
||||
{12, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese", ""},
|
||||
{13, "RUSSIAN", 0, "Russian", ""},
|
||||
{14, "CROATIAN", 0, "Croatian", ""},
|
||||
{15, "SERBIAN", 0, "Serbian", ""},
|
||||
{16, "UKRAINIAN", 0, "Ukrainian", ""},
|
||||
{17, "POLISH", 0, "Polish", ""},
|
||||
{18, "ROMANIAN", 0, "Romanian", ""},
|
||||
{19, "ARABIC", 0, "Arabic", ""},
|
||||
{20, "BULGARIAN", 0, "Bulgarian", ""},
|
||||
{21, "GREEK", 0, "Greek", ""},
|
||||
{22, "KOREAN", 0, "Korean", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
|
||||
RNA_def_struct_sdna(srna, "UserDef");
|
||||
RNA_def_struct_nested(brna, srna, "UserPreferences");
|
||||
RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings.");
|
||||
|
||||
/* Language */
|
||||
|
||||
prop= RNA_def_property(srna, "international_fonts", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
|
||||
RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "dpi");
|
||||
RNA_def_property_range(prop, 48, 128);
|
||||
RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_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.");
|
||||
|
||||
/* Language Selection */
|
||||
|
||||
prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, language_items);
|
||||
RNA_def_property_ui_text(prop, "Language", "Language use for translation.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "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 Tooltips.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "translate_buttons", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_BUTTONS);
|
||||
RNA_def_property_ui_text(prop, "Translate Buttons", "Translate button labels.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "translate_toolbox", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_MENUS);
|
||||
RNA_def_property_ui_text(prop, "Translate Toolbox", "Translate toolbox menu.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
|
||||
RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts.");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
/* System & OpenGL */
|
||||
|
||||
prop= RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
|
||||
@ -2174,14 +2241,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_SOUND);
|
||||
RNA_def_property_ui_text(prop, "Game Sound", "Enables sounds to be played in games.");
|
||||
|
||||
prop= RNA_def_property(srna, "filter_file_extensions", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
|
||||
RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window.");
|
||||
|
||||
prop= RNA_def_property(srna, "hide_dot_files_datablocks", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
|
||||
RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot(.*)");
|
||||
|
||||
prop= RNA_def_property(srna, "clip_alpha", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
@ -2262,6 +2321,14 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
|
||||
RNA_def_struct_nested(brna, srna, "UserPreferences");
|
||||
RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files.");
|
||||
|
||||
prop= RNA_def_property(srna, "hide_dot_files_datablocks", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
|
||||
RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot(.*)");
|
||||
|
||||
prop= RNA_def_property(srna, "filter_file_extensions", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
|
||||
RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window.");
|
||||
|
||||
prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS);
|
||||
RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector.");
|
||||
@ -2340,10 +2407,9 @@ void RNA_def_userdef(BlenderRNA *brna)
|
||||
static EnumPropertyItem user_pref_sections[] = {
|
||||
{0, "VIEW_CONTROLS", 0, "View", ""},
|
||||
{1, "EDIT_METHODS", 0, "Editing", ""},
|
||||
{2, "LANGUAGE_COLORS", 0, "Language", ""},
|
||||
{2, "FILE_PATHS", 0, "File", ""},
|
||||
{3, "SYSTEM_OPENGL", 0, "System", ""},
|
||||
{4, "FILE_PATHS", 0, "File", ""},
|
||||
{5, "THEMES", 0, "Themes", ""},
|
||||
// {4, "THEMES", 0, "Themes", ""}, // Leave this out until we figure out a way to manage themes in the prefs.
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
rna_def_userdef_dothemes(brna);
|
||||
@ -2381,12 +2447,6 @@ void RNA_def_userdef(BlenderRNA *brna)
|
||||
RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL);
|
||||
RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data.");
|
||||
|
||||
prop= RNA_def_property(srna, "language", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
||||
RNA_def_property_struct_type(prop, "UserPreferencesLanguage");
|
||||
RNA_def_property_pointer_funcs(prop, "rna_UserDef_language_get", NULL, NULL);
|
||||
RNA_def_property_ui_text(prop, "Language & Font", "User interface translation settings.");
|
||||
|
||||
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");
|
||||
@ -2401,7 +2461,6 @@ void RNA_def_userdef(BlenderRNA *brna)
|
||||
|
||||
rna_def_userdef_view(brna);
|
||||
rna_def_userdef_edit(brna);
|
||||
rna_def_userdef_language(brna);
|
||||
rna_def_userdef_filepaths(brna);
|
||||
rna_def_userdef_system(brna);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user