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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # -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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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() diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 49c455d9299..82b195fb94a 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1488,6 +1488,11 @@ void init_userdef_do_versions(void) if (U.v2d_min_gridsize == 0) { U.v2d_min_gridsize= 35; } + + /* Single Column UI Value */ + if (U.propwidth == 0) { + U.propwidth = 200; + } /* funny name, but it is GE stuff, moves userdef stuff to engine */ // XXX space_set_commmandline_options(); diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 933ccf1bdd0..091c05a8b98 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -362,6 +362,8 @@ typedef struct UserDef { short scrcastfps; /* frame rate for screencast to be played back */ short scrcastwait; /* milliseconds between screencast snapshots */ + + short propwidth, pad[3]; /* Value for Dual/Single Column UI */ char versemaster[160]; char verseuser[160]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index aa152fbf2b0..e19efd745d8 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2052,6 +2052,13 @@ static void rna_def_userdef_view(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set", NULL); RNA_def_property_ui_text(prop, "TimeCode Style", "Format of Time Codes displayed when not displaying timing in terms of frames"); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + /* Properties Window */ + prop= RNA_def_property(srna, "properties_width_check", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "propwidth"); + RNA_def_property_range(prop, 150, 400); + RNA_def_property_ui_text(prop, "Width Check", "Dual Column layout will change to single column layout when the width of the area gets below this value (needs restart to take effect)"); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_edit(BlenderRNA *brna)