2.5:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 18 Aug 2009 12:58:51 +0000 (12:58 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 18 Aug 2009 12:58:51 +0000 (12:58 +0000)
* Split Info and User preferences into two separate spaces.
* Renamed Buttons Window to Properties also in RNA identifiers.

53 files changed:
release/io/engine_render_pov.py
release/ui/buttons_data_armature.py
release/ui/buttons_data_bone.py
release/ui/buttons_data_camera.py
release/ui/buttons_data_curve.py
release/ui/buttons_data_empty.py
release/ui/buttons_data_lamp.py
release/ui/buttons_data_lattice.py
release/ui/buttons_data_mesh.py
release/ui/buttons_data_metaball.py
release/ui/buttons_data_modifier.py
release/ui/buttons_data_text.py
release/ui/buttons_game.py
release/ui/buttons_material.py
release/ui/buttons_object.py
release/ui/buttons_object_constraint.py
release/ui/buttons_particle.py
release/ui/buttons_physics_cloth.py
release/ui/buttons_physics_field.py
release/ui/buttons_physics_fluid.py
release/ui/buttons_physics_smoke.py
release/ui/buttons_physics_softbody.py
release/ui/buttons_scene.py
release/ui/buttons_texture.py
release/ui/buttons_world.py
release/ui/space_buttons.py
release/ui/space_info.py
release/ui/space_time.py
release/ui/space_userpref.py [new file with mode: 0644]
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/intern/context.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/Makefile
source/blender/editors/SConscript
source/blender/editors/include/ED_space_api.h
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/resources.c
source/blender/editors/screen/area.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_info/info_intern.h
source/blender/editors/space_userpref/Makefile [new file with mode: 0644]
source/blender/editors/space_userpref/SConscript [new file with mode: 0644]
source/blender/editors/space_userpref/space_userpref.c [new file with mode: 0644]
source/blender/editors/space_userpref/userpref_intern.h [new file with mode: 0644]
source/blender/editors/space_userpref/userpref_ops.c [new file with mode: 0644]
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/windowmanager/intern/wm_window.c

index ba9e7377535217be891bca3bcfd224308c08621a..97337ebc8539380dd9b6a6cc63f0d6e302bbab68 100644 (file)
@@ -791,7 +791,7 @@ for member in dir(buttons_material):
 del buttons_material
 
 class RenderButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "scene"
        # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
index 681b8ba89544cd370d3f68131a2517f0a5aee623..9b640776a9e75afc6ef381fb96edc3212b958833 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
  
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
index e05b64e5e115dde8739b52079d095e9573e7639c..1eb0937789251f9d2ad7c1cac69a49e8766dc253 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
  
 class BoneButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "bone"
        
index 51d8c8c61e678ba40479930dcf99f5c934b8cb99..f2fa4207ec89f7b73dc433ffe3706f759b10506d 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
 
index d0e1756986dda8812e50dd82860033fff684b278..35d557afe32fe30298c7acca6806bea26e39d474 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
index 827fe02e411a5ec21a04792888625b5665a36f55..2a2f51ed292f512fcfa8c686aea528e4c9cd9f94 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
index 6fb021802f0f046682431cca12270af4b1a266db..a00bb23d5b5cc5b5327b45339088840aaf7e0489 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
@@ -319,4 +319,4 @@ bpy.types.register(DATA_PT_falloff_curve)
 bpy.types.register(DATA_PT_area)
 bpy.types.register(DATA_PT_spot)
 bpy.types.register(DATA_PT_shadow)
-bpy.types.register(DATA_PT_sunsky)
\ No newline at end of file
+bpy.types.register(DATA_PT_sunsky)
index 3766b9ff1a5d60acd7285418c43a5e0de4d136b8..5d8a07c7d44142e3980cdf9aaa37687d981a6b99 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
index d6ca0817edcd497d6f4c4deee26c848d30c12fa6..b681218a8fe27d01cfb2082ef6f5aba0fd23f792 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
index a3781705799f74a87a0b22faf7e1bcb1fcb9ad7c..e31c3d7fcd0482996f204bb9a9a0b20757bab4b9 100644 (file)
@@ -1,7 +1,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
index 6dd11457ec9e411666d701a92b6d64d154e8bbc7..436baa540d490fc306818e8e456d1bc318dcee7f 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "modifier"
        
index 757e61307dfe5aca725a21b4011e2865a7ccb106..754d6fcda392b003021cadaa03a610167adb966f 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class DataButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "data"
        
index b662254f1bbd95f8ef02109b2c53c877035f31b2..3158536585e221b6c1491e88f98ee156dcec438a 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
  
 class PhysicsButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "physics"
 
@@ -171,7 +171,7 @@ bpy.types.register(PHYSICS_PT_game_physics)
 bpy.types.register(PHYSICS_PT_game_collision_bounds)
 
 class SceneButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "scene"
 
@@ -276,7 +276,7 @@ bpy.types.register(SCENE_PT_game_player)
 bpy.types.register(SCENE_PT_game_stereo)
 
 class WorldButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "world"
 
index ff587d47668ace337ead3aacf74126136e66daa3..b971a6789260b551bebb387701dc4cddd5a93504 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class MaterialButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "material"
        # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
index 5bd4bbbd6bdffa8ee0d6950f7cd7e7af85150b57..6b6d583e2caa0f75faa4a2304d47b606d77526fa 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class ObjectButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "object"
 
index 505fa57fa0b96e9125a942cd760547d80ece1d96..c67d6e40cfb60fa288d650e8897b0d45b606947e 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class ConstraintButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "constraint"
 
index 07ad3b7841ca651b89bcfc9ce13d6a9c12737136..8bc84b734bf87099a50d9eab53824a653865e88c 100644 (file)
@@ -11,7 +11,7 @@ def particle_panel_poll(context):
        return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
 
 class ParticleButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "particle"
 
index d18df9e5003553d578c2c1702d1c9670b60ae1c7..f34077c758a88dfb3e5ac0940f7c48b08ff2419b 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class PhysicButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "physics"
 
index 02802779c040be0b5937b9e22d677e0317992092..fb29dd92833a471ab761ac9045817d4675484697 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class PhysicButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "physics"
 
index 0ad87120a7f359aa57578e019770392b8f1ce4b6..304d419b388263a57d7337eb9911412164f86e93 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class PhysicButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "physics"
 
index a225aedbe236f5c4ac09999ad8b384ac125d1137..7e2395216c0a6cb2bdf7bb2891e8c413e1095c33 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class PhysicButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "physics"
 
@@ -156,4 +156,4 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
 
 bpy.types.register(PHYSICS_PT_smoke)
 bpy.types.register(PHYSICS_PT_smoke_highres)
-bpy.types.register(PHYSICS_PT_smoke_groups)
\ No newline at end of file
+bpy.types.register(PHYSICS_PT_smoke_groups)
index d0d3475c11b598329503634dbef4440d1dc411df..2613f9e80323ab6525d8870dcf6ba28f9f0aa00c 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class PhysicButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "physics"
 
index 12200eb26ca104bbe44b9be6f87b5b681f26bd36..e9ee97468e82d86487ced4df8639806059c88226 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class RenderButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "scene"
        # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
index a1b89bec0cee1f7dcb5eda69c48dda41e59413b0..18c836f9080fe7abd20dc4d6be45f02e40bde50e 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class TextureButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "texture"
        
index 7840a4946f25b290b44e5c115d4f1f53842656f1..599f45d160b686a2628551c3550b91cfe071b063 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class WorldButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __region_type__ = "WINDOW"
        __context__ = "world"
        # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
index b444913809d89418c84cd55d0dbc8698c6d62bf5..cf1c385e3dc6ffade68834ffbe02fdb9ef098dfd 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class Buttons_HT_header(bpy.types.Header):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
 
        def draw(self, context):
                layout = self.layout
@@ -21,7 +21,7 @@ class Buttons_HT_header(bpy.types.Header):
                row.itemR(scene, "current_frame")
 
 class Buttons_MT_view(bpy.types.Menu):
-       __space_type__ = "BUTTONS_WINDOW"
+       __space_type__ = "PROPERTIES"
        __label__ = "View"
 
        def draw(self, context):
index af2dac02ccb773bf49a9e9a68fa618fa01c7c5d2..12005ea3ecb6f9ad0f29f3483fa1587f27013db9 100644 (file)
@@ -2,7 +2,7 @@
 import bpy
 
 class INFO_HT_header(bpy.types.Header):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
 
        def draw(self, context):
                layout = self.layout
@@ -34,7 +34,7 @@ class INFO_HT_header(bpy.types.Header):
                layout.template_running_jobs()
                        
 class INFO_MT_file(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "File"
 
        def draw(self, context):
@@ -70,14 +70,14 @@ class INFO_MT_file(bpy.types.Menu):
                layout.itemO("wm.exit_blender", text="Quit")
 
 class INFO_MT_file_import(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "Import"
 
        def draw(self, context):
                layout = self.layout
 
 class INFO_MT_file_export(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "Export"
 
        def draw(self, context):
@@ -86,7 +86,7 @@ class INFO_MT_file_export(bpy.types.Menu):
                layout.itemO("export.ply", text="PLY")
 
 class INFO_MT_file_external_data(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "External Data"
 
        def draw(self, context):
@@ -103,7 +103,7 @@ class INFO_MT_file_external_data(bpy.types.Menu):
                layout.itemO("file.find_missing_files")
 
 class INFO_MT_add(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "Add"
 
        def draw(self, context):
@@ -129,7 +129,7 @@ class INFO_MT_add(bpy.types.Menu):
                layout.item_enumO("OBJECT_OT_object_add", "type", 'LAMP', icon='ICON_OUTLINER_OB_LAMP')
 
 class INFO_MT_game(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "Game"
 
        def draw(self, context):
@@ -138,7 +138,7 @@ class INFO_MT_game(bpy.types.Menu):
                layout.itemO("view3d.game_start")
 
 class INFO_MT_render(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "Render"
 
        def draw(self, context):
@@ -154,7 +154,7 @@ class INFO_MT_render(bpy.types.Menu):
                layout.itemO("screen.render_view_show")
 
 class INFO_MT_help(bpy.types.Menu):
-       __space_type__ = "USER_PREFERENCES"
+       __space_type__ = "INFO"
        __label__ = "Help"
 
        def draw(self, context):
@@ -170,397 +170,6 @@ class INFO_MT_help(bpy.types.Menu):
                layout.itemO("help.developer_community")
                layout.itemO("help.user_community")
 
-class INFO_PT_tabs(bpy.types.Panel):
-       __space_type__ = "USER_PREFERENCES"
-       __show_header__ = False
-
-       def draw(self, context):
-               layout = self.layout
-               
-               userpref = context.user_preferences
-
-               layout.itemR(userpref, "active_section", expand=True)
-
-class INFO_PT_view(bpy.types.Panel):
-       __space_type__ = "USER_PREFERENCES"
-       __label__ = "View"
-       __show_header__ = False
-
-       def poll(self, context):
-               userpref = context.user_preferences
-               return (userpref.active_section == 'VIEW_CONTROLS')
-
-       def draw(self, context):
-               layout = self.layout
-               
-               userpref = context.user_preferences
-               view = userpref.view
-
-               split = layout.split()
-               
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               sub1.itemL(text="Display:")
-               sub1.itemR(view, "tooltips")
-               sub1.itemR(view, "display_object_info", text="Object Info")
-               sub1.itemR(view, "use_large_cursors")
-               sub1.itemR(view, "show_view_name", text="View Name")
-               sub1.itemR(view, "show_playback_fps", text="Playback FPS")
-               sub1.itemR(view, "global_scene")
-               sub1.itemR(view, "pin_floating_panels")
-               sub1.itemR(view, "object_center_size")
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemR(view, "show_mini_axis")
-               sub2 = sub1.column()
-               sub2.enabled = view.show_mini_axis
-               sub2.itemR(view, "mini_axis_size")
-               sub2.itemR(view, "mini_axis_brightness")
-               
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               sub1.itemL(text="View Manipulation:")
-               sub1.itemR(view, "auto_depth")
-               sub1.itemR(view, "global_pivot")
-               sub1.itemR(view, "zoom_to_mouse")
-               sub1.itemR(view, "rotate_around_selection")
-               sub1.itemS()
-               sub1.itemL(text="Zoom Style:")
-               sub1.row().itemR(view, "viewport_zoom_style", expand=True)
-               sub1.itemL(text="Orbit Style:")
-               sub1.row().itemR(view, "view_rotation", expand=True)
-               sub1.itemR(view, "perspective_orthographic_switch")
-               sub1.itemR(view, "smooth_view")
-               sub1.itemR(view, "rotation_angle")
-               sub1.itemS()
-               sub1.itemL(text="NDOF Device:")
-               sub1.itemR(view, "ndof_pan_speed", text="Pan Speed")
-               sub1.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
-               
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               sub1.itemL(text="Mouse Buttons:")
-               sub1.itemR(view, "left_mouse_button_select")
-               sub1.itemR(view, "right_mouse_button_select")
-               sub1.itemR(view, "emulate_3_button_mouse")
-               sub1.itemR(view, "use_middle_mouse_paste")
-               sub1.itemR(view, "middle_mouse_rotate")
-               sub1.itemR(view, "middle_mouse_pan")
-               sub1.itemR(view, "wheel_invert_zoom")
-               sub1.itemR(view, "wheel_scroll_lines")
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemL(text="Menus:")
-               sub1.itemR(view, "open_mouse_over")
-               sub1.itemL(text="Menu Open Delay:")
-               sub1.itemR(view, "open_toplevel_delay", text="Top Level")
-               sub1.itemR(view, "open_sublevel_delay", text="Sub Level")
-
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               #manipulator
-               sub1.itemR(view, "use_manipulator")
-               sub2 = sub1.column()
-               sub2.enabled = view.use_manipulator
-               sub2.itemR(view, "manipulator_size", text="Size")
-               sub2.itemR(view, "manipulator_handle_size", text="Handle Size")
-               sub2.itemR(view, "manipulator_hotspot", text="Hotspot") 
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemS()                    
-               sub1.itemL(text="Toolbox:")
-               sub1.itemR(view, "use_column_layout")
-               sub1.itemL(text="Open Toolbox Delay:")
-               sub1.itemR(view, "open_left_mouse_delay", text="Hold LMB")
-               sub1.itemR(view, "open_right_mouse_delay", text="Hold RMB")
-
-class INFO_PT_edit(bpy.types.Panel):
-       __space_type__ = "USER_PREFERENCES"
-       __label__ = "Edit"
-       __show_header__ = False
-
-       def poll(self, context):
-               userpref = context.user_preferences
-               return (userpref.active_section == 'EDIT_METHODS')
-
-       def draw(self, context):
-               layout = self.layout
-               
-               userpref = context.user_preferences
-               edit = userpref.edit
-               view = userpref.view
-               
-               split = layout.split()
-               
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               sub1.itemL(text="Materials:")
-               sub1.itemR(edit, "material_linked_object", text="Linked to Object")
-               sub1.itemR(edit, "material_linked_obdata", text="Linked to ObData")
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemL(text="New Objects:")
-               sub1.itemR(edit, "enter_edit_mode")
-               sub1.itemR(edit, "align_to_view")
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemL(text="Transform:")
-               sub1.itemR(edit, "drag_immediately")
-
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               sub1.itemL(text="Snap:")
-               sub1.itemR(edit, "snap_translate", text="Translate")
-               sub1.itemR(edit, "snap_rotate", text="Rotate")
-               sub1.itemR(edit, "snap_scale", text="Scale")
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemS()
-               sub1.itemL(text="Grease Pencil:")
-               sub1.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
-               sub1.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
-               sub1.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
-               # sub1.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
-               sub1.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
-               
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               sub1.itemL(text="Keyframing:")
-               sub1.itemR(edit, "use_visual_keying")
-               sub1.itemR(edit, "new_interpolation_type")
-               sub1.itemS()
-               sub1.itemR(edit, "auto_keying_enable", text="Auto Keyframing")
-               sub2 = sub1.column()
-               sub2.enabled = edit.auto_keying_enable
-               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()
-
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               sub1.itemL(text="Duplicate:")
-               sub1.itemR(edit, "duplicate_mesh", text="Mesh")
-               sub1.itemR(edit, "duplicate_surface", text="Surface")
-               sub1.itemR(edit, "duplicate_curve", text="Curve")
-               sub1.itemR(edit, "duplicate_text", text="Text")
-               sub1.itemR(edit, "duplicate_metaball", text="Metaball")
-               sub1.itemR(edit, "duplicate_armature", text="Armature")
-               sub1.itemR(edit, "duplicate_lamp", text="Lamp")
-               sub1.itemR(edit, "duplicate_material", text="Material")
-               sub1.itemR(edit, "duplicate_texture", text="Texture")
-               sub1.itemR(edit, "duplicate_ipo", text="F-Curve")
-               sub1.itemR(edit, "duplicate_action", text="Action")
-               
-class INFO_PT_system(bpy.types.Panel):
-       __space_type__ = "USER_PREFERENCES"
-       __label__ = "System"
-       __show_header__ = False
-
-       def poll(self, context):
-               userpref = context.user_preferences
-               return (userpref.active_section == 'SYSTEM_OPENGL')
-
-       def draw(self, context):
-               layout = self.layout
-               
-               userpref = context.user_preferences
-               system = userpref.system
-               lan = userpref.language
-               
-               split = layout.split()
-               
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               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.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.itemS()
-               sub1.itemS()
-               sub1.itemL(text="Sound:")
-               sub1.itemR(system, "audio_device")
-               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")
-               
-               col = split.column()
-               sub = col.split(percentage=0.85)
-               
-               sub1 = sub.column()
-               #OpenGL
-               sub1.itemL(text="OpenGL:")
-               sub1.itemR(system, "clip_alpha", slider=True)
-               sub1.itemR(system, "use_mipmaps")
-               sub1.itemL(text="Window Draw Method:")
-               sub1.row().itemR(system, "window_draw_method", expand=True)
-               sub1.itemL(text="Textures:")
-               sub1.itemR(system, "gl_texture_limit", text="Limit Size")
-               sub1.itemR(system, "texture_time_out", text="Time Out")
-               sub1.itemR(system, "texture_collection_rate", text="Collection Rate")           
-               
-class INFO_PT_filepaths(bpy.types.Panel):
-       __space_type__ = "USER_PREFERENCES"
-       __label__ = "File Paths"
-       __show_header__ = False
-
-       def poll(self, context):
-               userpref = context.user_preferences
-               return (userpref.active_section == 'FILE_PATHS')
-
-       def draw(self, context):
-               layout = self.layout
-               
-               userpref = context.user_preferences
-               paths = userpref.filepaths
-               
-               split = layout.split()
-               
-               col = split.column()
-               col.itemL(text="File Paths:")
-               sub = col.split(percentage=0.3)
-               
-               sub.itemL(text="Fonts:")
-               sub.itemR(paths, "fonts_directory", text="")
-               sub = col.split(percentage=0.3)
-               sub.itemL(text="Textures:")
-               sub.itemR(paths, "textures_directory", text="")
-               sub = col.split(percentage=0.3)
-               sub.itemL(text="Texture Plugins:")
-               sub.itemR(paths, "texture_plugin_directory", text="")
-               sub = col.split(percentage=0.3)
-               sub.itemL(text="Sequence Plugins:")
-               sub.itemR(paths, "sequence_plugin_directory", text="")
-               sub = col.split(percentage=0.3)
-               sub.itemL(text="Render Output:")
-               sub.itemR(paths, "render_output_directory", text="")
-               sub = col.split(percentage=0.3)
-               sub.itemL(text="Scripts:")
-               sub.itemR(paths, "python_scripts_directory", text="")
-               sub = col.split(percentage=0.3)
-               sub.itemL(text="Sounds:")
-               sub.itemR(paths, "sounds_directory", text="")
-               sub = col.split(percentage=0.3)
-               sub.itemL(text="Temp:")
-               sub.itemR(paths, "temporary_directory", text="")
-               
-               col = split.column()
-               sub = col.split(percentage=0.2)
-               sub1 = sub.column()
-               sub2 = sub.column()
-               sub2.itemL(text="Save & Load:")
-               sub2.itemR(paths, "use_relative_paths")
-               sub2.itemR(paths, "compress_file")
-               sub2.itemL(text="Auto Save:")
-               sub2.itemR(paths, "save_version")
-               sub2.itemR(paths, "recent_files")
-               sub2.itemR(paths, "save_preview_images")
-               sub2.itemR(paths, "auto_save_temporary_files")
-               sub3 = sub2.column()
-               sub3.enabled = paths.auto_save_temporary_files
-               sub3.itemR(paths, "auto_save_time")
-
-class INFO_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.itemR(lan, "translate_tooltips")
-               col.itemR(lan, "translate_buttons")
-               col.itemR(lan, "translate_toolbox")
-               col.itemR(lan, "use_textured_fonts")
-               
-class INFO_PT_bottombar(bpy.types.Panel):
-       __space_type__ = "USER_PREFERENCES"
-       __label__ = " "
-       __show_header__ = False
-
-       def draw(self, context):
-               layout = self.layout
-               userpref = context.user_preferences
-       
-               split = layout.split(percentage=0.8)
-               split.itemL(text="")
-               layout.operator_context = "EXEC_AREA"
-               split.itemO("wm.save_homefile", text="Save As Default")
-
 bpy.types.register(INFO_HT_header)
 bpy.types.register(INFO_MT_file)
 bpy.types.register(INFO_MT_file_import)
@@ -570,13 +179,6 @@ bpy.types.register(INFO_MT_add)
 bpy.types.register(INFO_MT_game)
 bpy.types.register(INFO_MT_render)
 bpy.types.register(INFO_MT_help)
-bpy.types.register(INFO_PT_tabs)
-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_language)
-bpy.types.register(INFO_PT_bottombar)
 
 # Help operators
 
@@ -631,3 +233,4 @@ bpy.ops.add(HELP_OT_blender_website)
 bpy.ops.add(HELP_OT_blender_eshop)
 bpy.ops.add(HELP_OT_developer_community)
 bpy.ops.add(HELP_OT_user_community)
+
index 45fdeb04ead4350f277491faf5bb8b7de8ec208a..785d11a8fc5e377c5cae683a1a0c863965cc2bcd 100644 (file)
@@ -23,8 +23,6 @@ class TIME_HT_header(bpy.types.Header):
 
                layout.itemR(scene, "use_preview_range", text="PR", toggle=True)
                
-               layout.itemS()
-               
                row = layout.row(align=True)
                if not scene.use_preview_range:
                        row.itemR(scene, "start_frame", text="Start")
@@ -33,10 +31,7 @@ class TIME_HT_header(bpy.types.Header):
                        row.itemR(scene, "preview_range_start_frame", text="Start")
                        row.itemR(scene, "preview_range_end_frame", text="End")
                
-               layout.itemS()
                layout.itemR(scene, "current_frame", text="")
-               
-               layout.itemS()
 
                row = layout.row(align=True)
                row.item_booleanO("screen.frame_jump", "end", False, text="", icon='ICON_REW')
@@ -51,8 +46,6 @@ class TIME_HT_header(bpy.types.Header):
                row.item_booleanO("screen.keyframe_jump", "next", True, text="", icon='ICON_NEXT_KEYFRAME')
                row.item_booleanO("screen.frame_jump", "end", True, text="", icon='ICON_FF')
                
-               layout.itemS()
-               
                layout.itemR(rd, "sync_audio", text="", toggle=True, icon='ICON_SPEAKER')
                
                layout.itemS()
diff --git a/release/ui/space_userpref.py b/release/ui/space_userpref.py
new file mode 100644 (file)
index 0000000..95054ef
--- /dev/null
@@ -0,0 +1,418 @@
+
+import bpy
+
+class USERPREF_HT_header(bpy.types.Header):
+       __space_type__ = "USER_PREFERENCES"
+
+       def draw(self, context):
+               layout = self.layout
+               layout.template_header(menus=False)
+                       
+class USERPREF_MT_view(bpy.types.Menu):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "View"
+
+       def draw(self, context):
+               layout = self.layout
+
+class USERPREF_PT_tabs(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __show_header__ = False
+
+       def draw(self, context):
+               layout = self.layout
+               
+               userpref = context.user_preferences
+
+               layout.itemR(userpref, "active_section", expand=True)
+
+class USERPREF_PT_view(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "View"
+       __show_header__ = False
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'VIEW_CONTROLS')
+
+       def draw(self, context):
+               layout = self.layout
+               
+               userpref = context.user_preferences
+               view = userpref.view
+
+               split = layout.split()
+               
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               sub1.itemL(text="Display:")
+               sub1.itemR(view, "tooltips")
+               sub1.itemR(view, "display_object_info", text="Object Info")
+               sub1.itemR(view, "use_large_cursors")
+               sub1.itemR(view, "show_view_name", text="View Name")
+               sub1.itemR(view, "show_playback_fps", text="Playback FPS")
+               sub1.itemR(view, "global_scene")
+               sub1.itemR(view, "pin_floating_panels")
+               sub1.itemR(view, "object_center_size")
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemR(view, "show_mini_axis")
+               sub2 = sub1.column()
+               sub2.enabled = view.show_mini_axis
+               sub2.itemR(view, "mini_axis_size")
+               sub2.itemR(view, "mini_axis_brightness")
+               
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               sub1.itemL(text="View Manipulation:")
+               sub1.itemR(view, "auto_depth")
+               sub1.itemR(view, "global_pivot")
+               sub1.itemR(view, "zoom_to_mouse")
+               sub1.itemR(view, "rotate_around_selection")
+               sub1.itemS()
+               sub1.itemL(text="Zoom Style:")
+               sub1.row().itemR(view, "viewport_zoom_style", expand=True)
+               sub1.itemL(text="Orbit Style:")
+               sub1.row().itemR(view, "view_rotation", expand=True)
+               sub1.itemR(view, "perspective_orthographic_switch")
+               sub1.itemR(view, "smooth_view")
+               sub1.itemR(view, "rotation_angle")
+               sub1.itemS()
+               sub1.itemL(text="NDOF Device:")
+               sub1.itemR(view, "ndof_pan_speed", text="Pan Speed")
+               sub1.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
+               
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               sub1.itemL(text="Mouse Buttons:")
+               sub1.itemR(view, "left_mouse_button_select")
+               sub1.itemR(view, "right_mouse_button_select")
+               sub1.itemR(view, "emulate_3_button_mouse")
+               sub1.itemR(view, "use_middle_mouse_paste")
+               sub1.itemR(view, "middle_mouse_rotate")
+               sub1.itemR(view, "middle_mouse_pan")
+               sub1.itemR(view, "wheel_invert_zoom")
+               sub1.itemR(view, "wheel_scroll_lines")
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemL(text="Menus:")
+               sub1.itemR(view, "open_mouse_over")
+               sub1.itemL(text="Menu Open Delay:")
+               sub1.itemR(view, "open_toplevel_delay", text="Top Level")
+               sub1.itemR(view, "open_sublevel_delay", text="Sub Level")
+
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               #manipulator
+               sub1.itemR(view, "use_manipulator")
+               sub2 = sub1.column()
+               sub2.enabled = view.use_manipulator
+               sub2.itemR(view, "manipulator_size", text="Size")
+               sub2.itemR(view, "manipulator_handle_size", text="Handle Size")
+               sub2.itemR(view, "manipulator_hotspot", text="Hotspot") 
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemS()                    
+               sub1.itemL(text="Toolbox:")
+               sub1.itemR(view, "use_column_layout")
+               sub1.itemL(text="Open Toolbox Delay:")
+               sub1.itemR(view, "open_left_mouse_delay", text="Hold LMB")
+               sub1.itemR(view, "open_right_mouse_delay", text="Hold RMB")
+
+class USERPREF_PT_edit(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "Edit"
+       __show_header__ = False
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'EDIT_METHODS')
+
+       def draw(self, context):
+               layout = self.layout
+               
+               userpref = context.user_preferences
+               edit = userpref.edit
+               view = userpref.view
+               
+               split = layout.split()
+               
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               sub1.itemL(text="Materials:")
+               sub1.itemR(edit, "material_linked_object", text="Linked to Object")
+               sub1.itemR(edit, "material_linked_obdata", text="Linked to ObData")
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemL(text="New Objects:")
+               sub1.itemR(edit, "enter_edit_mode")
+               sub1.itemR(edit, "align_to_view")
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemL(text="Transform:")
+               sub1.itemR(edit, "drag_immediately")
+
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               sub1.itemL(text="Snap:")
+               sub1.itemR(edit, "snap_translate", text="Translate")
+               sub1.itemR(edit, "snap_rotate", text="Rotate")
+               sub1.itemR(edit, "snap_scale", text="Scale")
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemS()
+               sub1.itemL(text="Grease Pencil:")
+               sub1.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
+               sub1.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
+               sub1.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
+               # sub1.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
+               sub1.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
+               
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               sub1.itemL(text="Keyframing:")
+               sub1.itemR(edit, "use_visual_keying")
+               sub1.itemR(edit, "new_interpolation_type")
+               sub1.itemS()
+               sub1.itemR(edit, "auto_keying_enable", text="Auto Keyframing")
+               sub2 = sub1.column()
+               sub2.enabled = edit.auto_keying_enable
+               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()
+
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               sub1.itemL(text="Duplicate:")
+               sub1.itemR(edit, "duplicate_mesh", text="Mesh")
+               sub1.itemR(edit, "duplicate_surface", text="Surface")
+               sub1.itemR(edit, "duplicate_curve", text="Curve")
+               sub1.itemR(edit, "duplicate_text", text="Text")
+               sub1.itemR(edit, "duplicate_metaball", text="Metaball")
+               sub1.itemR(edit, "duplicate_armature", text="Armature")
+               sub1.itemR(edit, "duplicate_lamp", text="Lamp")
+               sub1.itemR(edit, "duplicate_material", text="Material")
+               sub1.itemR(edit, "duplicate_texture", text="Texture")
+               sub1.itemR(edit, "duplicate_ipo", text="F-Curve")
+               sub1.itemR(edit, "duplicate_action", text="Action")
+               
+class USERPREF_PT_system(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "System"
+       __show_header__ = False
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'SYSTEM_OPENGL')
+
+       def draw(self, context):
+               layout = self.layout
+               
+               userpref = context.user_preferences
+               system = userpref.system
+               lan = userpref.language
+               
+               split = layout.split()
+               
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               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.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.itemS()
+               sub1.itemS()
+               sub1.itemL(text="Sound:")
+               sub1.itemR(system, "audio_device")
+               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")
+               
+               col = split.column()
+               sub = col.split(percentage=0.85)
+               
+               sub1 = sub.column()
+               #OpenGL
+               sub1.itemL(text="OpenGL:")
+               sub1.itemR(system, "clip_alpha", slider=True)
+               sub1.itemR(system, "use_mipmaps")
+               sub1.itemL(text="Window Draw Method:")
+               sub1.row().itemR(system, "window_draw_method", expand=True)
+               sub1.itemL(text="Textures:")
+               sub1.itemR(system, "gl_texture_limit", text="Limit Size")
+               sub1.itemR(system, "texture_time_out", text="Time Out")
+               sub1.itemR(system, "texture_collection_rate", text="Collection Rate")           
+               
+class USERPREF_PT_filepaths(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "File Paths"
+       __show_header__ = False
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'FILE_PATHS')
+
+       def draw(self, context):
+               layout = self.layout
+               
+               userpref = context.user_preferences
+               paths = userpref.filepaths
+               
+               split = layout.split()
+               
+               col = split.column()
+               col.itemL(text="File Paths:")
+               sub = col.split(percentage=0.3)
+               
+               sub.itemL(text="Fonts:")
+               sub.itemR(paths, "fonts_directory", text="")
+               sub = col.split(percentage=0.3)
+               sub.itemL(text="Textures:")
+               sub.itemR(paths, "textures_directory", text="")
+               sub = col.split(percentage=0.3)
+               sub.itemL(text="Texture Plugins:")
+               sub.itemR(paths, "texture_plugin_directory", text="")
+               sub = col.split(percentage=0.3)
+               sub.itemL(text="Sequence Plugins:")
+               sub.itemR(paths, "sequence_plugin_directory", text="")
+               sub = col.split(percentage=0.3)
+               sub.itemL(text="Render Output:")
+               sub.itemR(paths, "render_output_directory", text="")
+               sub = col.split(percentage=0.3)
+               sub.itemL(text="Scripts:")
+               sub.itemR(paths, "python_scripts_directory", text="")
+               sub = col.split(percentage=0.3)
+               sub.itemL(text="Sounds:")
+               sub.itemR(paths, "sounds_directory", text="")
+               sub = col.split(percentage=0.3)
+               sub.itemL(text="Temp:")
+               sub.itemR(paths, "temporary_directory", text="")
+               
+               col = split.column()
+               sub = col.split(percentage=0.2)
+               sub1 = sub.column()
+               sub2 = sub.column()
+               sub2.itemL(text="Save & Load:")
+               sub2.itemR(paths, "use_relative_paths")
+               sub2.itemR(paths, "compress_file")
+               sub2.itemL(text="Auto Save:")
+               sub2.itemR(paths, "save_version")
+               sub2.itemR(paths, "recent_files")
+               sub2.itemR(paths, "save_preview_images")
+               sub2.itemR(paths, "auto_save_temporary_files")
+               sub3 = sub2.column()
+               sub3.enabled = paths.auto_save_temporary_files
+               sub3.itemR(paths, "auto_save_time")
+
+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.itemR(lan, "translate_tooltips")
+               col.itemR(lan, "translate_buttons")
+               col.itemR(lan, "translate_toolbox")
+               col.itemR(lan, "use_textured_fonts")
+               
+class USERPREF_PT_bottombar(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = " "
+       __show_header__ = False
+
+       def draw(self, context):
+               layout = self.layout
+               userpref = context.user_preferences
+       
+               split = layout.split(percentage=0.8)
+               split.itemL(text="")
+               layout.operator_context = "EXEC_AREA"
+               split.itemO("wm.save_homefile", text="Save As Default")
+
+bpy.types.register(USERPREF_HT_header)
+bpy.types.register(USERPREF_MT_view)
+bpy.types.register(USERPREF_PT_tabs)
+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)
+bpy.types.register(USERPREF_PT_bottombar)
+
index 035b7e2e5b9423f62323ff3425d9f169bb59bd9f..09e13c2930e4fc7ba7edaf4a5cd5144a81bf395a 100644 (file)
@@ -152,6 +152,7 @@ struct SpaceLogic *CTX_wm_space_logic(const bContext *C);
 struct SpaceIpo *CTX_wm_space_graph(const bContext *C);
 struct SpaceAction *CTX_wm_space_action(const bContext *C);
 struct SpaceInfo *CTX_wm_space_info(const bContext *C);
+struct SpaceUserPref *CTX_wm_space_userpref(const bContext *C);
 
 void CTX_wm_manager_set(bContext *C, struct wmWindowManager *wm);
 void CTX_wm_window_set(bContext *C, struct wmWindow *win);
index c38b994849aabe179030cc1d660fd507d3be966c..bbfe077c15ece69c67ca83fd7810b0ba0973b626 100644 (file)
@@ -338,6 +338,13 @@ struct SpaceInfo *CTX_wm_space_info(const bContext *C)
        return NULL;
 }
 
+struct SpaceUserPref *CTX_wm_space_userpref(const bContext *C)
+{
+       if(C->wm.area && C->wm.area->spacetype==SPACE_USERPREF)
+               return C->wm.area->spacedata.first;
+       return NULL;
+}
+
 void CTX_wm_manager_set(bContext *C, wmWindowManager *wm)
 {
        C->wm.manager= wm;
index 9d059af9887f0aacae539e277cc7f0d1fc1ce1ff..62ec1b71938b511d9f44b03fc66325a83120ecf7 100644 (file)
@@ -2023,6 +2023,10 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
                                else if(sl->spacetype==SPACE_CONSOLE) {
                                        writestruct(wd, DATA, "SpaceConsole", 1, sl);
                                }
+                               else if(sl->spacetype==SPACE_USERPREF) {
+                                       writestruct(wd, DATA, "SpaceUserPref", 1, sl);
+                               }
+
                                sl= sl->next;
                        }
                }
index dbd0ca779aa53d89934f9659049845ff2dc39a79..bbbb3fb985f48c471a8d212edf30d899ff41ec89 100644 (file)
@@ -65,5 +65,6 @@ DIRS = armature \
   space_text \
   space_sequencer \
   space_logic \
+  space_userpref \
 
 include nan_subdirs.mk
index 0a13082faaf7122b8d5155a6cf0bafe7bd1ed39d..05f17dae1a196480761e4e1688f7933724484021 100644 (file)
@@ -32,6 +32,7 @@ SConscript(['datafiles/SConscript',
                        'space_sequencer/SConscript',
                        'space_logic/SConscript',
                        'space_console/SConscript',
+                       'space_userpref/SConscript',
                        'transform/SConscript',
                        'screen/SConscript',
                        'sculpt_paint/SConscript',
index efaf0f56f920bd0df3869b5e30e6a2d353badcb3..04b6be3bcaa8cdbfd4a32eda533e10d958607e7b 100644 (file)
@@ -52,6 +52,7 @@ void ED_spacetype_text(void);
 void ED_spacetype_sequencer(void);
 void ED_spacetype_logic(void);
 void ED_spacetype_console(void);
+void ED_spacetype_userpref(void);
 
 /* calls for instancing and freeing spacetype static data 
    called in WM_init_exit */
index efff5b8f39cf02419925b0413d8663bd7266f36a..05001109b5300734528ed00ee0536c47e368ff21 100644 (file)
@@ -104,7 +104,7 @@ static int panel_aligned(ScrArea *sa, ARegion *ar)
                SpaceButs *sbuts= sa->spacedata.first;
                return sbuts->align;
        }
-       else if(sa->spacetype==SPACE_INFO && ar->regiontype == RGN_TYPE_WINDOW)
+       else if(sa->spacetype==SPACE_USERPREF && ar->regiontype == RGN_TYPE_WINDOW)
                return BUT_VERTICAL;
        else if(sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
                return BUT_VERTICAL;
index 297e22610a6cad4516727b076e72e8cdc5a8118f..5b51d898235dc74e73d0a73db25b7e008cffa7ad 100644 (file)
@@ -150,6 +150,9 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
                        case SPACE_INFO:
                                ts= &btheme->tinfo;
                                break;
+                       case SPACE_USERPREF:
+                               ts= &btheme->tuserpref;
+                               break;
                        case SPACE_TIME:
                                ts= &btheme->ttime;
                                break;
@@ -402,6 +405,7 @@ static void ui_theme_init_new(bTheme *btheme)
        ui_theme_init_new_do(&btheme->ttime);
        ui_theme_init_new_do(&btheme->tnode);
        ui_theme_init_new_do(&btheme->tlogic);
+       ui_theme_init_new_do(&btheme->tuserpref);
        
 }
 
@@ -583,6 +587,10 @@ void ui_theme_init_userdef(void)
        btheme->tinfo= btheme->tv3d;
        SETCOLF(btheme->tinfo.back,     0.45, 0.45, 0.45, 1.0);
 
+       /* space user preferences */
+       btheme->tuserpref= btheme->tv3d;
+       SETCOLF(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
+
        /* space sound */
        btheme->tsnd= btheme->tv3d;
        SETCOLF(btheme->tsnd.back,      0.45, 0.45, 0.45, 1.0);
@@ -1233,6 +1241,7 @@ void init_userdef_do_versions(void)
                        }
 
                        SETCOLF(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0);
+                       SETCOLF(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
                }
        }
        
index ff84542a7cde667db1c588d7fbe49feb21758f6e..ea1541a4e026ee0f098597505fb04cdbf24a7693 100644 (file)
@@ -1066,8 +1066,9 @@ static char *windowtype_pup(void)
                   "|%l"
                   
                   "|Properties %x4"
-                  "|User Preferences %x7"
                   "|Outliner %x3"
+                  "|User Preferences %x19"
+                  "|Info%x7"
                                   
                   "|%l"
                   "|%l"
index 5c33b64894745c2a24a3e50b6466ca56c2f399c0..041e6a09323e147c8032aa8da08279174a5f0156 100644 (file)
@@ -77,6 +77,7 @@ void ED_spacetypes_init(void)
        ED_spacetype_sequencer();
        ED_spacetype_logic();
        ED_spacetype_console();
+       ED_spacetype_userpref();
 //     ...
        
        /* register operator types for screen and all spaces */
index 6b89532cdafdb5f823ef0df20406a70029507148..530500cfafa2624cad19cbfca2ca4699e731e8d9 100644 (file)
@@ -311,7 +311,6 @@ static int buttons_context_path_brush(const bContext *C, ButsContextPath *path)
        ToolSettings *ts;
        Brush *br= NULL;
        PointerRNA *ptr= &path->ptr[path->len-1];
-       const Object *obact = CTX_data_active_object(C);
 
        /* if we already have a (pinned) brush, we're done */
        if(RNA_struct_is_a(ptr->type, &RNA_Brush)) {
@@ -333,7 +332,7 @@ static int buttons_context_path_brush(const bContext *C, ButsContextPath *path)
                }
        }
 
-       /* no path to a world possible */
+       /* no path to a brush possible */
        return 0;
 }
 
index e52efe8508dfb89c959e7c8c073014fee5e17774..057f35a24873678df5a0a78bd009199b7a5fce53 100644 (file)
@@ -916,7 +916,7 @@ static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event)
        uiPopupMenu *pup;
        uiLayout *layout;
 
-       RNA_pointer_create(&sc->id, &RNA_SpaceButtonsWindow, sbuts, &ptr);
+       RNA_pointer_create(&sc->id, &RNA_SpaceProperties, sbuts, &ptr);
 
        pup= uiPupMenuBegin(C, "Align", 0);
        layout= uiPupMenuLayout(pup);
index 519364b58d965f281fb696a1dc304f00f74a064d..070b627af07d81db44d9932dd2ef189b09d5a4c6 100644 (file)
@@ -32,9 +32,6 @@
 
 struct wmOperatorType;
 
-/* info_header.c */
-void info_header_buttons(const bContext *C, ARegion *ar);
-
 void FILE_OT_pack_all(struct wmOperatorType *ot);
 void FILE_OT_unpack_all(struct wmOperatorType *ot);
 void FILE_OT_make_paths_relative(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_userpref/Makefile b/source/blender/editors/space_userpref/Makefile
new file mode 100644 (file)
index 0000000..be7206f
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. 
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2007 Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL LICENSE BLOCK *****
+#
+# Makes module object directory and bounces make to subdirectories.
+
+LIBNAME = ed_userpref
+DIR = $(OCGDIR)/blender/$(LIBNAME)
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+
+CPPFLAGS += -I$(NAN_GLEW)/include
+CPPFLAGS += -I$(OPENGL_HEADERS)
+
+# not very neat....
+CPPFLAGS += -I../../windowmanager
+CPPFLAGS += -I../../blenloader
+CPPFLAGS += -I../../blenkernel
+CPPFLAGS += -I../../blenlib
+CPPFLAGS += -I../../makesdna
+CPPFLAGS += -I../../makesrna
+CPPFLAGS += -I../../imbuf
+CPPFLAGS += -I../../python
+CPPFLAGS += -I../../blenfont
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+
+# own include 
+
+CPPFLAGS += -I../include 
diff --git a/source/blender/editors/space_userpref/SConscript b/source/blender/editors/space_userpref/SConscript
new file mode 100644 (file)
index 0000000..1b808a5
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+Import ('env')
+
+sources = env.Glob('*.c')
+
+incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf ../../blenfont'
+incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
+
+defs = []
+
+if env['WITH_BF_GAMEENGINE']:
+       defs.append('GAMEBLENDER=1')
+
+env.BlenderLib ( 'bf_editors_space_userpref', sources, Split(incs), defs, libtype=['core'], priority=[70] )
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
new file mode 100644 (file)
index 0000000..8c9d723
--- /dev/null
@@ -0,0 +1,188 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_space_types.h"
+#include "DNA_screen_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+
+#include "BKE_context.h"
+#include "BKE_screen.h"
+
+#include "ED_space_api.h"
+#include "ED_screen.h"
+
+#include "BIF_gl.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "userpref_intern.h"   // own include
+
+/* ******************** default callbacks for userpref space ***************** */
+
+static SpaceLink *userpref_new(const bContext *C)
+{
+       ARegion *ar;
+       SpaceUserPref *spref;
+       
+       spref= MEM_callocN(sizeof(SpaceUserPref), "inituserpref");
+       spref->spacetype= SPACE_USERPREF;
+       
+       /* header */
+       ar= MEM_callocN(sizeof(ARegion), "header for userpref");
+       
+       BLI_addtail(&spref->regionbase, ar);
+       ar->regiontype= RGN_TYPE_HEADER;
+       ar->alignment= RGN_ALIGN_BOTTOM;
+       
+       /* main area */
+       ar= MEM_callocN(sizeof(ARegion), "main area for userpref");
+       
+       BLI_addtail(&spref->regionbase, ar);
+       ar->regiontype= RGN_TYPE_WINDOW;
+       
+       return (SpaceLink *)spref;
+}
+
+/* not spacelink itself */
+static void userpref_free(SpaceLink *sl)
+{      
+//     SpaceUserPref *spref= (SpaceUserPref*) sl;
+       
+}
+
+
+/* spacetype; init callback */
+static void userpref_init(struct wmWindowManager *wm, ScrArea *sa)
+{
+
+}
+
+static SpaceLink *userpref_duplicate(SpaceLink *sl)
+{
+       SpaceUserPref *sprefn= MEM_dupallocN(sl);
+       
+       /* clear or remove stuff from old */
+       
+       return (SpaceLink *)sprefn;
+}
+
+
+
+/* add handlers, stuff you only do once or on area/region changes */
+static void userpref_main_area_init(wmWindowManager *wm, ARegion *ar)
+{
+       ED_region_panels_init(wm, ar);
+}
+
+static void userpref_main_area_draw(const bContext *C, ARegion *ar)
+{
+       ED_region_panels(C, ar, 1, NULL, -1);
+}
+
+void userpref_operatortypes(void)
+{
+}
+
+void userpref_keymap(struct wmWindowManager *wm)
+{
+       
+}
+
+/* add handlers, stuff you only do once or on area/region changes */
+static void userpref_header_area_init(wmWindowManager *wm, ARegion *ar)
+{
+       ED_region_header_init(ar);
+}
+
+static void userpref_header_area_draw(const bContext *C, ARegion *ar)
+{
+       ED_region_header(C, ar);
+}
+
+static void userpref_main_area_listener(ARegion *ar, wmNotifier *wmn)
+{
+       /* context changes */
+}
+
+static void userpref_header_listener(ARegion *ar, wmNotifier *wmn)
+{
+       /* context changes */
+       switch(wmn->category) {
+               default:
+                       break;
+       }
+       
+}
+
+/* only called once, from space/spacetypes.c */
+void ED_spacetype_userpref(void)
+{
+       SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype userpref");
+       ARegionType *art;
+       
+       st->spaceid= SPACE_USERPREF;
+       
+       st->new= userpref_new;
+       st->free= userpref_free;
+       st->init= userpref_init;
+       st->duplicate= userpref_duplicate;
+       st->operatortypes= userpref_operatortypes;
+       st->keymap= userpref_keymap;
+       
+       /* regions: main window */
+       art= MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
+       art->regionid = RGN_TYPE_WINDOW;
+       art->init= userpref_main_area_init;
+       art->draw= userpref_main_area_draw;
+       art->listener= userpref_main_area_listener;
+       art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+
+       BLI_addhead(&st->regiontypes, art);
+       
+       /* regions: header */
+       art= MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
+       art->regionid = RGN_TYPE_HEADER;
+       art->minsizey= HEADERY;
+       art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+       art->listener= userpref_header_listener;
+       art->init= userpref_header_area_init;
+       art->draw= userpref_header_area_draw;
+       
+       BLI_addhead(&st->regiontypes, art);
+       
+       
+       BKE_spacetype_register(st);
+}
+
diff --git a/source/blender/editors/space_userpref/userpref_intern.h b/source/blender/editors/space_userpref/userpref_intern.h
new file mode 100644 (file)
index 0000000..596c267
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifndef ED_USERPREF_INTERN_H
+#define ED_USERPREF_INTERN_H
+
+/* internal exports only */
+
+#endif /* ED_USERPREF_INTERN_H */
+
diff --git a/source/blender/editors/space_userpref/userpref_ops.c b/source/blender/editors/space_userpref/userpref_ops.c
new file mode 100644 (file)
index 0000000..91a6651
--- /dev/null
@@ -0,0 +1,33 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "userpref_intern.h"
+
index 6eb5afbd6ac2cc92b9477e9150fc83f375b513df..37f28cfeaa6e10e484c46e3212cc3573cc6af736 100644 (file)
@@ -508,6 +508,13 @@ typedef struct SpaceConsole {
        
 } SpaceConsole;
 
+typedef struct SpaceUserPref {
+       SpaceLink *next, *prev;
+       ListBase regionbase;            /* storage of regions for inactive spaces */
+       int spacetype;
+
+       int pad;
+} SpaceUserPref;
 
 /* view3d  Now in DNA_view3d_types.h */
 
@@ -861,7 +868,8 @@ enum {
        SPACE_NODE,
        SPACE_LOGIC,
        SPACE_CONSOLE,
-       SPACEICONMAX = SPACE_CONSOLE
+       SPACE_USERPREF,
+       SPACEICONMAX = SPACE_USERPREF
 };
 
 #endif
index 019dad4eed501bbed2f760f9bd0aa87be19d7032..c2314e1e3a20a77d533407d1c5c757d89eec5d9f 100644 (file)
@@ -260,6 +260,7 @@ typedef struct bTheme {
        ThemeSpace ttime;
        ThemeSpace tnode;
        ThemeSpace tlogic;
+       ThemeSpace tuserpref;   
        
        /* 20 sets of bone colors for this theme */
        ThemeWireColor tarm[20];
index d5680ac77ba5a42302a83fb54953bef7221cfa97..e08bc734242aaa2c165484d5e003f8d6802024d8 100644 (file)
@@ -252,6 +252,7 @@ extern StructRNA RNA_MarbleTexture;
 extern StructRNA RNA_MaskModifier;
 extern StructRNA RNA_Material;
 extern StructRNA RNA_MaterialHalo;
+extern StructRNA RNA_MaterialPhysics;
 extern StructRNA RNA_MaterialRaytraceMirror;
 extern StructRNA RNA_MaterialRaytraceTransparency;
 extern StructRNA RNA_MaterialSlot;
@@ -304,8 +305,11 @@ extern StructRNA RNA_OperatorStrokeElement;
 extern StructRNA RNA_OrController;
 extern StructRNA RNA_OutflowFluidSettings;
 extern StructRNA RNA_PackedFile;
+extern StructRNA RNA_Paint;
 extern StructRNA RNA_Panel;
 extern StructRNA RNA_Particle;
+extern StructRNA RNA_ParticleBrush;
+extern StructRNA RNA_ParticleEdit;
 extern StructRNA RNA_ParticleFluidSettings;
 extern StructRNA RNA_ParticleHairKey;
 extern StructRNA RNA_ParticleInstanceModifier;
@@ -328,6 +332,7 @@ extern StructRNA RNA_RadarSensor;
 extern StructRNA RNA_RandomSensor;
 extern StructRNA RNA_RaySensor;
 extern StructRNA RNA_Region;
+extern StructRNA RNA_RenderEngine;
 extern StructRNA RNA_RenderLayer;
 extern StructRNA RNA_RenderPass;
 extern StructRNA RNA_RenderResult;
@@ -378,6 +383,9 @@ extern StructRNA RNA_ShapeKeyPoint;
 extern StructRNA RNA_ShrinkwrapConstraint;
 extern StructRNA RNA_ShrinkwrapModifier;
 extern StructRNA RNA_SimpleDeformModifier;
+extern StructRNA RNA_SmokeCollSettings;
+extern StructRNA RNA_SmokeDomainSettings;
+extern StructRNA RNA_SmokeFlowSettings;
 extern StructRNA RNA_SmokeModifier;
 extern StructRNA RNA_SmoothModifier;
 extern StructRNA RNA_SoftBodyModifier;
@@ -386,18 +394,22 @@ extern StructRNA RNA_Sound;
 extern StructRNA RNA_SoundSequence;
 extern StructRNA RNA_Space;
 extern StructRNA RNA_Space3DView;
-extern StructRNA RNA_SpaceButtonsWindow;
 extern StructRNA RNA_SpaceConsole;
 extern StructRNA RNA_SpaceDopeSheetEditor;
 extern StructRNA RNA_SpaceFileBrowser;
 extern StructRNA RNA_SpaceGraphEditor;
 extern StructRNA RNA_SpaceImageEditor;
+extern StructRNA RNA_SpaceInfo;
+extern StructRNA RNA_SpaceLogicEditor;
 extern StructRNA RNA_SpaceNLA;
-extern StructRNA RNA_SpaceTimeline;
+extern StructRNA RNA_SpaceNodeEditor;
 extern StructRNA RNA_SpaceOutliner;
+extern StructRNA RNA_SpaceProperties;
 extern StructRNA RNA_SpaceSequenceEditor;
 extern StructRNA RNA_SpaceTextEditor;
+extern StructRNA RNA_SpaceTimeline;
 extern StructRNA RNA_SpaceUVEditor;
+extern StructRNA RNA_SpaceUserPreferences;
 extern StructRNA RNA_SpeedControlSequence;
 extern StructRNA RNA_SpotLamp;
 extern StructRNA RNA_StretchToConstraint;
@@ -443,16 +455,17 @@ extern StructRNA RNA_TextureSlot;
 extern StructRNA RNA_Theme;
 extern StructRNA RNA_ThemeAudioWindow;
 extern StructRNA RNA_ThemeBoneColorSet;
-extern StructRNA RNA_ThemeButtonsWindow;
 extern StructRNA RNA_ThemeDopeSheet;
 extern StructRNA RNA_ThemeFileBrowser;
 extern StructRNA RNA_ThemeFontStyle;
 extern StructRNA RNA_ThemeGraphEditor;
 extern StructRNA RNA_ThemeImageEditor;
+extern StructRNA RNA_ThemeInfo;
 extern StructRNA RNA_ThemeLogicEditor;
 extern StructRNA RNA_ThemeNLAEditor;
 extern StructRNA RNA_ThemeNodeEditor;
 extern StructRNA RNA_ThemeOutliner;
+extern StructRNA RNA_ThemeProperties;
 extern StructRNA RNA_ThemeSequenceEditor;
 extern StructRNA RNA_ThemeStyle;
 extern StructRNA RNA_ThemeTextEditor;
@@ -474,17 +487,16 @@ extern StructRNA RNA_UVProjectModifier;
 extern StructRNA RNA_UnitSettings;
 extern StructRNA RNA_UnknownType;
 extern StructRNA RNA_UserPreferences;
-extern StructRNA RNA_UserPreferencesAutosave;
 extern StructRNA RNA_UserPreferencesEdit;
 extern StructRNA RNA_UserPreferencesFilePaths;
 extern StructRNA RNA_UserPreferencesLanguage;
 extern StructRNA RNA_UserPreferencesSystem;
 extern StructRNA RNA_UserPreferencesView;
 extern StructRNA RNA_UserSolidLight;
-extern StructRNA RNA_VertexPaint;
 extern StructRNA RNA_VectorFont;
 extern StructRNA RNA_VertexGroup;
 extern StructRNA RNA_VertexGroupElement;
+extern StructRNA RNA_VertexPaint;
 extern StructRNA RNA_VoronoiTexture;
 extern StructRNA RNA_WaveModifier;
 extern StructRNA RNA_Window;
index 991b50afa5a77defcca1a9615b39149c4bbdde25..e5332d32f139e827280c3ed7e8f847c8cf5f808d 100644 (file)
@@ -49,7 +49,7 @@ EnumPropertyItem space_type_items[] = {
        {SPACE_BUTS, "PROPERTIES", 0, "Properties", ""},
        {SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""},
        {SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""},
-       {SPACE_INFO, "USER_PREFERENCES", 0, "User Preferences", ""},
+       {SPACE_INFO, "INFO", 0, "Info", ""},
        {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""},
        {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""},
        //{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""},
@@ -61,6 +61,7 @@ EnumPropertyItem space_type_items[] = {
        {SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""},
        {SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
        {SPACE_CONSOLE, "CONSOLE", 0, "Console", ""},
+       {SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
        {0, NULL, 0, NULL, NULL}};
 
 #define DC_RGB {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors."}
@@ -101,13 +102,13 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
                case SPACE_OUTLINER:
                        return &RNA_SpaceOutliner;
                case SPACE_BUTS:
-                       return &RNA_SpaceButtonsWindow;
+                       return &RNA_SpaceProperties;
                case SPACE_FILE:
                        return &RNA_SpaceFileBrowser;
                case SPACE_IMAGE:
                        return &RNA_SpaceImageEditor;
-               /*case SPACE_INFO:
-                       return &RNA_SpaceUserPreferences;*/
+               case SPACE_INFO:
+                       return &RNA_SpaceInfo;
                case SPACE_SEQ:
                        return &RNA_SpaceSequenceEditor;
                case SPACE_TEXT:
@@ -124,12 +125,14 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
                        return &RNA_SpaceScriptsWindow;*/
                case SPACE_TIME:
                        return &RNA_SpaceTimeline;
-               /*case SPACE_NODE:
+               case SPACE_NODE:
                        return &RNA_SpaceNodeEditor;
                case SPACE_LOGIC:
-                       return &RNA_SpaceLogicEditor;*/
+                       return &RNA_SpaceLogicEditor;
                case SPACE_CONSOLE:
                        return &RNA_SpaceConsole;
+               case SPACE_USERPREF:
+                       return &RNA_SpaceUserPreferences;
                default:
                        return &RNA_Space;
        }
@@ -230,9 +233,9 @@ void rna_SpaceFileBrowser_params_set(PointerRNA *ptr, PointerRNA value)
        sfile->params= value.data;
 }
 
-/* Space Buttons */
+/* Space Properties */
 
-StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
+StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
 {
        SpaceButs *sbuts= (SpaceButs*)(ptr->data);
 
@@ -242,7 +245,7 @@ StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
        return &RNA_ID;
 }
 
-void rna_SpaceButtonsWindow_align_set(PointerRNA *ptr, int value)
+void rna_SpaceProperties_align_set(PointerRNA *ptr, int value)
 {
        SpaceButs *sbuts= (SpaceButs*)(ptr->data);
 
@@ -718,9 +721,9 @@ static void rna_def_space_buttons(BlenderRNA *brna)
                {BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""},
                {0, NULL, 0, NULL, NULL}};
                
-       srna= RNA_def_struct(brna, "SpaceButtonsWindow", "Space");
+       srna= RNA_def_struct(brna, "SpaceProperties", "Space");
        RNA_def_struct_sdna(srna, "SpaceButs");
-       RNA_def_struct_ui_text(srna, "Buttons Space", "Buttons Window space data");
+       RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
        
        prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "mainb");
@@ -731,7 +734,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
        prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "align");
        RNA_def_property_enum_items(prop, align_items);
-       RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceButtonsWindow_align_set", NULL);
+       RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
        RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels.");
        RNA_def_property_update(prop, NC_WINDOW, NULL);
 
@@ -744,7 +747,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
        prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "pinid");
        RNA_def_property_struct_type(prop, "ID");
-       RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceButtonsWindow_pin_id_typef");
+       RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceProperties_pin_id_typef");
        RNA_def_property_flag(prop, PROP_EDITABLE);
 }
 
@@ -1377,7 +1380,42 @@ static void rna_def_space_filebrowser(BlenderRNA *brna)
        RNA_def_property_pointer_sdna(prop, NULL, "params");
        RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceFileBrowser_params_set", NULL);
        RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser.");
+}
+
+static void rna_def_space_info(BlenderRNA *brna)
+{
+       StructRNA *srna;
+
+       srna= RNA_def_struct(brna, "SpaceInfo", "Space");
+       RNA_def_struct_sdna(srna, "SpaceInfo");
+       RNA_def_struct_ui_text(srna, "Space Info", "Info space data.");
+}
+
+static void rna_def_space_userpref(BlenderRNA *brna)
+{
+       StructRNA *srna;
+
+       srna= RNA_def_struct(brna, "SpaceUserPreferences", "Space");
+       RNA_def_struct_sdna(srna, "SpaceUserPref");
+       RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data.");
+}
+
+static void rna_def_space_node(BlenderRNA *brna)
+{
+       StructRNA *srna;
+
+       srna= RNA_def_struct(brna, "SpaceNodeEditor", "Space");
+       RNA_def_struct_sdna(srna, "SpaceNode");
+       RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data.");
+}
+
+static void rna_def_space_logic(BlenderRNA *brna)
+{
+       StructRNA *srna;
 
+       srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space");
+       RNA_def_struct_sdna(srna, "SpaceLogic");
+       RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data.");
 }
 
 void RNA_def_space(BlenderRNA *brna)
@@ -1398,6 +1436,10 @@ void RNA_def_space(BlenderRNA *brna)
        rna_def_space_time(brna);
        rna_def_space_console(brna);
        rna_def_console_line(brna);
+       rna_def_space_info(brna);
+       rna_def_space_userpref(brna);
+       rna_def_space_node(brna);
+       rna_def_space_logic(brna);
 }
 
 #endif
index 836e6a2fda73cc0539b57e1d17fec917ff0a7497..d12455281005345131f4a3ee756d976a753ca01f 100644 (file)
@@ -690,7 +690,7 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
 
        srna= RNA_def_struct(brna, "ThemeGraphEditor", NULL);
        RNA_def_struct_sdna(srna, "ThemeSpace");
-       RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the Ipo Editor.");
+       RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor.");
 
        rna_def_userdef_theme_spaces_main(srna, SPACE_IPO);
 
@@ -827,19 +827,33 @@ static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
        rna_def_userdef_theme_spaces_main(srna, SPACE_OUTLINER);
 }
 
-static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
+static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
 {
        StructRNA *srna;
 
-       /* space_info */
+       /* space_userpref */
 
        srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL);
        RNA_def_struct_sdna(srna, "ThemeSpace");
        RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences.");
 
+       rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF);
+}
+
+static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
+{
+       StructRNA *srna;
+
+       /* space_info */
+
+       srna= RNA_def_struct(brna, "ThemeInfo", NULL);
+       RNA_def_struct_sdna(srna, "ThemeSpace");
+       RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info.");
+
        rna_def_userdef_theme_spaces_main(srna, SPACE_INFO);
 }
 
+
 static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
 {
        StructRNA *srna;
@@ -997,7 +1011,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
 
        /* space_buts */
 
-       srna= RNA_def_struct(brna, "ThemeButtonsWindow", NULL);
+       srna= RNA_def_struct(brna, "ThemeProperties", NULL);
        RNA_def_struct_sdna(srna, "ThemeSpace");
        RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties.");
 
@@ -1402,7 +1416,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
 
        prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NEVER_NULL);
        RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
-       RNA_def_property_struct_type(prop, "ThemeButtonsWindow");
+       RNA_def_property_struct_type(prop, "ThemeProperties");
        RNA_def_property_ui_text(prop, "Properties", "");
 
        prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NEVER_NULL);
@@ -1430,8 +1444,13 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "ThemeOutliner");
        RNA_def_property_ui_text(prop, "Outliner", "");
 
-       prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NEVER_NULL);
+       prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NEVER_NULL);
        RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
+       RNA_def_property_struct_type(prop, "ThemeInfo");
+       RNA_def_property_ui_text(prop, "Info", "");
+
+       prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, 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", "");
 
@@ -1460,6 +1479,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
        rna_def_userdef_theme_space_node(brna);
        rna_def_userdef_theme_space_outliner(brna);
        rna_def_userdef_theme_space_info(brna);
+       rna_def_userdef_theme_space_userpref(brna);
        rna_def_userdef_theme_space_sound(brna);
        rna_def_userdef_theme_space_logic(brna);
        rna_def_userdef_theme_colorset(brna);
index a6fbb0515bc4ff6233f8ca94a8a37a64ea1dc14d..d6bde9a468c0d580a62f1d0a1a69aa2ec00422c6 100644 (file)
@@ -446,14 +446,14 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
                ED_area_newspace(C, sa, SPACE_IMAGE);
        }
        else {
-               ED_area_newspace(C, sa, SPACE_INFO);
+               ED_area_newspace(C, sa, SPACE_USERPREF);
        }
        
        ED_screen_set(C, win->screen);
        
        if(sa->spacetype==SPACE_IMAGE)
                GHOST_SetTitle(win->ghostwin, "Blender Render");
-       else if(ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_INFO))
+       else if(ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_USERPREF))
                GHOST_SetTitle(win->ghostwin, "Blender User Preferences");
        else if(sa->spacetype==SPACE_FILE)
                GHOST_SetTitle(win->ghostwin, "Blender File View");