diff options
author | Thomas Dinges <blender@dingto.org> | 2010-05-16 14:21:00 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2010-05-16 14:21:00 +0400 |
commit | e1bf9d30bcbda27c997c451bd261dc01f70de137 (patch) | |
tree | 5bf526d2a9bdd5a98652e02ccf91354a5d065b61 /release | |
parent | c2ffcb84975b3854daea54cd987895a0d6695b9b (diff) |
Properties Window:
*The narrowui value was hard coded in all ui scripts, made an user preferences option. Basically this value determines on which area width, it should switch between dual/single column layout.
ToDo: The Changes only take effect when reloading scripts/restarting Blender (after saving as default). Will maybe add the "Reload Scripts" operator next to the button in the future.
* Small fix for Fluid Add Button, when in single column mode. Didn't expand like the other "Add" Buttons.
Diffstat (limited to 'release')
29 files changed, 38 insertions, 31 deletions
diff --git a/release/scripts/ui/properties_animviz.py b/release/scripts/ui/properties_animviz.py index 311a8b119cf..3e9c2158cb7 100644 --- a/release/scripts/ui/properties_animviz.py +++ b/release/scripts/ui/properties_animviz.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check ################################################ # Generic Panels (Independent of DataType) diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 953ab5e5abd..805a21b3be2 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py index ba012368def..5ec50973ea4 100644 --- a/release/scripts/ui/properties_data_armature_rigify.py +++ b/release/scripts/ui/properties_data_armature_rigify.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class PoseTemplateSettings(bpy.types.IDPropertyGroup): diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index 982572b62a3..b6b638ef380 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class BoneButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py index 4ce124a279e..3abd460c427 100644 --- a/release/scripts/ui/properties_data_camera.py +++ b/release/scripts/ui/properties_data_camera.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py index 62c81df2ece..5f1dc662b97 100644 --- a/release/scripts/ui/properties_data_curve.py +++ b/release/scripts/ui/properties_data_curve.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_empty.py b/release/scripts/ui/properties_data_empty.py index a0999fb9d4a..577e32ed840 100644 --- a/release/scripts/ui/properties_data_empty.py +++ b/release/scripts/ui/properties_data_empty.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py index 26f4b158c90..4338489ac5a 100644 --- a/release/scripts/ui/properties_data_lamp.py +++ b/release/scripts/ui/properties_data_lamp.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class LAMP_MT_sunsky_presets(bpy.types.Menu): diff --git a/release/scripts/ui/properties_data_lattice.py b/release/scripts/ui/properties_data_lattice.py index 2a78d329223..2aa719437a7 100644 --- a/release/scripts/ui/properties_data_lattice.py +++ b/release/scripts/ui/properties_data_lattice.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py index 5321c76679c..44d3d19e793 100644 --- a/release/scripts/ui/properties_data_mesh.py +++ b/release/scripts/ui/properties_data_mesh.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class MESH_MT_vertex_group_specials(bpy.types.Menu): diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py index b751a9f9059..e0155059b98 100644 --- a/release/scripts/ui/properties_data_metaball.py +++ b/release/scripts/ui/properties_data_metaball.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index 888d20cb5e1..535e5afdd79 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check narrowmod = 260 diff --git a/release/scripts/ui/properties_game.py b/release/scripts/ui/properties_game.py index 41af955d9ec..a5b443a461b 100644 --- a/release/scripts/ui/properties_game.py +++ b/release/scripts/ui/properties_game.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class PhysicsButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py index a7d9af9999d..1526bd004a0 100644 --- a/release/scripts/ui/properties_material.py +++ b/release/scripts/ui/properties_material.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check def active_node_mat(mat): diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index 211a7f5c2e9..6dbfe269436 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class ObjectButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py index a81ab2fb4d2..f53bac05a7c 100644 --- a/release/scripts/ui/properties_object_constraint.py +++ b/release/scripts/ui/properties_object_constraint.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class ConstraintButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index a1bc4019c6d..35c1f84cca5 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -25,7 +25,7 @@ from properties_physics_common import effector_weights_ui from properties_physics_common import basic_force_field_settings_ui from properties_physics_common import basic_force_field_falloff_ui -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check def particle_panel_enabled(context, psys): diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py index 67fc79eb4d1..834e3cf2450 100644 --- a/release/scripts/ui/properties_physics_cloth.py +++ b/release/scripts/ui/properties_physics_cloth.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import point_cache_ui @@ -75,7 +75,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel): # add modifier split.operator("object.modifier_add", text="Add").type = 'CLOTH' if wide_ui: - split.column() + split.label() if md: cloth = md.settings diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py index eac2bc60f35..097f7586e58 100644 --- a/release/scripts/ui/properties_physics_common.py +++ b/release/scripts/ui/properties_physics_common.py @@ -18,10 +18,10 @@ # <pep8 compliant> -narrowui = 180 - import bpy +narrowui = bpy.context.user_preferences.view.properties_width_check + #cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc def point_cache_ui(self, context, cache, enabled, cachetype): layout = self.layout diff --git a/release/scripts/ui/properties_physics_field.py b/release/scripts/ui/properties_physics_field.py index 4dfe4f6372e..57fa40e4c5d 100644 --- a/release/scripts/ui/properties_physics_field.py +++ b/release/scripts/ui/properties_physics_field.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import basic_force_field_settings_ui diff --git a/release/scripts/ui/properties_physics_fluid.py b/release/scripts/ui/properties_physics_fluid.py index e3e6e1dbb3d..32acd88654d 100644 --- a/release/scripts/ui/properties_physics_fluid.py +++ b/release/scripts/ui/properties_physics_fluid.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class PhysicButtonsPanel(bpy.types.Panel): @@ -42,7 +42,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): md = context.fluid wide_ui = context.region.width > narrowui - split = layout.split(percentage=0.5) + split = layout.split() if md: # remove modifier + settings diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py index d4a40dc6788..f362588cd98 100644 --- a/release/scripts/ui/properties_physics_smoke.py +++ b/release/scripts/ui/properties_physics_smoke.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import point_cache_ui diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py index 8e685b8a66c..696f29810a3 100644 --- a/release/scripts/ui/properties_physics_softbody.py +++ b/release/scripts/ui/properties_physics_softbody.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import point_cache_ui diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index ae03d4d28d0..53b17ed67db 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class RENDER_MT_presets(bpy.types.Menu): diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index 119988f8fa3..48cddb799bc 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class SceneButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index 07a097cfd3a..976c3be667f 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class TEXTURE_MT_specials(bpy.types.Menu): diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py index 5d4dce88492..e63d513a4b5 100644 --- a/release/scripts/ui/properties_world.py +++ b/release/scripts/ui/properties_world.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class WorldButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py index be7370302ec..f0a5a3384be 100644 --- a/release/scripts/ui/space_image.py +++ b/release/scripts/ui/space_image.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class IMAGE_MT_view(bpy.types.Menu): diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index be56cffb59a..a850f543e04 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -165,6 +165,13 @@ class USERPREF_PT_interface(bpy.types.Panel): sub.enabled = view.show_mini_axis sub.prop(view, "mini_axis_size", text="Size") sub.prop(view, "mini_axis_brightness", text="Brightness") + + col.separator() + col.separator() + col.separator() + + col.label(text="Properties Window:") + col.prop(view, "properties_width_check") row.separator() row.separator() |