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.
This commit is contained in:
Thomas Dinges
2010-05-16 10:21:00 +00:00
parent c2ffcb8497
commit e1bf9d30bc
32 changed files with 52 additions and 31 deletions

View File

@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
narrowui = bpy.context.user_preferences.view.properties_width_check
################################################
# Generic Panels (Independent of DataType)

View File

@@ -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):

View File

@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
narrowui = bpy.context.user_preferences.view.properties_width_check
class PoseTemplateSettings(bpy.types.IDPropertyGroup):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
narrowui = bpy.context.user_preferences.view.properties_width_check
narrowmod = 260

View File

@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
narrowui = bpy.context.user_preferences.view.properties_width_check
class PhysicsButtonsPanel(bpy.types.Panel):

View File

@@ -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):

View File

@@ -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):

View File

@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
narrowui = bpy.context.user_preferences.view.properties_width_check
class ConstraintButtonsPanel(bpy.types.Panel):

View File

@@ -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):

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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()