Resized the preferences window to 800 px. This makes proper space for the header...
authorWilliam Reynish <william@reynish.com>
Fri, 24 Jul 2009 14:30:40 +0000 (14:30 +0000)
committerWilliam Reynish <william@reynish.com>
Fri, 24 Jul 2009 14:30:40 +0000 (14:30 +0000)
Also added weight paint ramp.

release/ui/space_info.py
source/blender/editors/screen/screen_ops.c
source/blender/makesrna/intern/rna_userdef.c

index c99d7603d0ee3407d3c25e48adc4e079a35e1343..5ff8609f32df6b7a818414338fa182d89693e4c7 100644 (file)
@@ -195,7 +195,7 @@ class INFO_PT_view(bpy.types.Panel):
 
                split = layout.split()
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                colsplitcol.itemL(text="Display:")
                colsplitcol.itemR(view, "tooltips")
@@ -220,7 +220,7 @@ class INFO_PT_view(bpy.types.Panel):
                
                
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                colsplitcol.itemL(text="View Manipulation:")
                colsplitcol.itemR(view, "auto_depth")
@@ -241,7 +241,7 @@ class INFO_PT_view(bpy.types.Panel):
                colsplitcol.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
                
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                colsplitcol.itemL(text="Mouse Buttons:")
                colsplitcol.itemR(view, "left_mouse_button_select")
@@ -264,7 +264,7 @@ class INFO_PT_view(bpy.types.Panel):
 
                
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                #manipulator
                colsplitcol.itemR(view, "use_manipulator")
@@ -301,7 +301,7 @@ class INFO_PT_edit(bpy.types.Panel):
                
                split = layout.split()
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
 
                colsplitcol.itemL(text="Materials:")
@@ -322,7 +322,7 @@ class INFO_PT_edit(bpy.types.Panel):
                colsplitcol.itemR(edit, "drag_immediately")
                
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                colsplitcol.itemL(text="Snap:")
                colsplitcol.itemR(edit, "snap_translate", text="Translate")
@@ -341,7 +341,7 @@ class INFO_PT_edit(bpy.types.Panel):
                
                
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
 
                colsplitcol.itemL(text="Keyframing:")
@@ -367,7 +367,7 @@ class INFO_PT_edit(bpy.types.Panel):
                colsplitcol.itemS()
 
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                colsplitcol.itemL(text="Duplicate:")
                colsplitcol.itemR(edit, "duplicate_mesh", text="Mesh")
@@ -399,7 +399,7 @@ class INFO_PT_system(bpy.types.Panel):
                
                split = layout.split()
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                colsplitcol.itemR(system, "emulate_numpad")     
                colsplitcol.itemS()
@@ -407,7 +407,10 @@ class INFO_PT_system(bpy.types.Panel):
                #Weight Colors
                colsplitcol.itemL(text="Weight Colors:")
                colsplitcol.itemR(system, "use_weight_color_range", text="Use Custom Range")
-               colsplitcol.itemR(system, "weight_color_range")
+               
+               colsub = colsplitcol.column()
+               colsub.active = system.use_weight_color_range
+               colsub.template_color_ramp(system.weight_color_range, expand=True)
                colsplitcol.itemS()
                colsplitcol.itemS()
                
@@ -417,7 +420,7 @@ class INFO_PT_system(bpy.types.Panel):
                colsplitcol.itemR(system, "memory_cache_limit")
                
                col = split.column()    
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                #System
                colsplitcol.itemL(text="System:")
@@ -431,7 +434,7 @@ class INFO_PT_system(bpy.types.Panel):
                colsplitcol.itemR(system, "audio_mixing_buffer")
                
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.85)
                colsplitcol = colsplit.column()
                #OpenGL
                colsplitcol.itemL(text="OpenGL:")
@@ -441,7 +444,7 @@ class INFO_PT_system(bpy.types.Panel):
                row = colsplitcol.row()
                row.itemR(system, "window_draw_method", expand=True)
                colsplitcol.itemL(text="Textures:")
-               colsplitcol.itemR(system, "gl_texture_limit", text="Limit")
+               colsplitcol.itemR(system, "gl_texture_limit", text="Limit Size")
                colsplitcol.itemR(system, "texture_time_out", text="Time Out")
                colsplitcol.itemR(system, "texture_collection_rate", text="Collection Rate")            
                
@@ -461,46 +464,48 @@ class INFO_PT_filepaths(bpy.types.Panel):
                
                split = layout.split()
                col = split.column()
-               col.itemR(paths, "use_relative_paths")
-               col.itemR(paths, "compress_file")
-               col.itemR(paths, "fonts_directory")
-               col.itemR(paths, "textures_directory")
-               col.itemR(paths, "texture_plugin_directory")
-               col.itemR(paths, "sequence_plugin_directory")
-               col.itemR(paths, "render_output_directory")
-               col.itemR(paths, "python_scripts_directory")
-               col.itemR(paths, "sounds_directory")
-               col.itemR(paths, "temporary_directory")
-
-class INFO_PT_autosave(bpy.types.Panel):
-       __space_type__ = "USER_PREFERENCES"
-       __label__ = "Auto Save"
-       __no_header__ = True
-
-       def poll(self, context):
-               userpref = context.user_preferences
-               return (userpref.active_section == 'AUTO_SAVE')
-
-       def draw(self, context):
-               layout = self.layout
-               userpref = context.user_preferences
-               save = userpref.autosave
+               col.itemL(text="File Paths:")
+               splitcol = col.split(percentage=0.3)
                
-               split = layout.split()
-               col = split.column()
-               colsplit = col.split(percentage=0.8)
-               colsplitcol = colsplit.column()
-               colsplitcol.itemR(save, "save_version")
-               colsplitcol.itemR(save, "recent_files")
-               colsplitcol.itemR(save, "save_preview_images")
+               splitcol.itemL(text="Fonts:")
+               splitcol.itemR(paths, "fonts_directory", text="")
+               splitcol = col.split(percentage=0.3)
+               splitcol.itemL(text="Textures:")
+               splitcol.itemR(paths, "textures_directory", text="")
+               splitcol = col.split(percentage=0.3)
+               splitcol.itemL(text="Texture Plugins:")
+               splitcol.itemR(paths, "texture_plugin_directory", text="")
+               splitcol = col.split(percentage=0.3)
+               splitcol.itemL(text="Sequence Plugins:")
+               splitcol.itemR(paths, "sequence_plugin_directory", text="")
+               splitcol = col.split(percentage=0.3)
+               splitcol.itemL(text="Render Output:")
+               splitcol.itemR(paths, "render_output_directory", text="")
+               splitcol = col.split(percentage=0.3)
+               splitcol.itemL(text="Scripts:")
+               splitcol.itemR(paths, "python_scripts_directory", text="")
+               splitcol = col.split(percentage=0.3)
+               splitcol.itemL(text="Sounds:")
+               splitcol.itemR(paths, "sounds_directory", text="")
+               splitcol = col.split(percentage=0.3)
+               splitcol.itemL(text="Temp:")
+               splitcol.itemR(paths, "temporary_directory", text="")
                
                col = split.column()
-               colsplit = col.split(percentage=0.8)
+               colsplit = col.split(percentage=0.2)
+               colsplitcol = colsplit.column()
                colsplitcol = colsplit.column()
-               colsplitcol.itemR(save, "auto_save_temporary_files")
+               colsplitcol.itemL(text="Save & Load:")
+               colsplitcol.itemR(paths, "use_relative_paths")
+               colsplitcol.itemR(paths, "compress_file")
+               colsplitcol.itemL(text="Auto Save:")
+               colsplitcol.itemR(paths, "save_version")
+               colsplitcol.itemR(paths, "recent_files")
+               colsplitcol.itemR(paths, "save_preview_images")
+               colsplitcol.itemR(paths, "auto_save_temporary_files")
                colsub = colsplitcol.column()
-               colsub.enabled = save.auto_save_temporary_files
-               colsub.itemR(save, "auto_save_time")
+               colsub.enabled = paths.auto_save_temporary_files
+               colsub.itemR(paths, "auto_save_time")
 
 class INFO_PT_language(bpy.types.Panel):
        __space_type__ = "USER_PREFERENCES"
@@ -553,7 +558,6 @@ bpy.types.register(INFO_PT_view)
 bpy.types.register(INFO_PT_edit)
 bpy.types.register(INFO_PT_system)
 bpy.types.register(INFO_PT_filepaths)
-bpy.types.register(INFO_PT_autosave)
 bpy.types.register(INFO_PT_language)
 bpy.types.register(INFO_PT_bottombar)
 
index b11ba3efa7318e28cb58dcb6477be26d0061fb1b..09af626da4a0bbc08a5e548c25a2d467f7b55cc2 100644 (file)
@@ -2982,7 +2982,7 @@ static int userpref_show_invoke(bContext *C, wmOperator *unused, wmEvent *event)
        rcti rect;
        int sizex, sizey;
        
-       sizex= 640;
+       sizex= 800;
        sizey= 480;
        
        /* some magic to calculate postition */
index f9aa27fcdbd8f8cf65ad336c08f749438934d152..3344489e3896e2002208389a64d7403b77fe342d 100644 (file)
@@ -101,11 +101,6 @@ static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr)
        return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->data);
 }
 
-static PointerRNA rna_UserDef_autosave_get(PointerRNA *ptr)
-{
-       return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesAutosave, ptr->data);
-}
-
 static PointerRNA rna_UserDef_language_get(PointerRNA *ptr)
 {
        return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesLanguage, ptr->data);
@@ -1721,8 +1716,8 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
        StructRNA *srna;
 
        static EnumPropertyItem auto_key_modes[] = {
-               {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace Keys", ""},
-               {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace Keys", ""},
+               {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
+               {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
                {0, NULL, 0, NULL, NULL}};
 
        static EnumPropertyItem new_interpolation_types[] = {
@@ -1956,55 +1951,20 @@ static void rna_def_userdef_language(BlenderRNA *brna)
        RNA_def_property_update(prop, NC_WINDOW, NULL);
 }
 
-static void rna_def_userdef_autosave(BlenderRNA *brna)
-{
-       PropertyRNA *prop;
-       StructRNA *srna;
-
-       /* Autosave  */
-
-       srna= RNA_def_struct(brna, "UserPreferencesAutosave", NULL);
-       RNA_def_struct_sdna(srna, "UserDef");
-       RNA_def_struct_nested(brna, srna, "UserPreferences");
-       RNA_def_struct_ui_text(srna, "Auto Save", "Automatic backup file settings.");
-
-       prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "versions");
-       RNA_def_property_range(prop, 0, 32);
-       RNA_def_property_ui_text(prop, "Save Versions", "The number of old versions to maintain in the current directory, when manually saving.");
-
-       prop= RNA_def_property(srna, "auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
-       RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files.");
-
-       prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "savetime");
-       RNA_def_property_range(prop, 1, 60);
-       RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves.");
-
-       prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
-       RNA_def_property_range(prop, 0, 30);
-       RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember.");
-
-       prop= RNA_def_property(srna, "save_preview_images", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS);
-       RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file.");
-}
-
 static void rna_def_userdef_system(BlenderRNA *brna)
 {
        PropertyRNA *prop;
        StructRNA *srna;
 
        static EnumPropertyItem gl_texture_clamp_items[] = {
-               {0, "GL_CLAMP_OFF", 0, "GL Texture Clamp Off", ""},
-               {8192, "GL_CLAMP_8192", 0, "GL Texture Clamp 8192", ""},
-               {4096, "GL_CLAMP_4096", 0, "GL Texture Clamp 4096", ""},
-               {2048, "GL_CLAMP_2048", 0, "GL Texture Clamp 2048", ""},
-               {1024, "GL_CLAMP_1024", 0, "GL Texture Clamp 1024", ""},
-               {512, "GL_CLAMP_512", 0, "GL Texture Clamp 512", ""},
-               {256, "GL_CLAMP_256", 0, "GL Texture Clamp 256", ""},
-               {128, "GL_CLAMP_128", 0, "GL Texture Clamp 128", ""},
+               {0, "GL_CLAMP_OFF", 0, "Off", ""},
+               {8192, "GL_CLAMP_8192", 0, "8192", ""},
+               {4096, "GL_CLAMP_4096", 0, "4096", ""},
+               {2048, "GL_CLAMP_2048", 0, "2048", ""},
+               {1024, "GL_CLAMP_1024", 0, "1024", ""},
+               {512, "GL_CLAMP_512", 0, "512", ""},
+               {256, "GL_CLAMP_256", 0, "256", ""},
+               {128, "GL_CLAMP_128", 0, "128", ""},
                {0, NULL, 0, NULL, NULL}};
 
        static EnumPropertyItem audio_mixing_samples_items[] = {
@@ -2174,8 +2134,33 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
        prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
        RNA_def_property_string_sdna(prop, NULL, "tempdir");
        RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files.");
+
+       /* Autosave  */
+
+       prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "versions");
+       RNA_def_property_range(prop, 0, 32);
+       RNA_def_property_ui_text(prop, "Save Versions", "The number of old versions to maintain in the current directory, when manually saving.");
+
+       prop= RNA_def_property(srna, "auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
+       RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files.");
+
+       prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "savetime");
+       RNA_def_property_range(prop, 1, 60);
+       RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves.");
+
+       prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
+       RNA_def_property_range(prop, 0, 30);
+       RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember.");
+
+       prop= RNA_def_property(srna, "save_preview_images", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS);
+       RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file.");
 }
 
+
 void RNA_def_userdef(BlenderRNA *brna)
 {
        StructRNA *srna;
@@ -2185,10 +2170,9 @@ void RNA_def_userdef(BlenderRNA *brna)
                {0, "VIEW_CONTROLS", 0, "View", ""},
                {1, "EDIT_METHODS", 0, "Editing", ""},
                {2, "LANGUAGE_COLORS", 0, "Language", ""},
-               {3, "AUTO_SAVE", 0, "Auto Save", ""},
-               {4, "SYSTEM_OPENGL", 0, "System & OpenGL", ""},
-               {5, "FILE_PATHS", 0, "File Paths", ""},
-               {6, "THEMES", 0, "Themes", ""},
+               {3, "SYSTEM_OPENGL", 0, "System", ""},
+               {4, "FILE_PATHS", 0, "File", ""},
+               {5, "THEMES", 0, "Themes", ""},
                {0, NULL, 0, NULL, NULL}};
 
        rna_def_userdef_dothemes(brna);
@@ -2224,11 +2208,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, "autosave", PROP_POINTER, PROP_NEVER_NULL);
-       RNA_def_property_struct_type(prop, "UserPreferencesAutosave");
-       RNA_def_property_pointer_funcs(prop, "rna_UserDef_autosave_get", NULL, NULL);
-       RNA_def_property_ui_text(prop, "Auto Save", "Automatic backup file settings.");
-
        prop= RNA_def_property(srna, "language", PROP_POINTER, PROP_NEVER_NULL);
        RNA_def_property_struct_type(prop, "UserPreferencesLanguage");
        RNA_def_property_pointer_funcs(prop, "rna_UserDef_language_get", NULL, NULL);
@@ -2246,7 +2225,6 @@ void RNA_def_userdef(BlenderRNA *brna)
        
        rna_def_userdef_view(brna);
        rna_def_userdef_edit(brna);
-       rna_def_userdef_autosave(brna);
        rna_def_userdef_language(brna);
        rna_def_userdef_filepaths(brna);
        rna_def_userdef_system(brna);