[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31105] trunk/blender: remove narrow ui feature
Campbell Barton
ideasman42 at gmail.com
Fri Aug 6 17:17:44 CEST 2010
Revision: 31105
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31105
Author: campbellbarton
Date: 2010-08-06 17:17:44 +0200 (Fri, 06 Aug 2010)
Log Message:
-----------
remove narrow ui feature
- re-arranged UI in a way that gave far too much vert scrolling.
- was added all over for simple things like making text="", layout engine should handle this.
- Ton and Brecht are ok with removing this now. Ton would like to work on the layout engine to make it better support these cases.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_animviz.py
trunk/blender/release/scripts/ui/properties_data_armature.py
trunk/blender/release/scripts/ui/properties_data_armature_rigify.py
trunk/blender/release/scripts/ui/properties_data_bone.py
trunk/blender/release/scripts/ui/properties_data_camera.py
trunk/blender/release/scripts/ui/properties_data_curve.py
trunk/blender/release/scripts/ui/properties_data_empty.py
trunk/blender/release/scripts/ui/properties_data_lamp.py
trunk/blender/release/scripts/ui/properties_data_lattice.py
trunk/blender/release/scripts/ui/properties_data_mesh.py
trunk/blender/release/scripts/ui/properties_data_metaball.py
trunk/blender/release/scripts/ui/properties_data_modifier.py
trunk/blender/release/scripts/ui/properties_game.py
trunk/blender/release/scripts/ui/properties_material.py
trunk/blender/release/scripts/ui/properties_object.py
trunk/blender/release/scripts/ui/properties_object_constraint.py
trunk/blender/release/scripts/ui/properties_particle.py
trunk/blender/release/scripts/ui/properties_physics_cloth.py
trunk/blender/release/scripts/ui/properties_physics_common.py
trunk/blender/release/scripts/ui/properties_physics_field.py
trunk/blender/release/scripts/ui/properties_physics_fluid.py
trunk/blender/release/scripts/ui/properties_physics_smoke.py
trunk/blender/release/scripts/ui/properties_physics_softbody.py
trunk/blender/release/scripts/ui/properties_render.py
trunk/blender/release/scripts/ui/properties_scene.py
trunk/blender/release/scripts/ui/properties_texture.py
trunk/blender/release/scripts/ui/properties_world.py
trunk/blender/release/scripts/ui/space_image.py
trunk/blender/release/scripts/ui/space_userpref.py
trunk/blender/release/scripts/ui/space_view3d_toolbar.py
trunk/blender/source/blender/editors/interface/resources.c
trunk/blender/source/blender/makesdna/DNA_userdef_types.h
trunk/blender/source/blender/makesrna/intern/rna_userdef.c
Modified: trunk/blender/release/scripts/ui/properties_animviz.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_animviz.py 2010-08-06 14:36:39 UTC (rev 31104)
+++ trunk/blender/release/scripts/ui/properties_animviz.py 2010-08-06 15:17:44 UTC (rev 31105)
@@ -19,9 +19,7 @@
# <pep8 compliant>
import bpy
-narrowui = bpy.context.user_preferences.view.properties_width_check
-################################################
# Generic Panels (Independent of DataType)
@@ -31,15 +29,12 @@
bl_label = "Motion Paths"
bl_default_closed = True
- def draw_settings(self, context, avs, wide_ui, bones=False):
+ def draw_settings(self, context, avs, bones=False):
layout = self.layout
mps = avs.motion_paths
- if wide_ui:
- layout.prop(mps, "type", expand=True)
- else:
- layout.prop(mps, "type", text="")
+ layout.prop(mps, "type", expand=True)
split = layout.split()
@@ -56,8 +51,7 @@
if bones:
col.row().prop(mps, "bake_location", expand=True)
- if wide_ui:
- col = split.column()
+ col = split.column()
col.label(text="Display:")
col.prop(mps, "show_frame_numbers", text="Frame Numbers")
col.prop(mps, "highlight_keyframes", text="Keyframes")
@@ -77,12 +71,8 @@
layout = self.layout
arm = context.armature
- wide_ui = context.region.width > narrowui
- if wide_ui:
- layout.prop(arm, "ghost_type", expand=True)
- else:
- layout.prop(arm, "ghost_type", text="")
+ layout.prop(arm, "ghost_type", expand=True)
split = layout.split()
@@ -97,8 +87,7 @@
sub.prop(arm, "ghost_step", text="Range")
sub.prop(arm, "ghost_size", text="Step")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.label(text="Display:")
col.prop(arm, "ghost_only_selected", text="Selected Only")
Modified: trunk/blender/release/scripts/ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_armature.py 2010-08-06 14:36:39 UTC (rev 31104)
+++ trunk/blender/release/scripts/ui/properties_data_armature.py 2010-08-06 15:17:44 UTC (rev 31105)
@@ -20,9 +20,7 @@
import bpy
from rna_prop_ui import PropertyPanel
-narrowui = bpy.context.user_preferences.view.properties_width_check
-
class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -43,18 +41,14 @@
ob = context.object
arm = context.armature
space = context.space_data
- wide_ui = context.region.width > narrowui
- if wide_ui:
- split = layout.split(percentage=0.65)
- if ob:
- split.template_ID(ob, "data")
- split.separator()
- elif arm:
- split.template_ID(space, "pin_id")
- split.separator()
- else:
- layout.template_ID(ob, "data")
+ split = layout.split(percentage=0.65)
+ if ob:
+ split.template_ID(ob, "data")
+ split.separator()
+ elif arm:
+ split.template_ID(space, "pin_id")
+ split.separator()
class DATA_PT_custom_props_arm(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
@@ -68,12 +62,8 @@
layout = self.layout
arm = context.armature
- wide_ui = context.region.width > narrowui
- if wide_ui:
- layout.prop(arm, "pose_position", expand=True)
- else:
- layout.prop(arm, "pose_position", text="")
+ layout.prop(arm, "pose_position", expand=True)
split = layout.split()
@@ -91,8 +81,7 @@
col.prop(arm, "deform_vertexgroups", text="Vertex Groups")
col.prop(arm, "deform_envelope", text="Envelopes")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(arm, "deform_quaternion", text="Quaternion")
@@ -104,12 +93,8 @@
ob = context.object
arm = context.armature
- wide_ui = context.region.width > narrowui
- if wide_ui:
- layout.row().prop(arm, "drawtype", expand=True)
- else:
- layout.row().prop(arm, "drawtype", text="")
+ layout.row().prop(arm, "drawtype", expand=True)
split = layout.split()
@@ -118,8 +103,7 @@
col.prop(arm, "draw_axes", text="Axes")
col.prop(arm, "draw_custom_bone_shapes", text="Shapes")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(arm, "draw_group_colors", text="Colors")
col.prop(ob, "x_ray", text="X-Ray")
col.prop(arm, "delay_deform", text="Delay Refresh")
@@ -137,7 +121,6 @@
ob = context.object
pose = ob.pose
- wide_ui = context.region.width > narrowui
row = layout.row()
row.template_list(pose, "bone_groups", pose, "active_bone_group_index", rows=2)
@@ -159,8 +142,7 @@
col = split.column()
col.prop(group, "color_set")
if group.color_set:
- if wide_ui:
- col = split.column()
+ col = split.column()
col.template_triColorSet(group, "colors")
row = layout.row()
@@ -183,12 +165,8 @@
layout = self.layout
arm = context.armature
- wide_ui = context.region.width > narrowui
- if wide_ui:
- layout.prop(arm, "ghost_type", expand=True)
- else:
- layout.prop(arm, "ghost_type", text="")
+ layout.prop(arm, "ghost_type", expand=True)
split = layout.split()
@@ -203,8 +181,7 @@
sub.prop(arm, "ghost_step", text="Range")
sub.prop(arm, "ghost_size", text="Step")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.label(text="Display:")
col.prop(arm, "ghost_only_selected", text="Selected Only")
@@ -224,7 +201,6 @@
ob = context.object
itasc = ob.pose.ik_param
- wide_ui = (context.region.width > narrowui)
row = layout.row()
row.prop(ob.pose, "ik_solver")
@@ -241,8 +217,7 @@
col = split.column()
col.prop(itasc, "precision")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(itasc, "num_iter")
@@ -279,9 +254,8 @@
layout = self.layout
ob = context.object
- wide_ui = context.region.width > narrowui
- self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
+ self.draw_settings(context, ob.pose.animation_visualisation, bones=True)
layout.separator()
@@ -290,8 +264,7 @@
col = split.column()
col.operator("pose.paths_calculate", text="Calculate Paths")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.operator("pose.paths_clear", text="Clear Paths")
@@ -308,9 +281,8 @@
layout = self.layout
ob = context.object
- wide_ui = context.region.width > narrowui
- self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
+ self.draw_settings(context, ob.pose.animation_visualisation, bones=True)
def register():
pass
Modified: trunk/blender/release/scripts/ui/properties_data_armature_rigify.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_armature_rigify.py 2010-08-06 14:36:39 UTC (rev 31104)
+++ trunk/blender/release/scripts/ui/properties_data_armature_rigify.py 2010-08-06 15:17:44 UTC (rev 31105)
@@ -19,9 +19,7 @@
# <pep8 compliant>
import bpy
-narrowui = bpy.context.user_preferences.view.properties_width_check
-
class PoseTemplateSettings(bpy.types.IDPropertyGroup):
pass
Modified: trunk/blender/release/scripts/ui/properties_data_bone.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_bone.py 2010-08-06 14:36:39 UTC (rev 31104)
+++ trunk/blender/release/scripts/ui/properties_data_bone.py 2010-08-06 15:17:44 UTC (rev 31105)
@@ -20,9 +20,7 @@
import bpy
from rna_prop_ui import PropertyPanel
-narrowui = bpy.context.user_preferences.view.properties_width_check
-
class BoneButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -68,65 +66,42 @@
ob = context.object
bone = context.bone
- wide_ui = context.region.width > narrowui
if not bone:
bone = context.edit_bone
- if wide_ui:
- row = layout.row()
- row.column().prop(bone, "head")
- row.column().prop(bone, "tail")
+ row = layout.row()
+ row.column().prop(bone, "head")
+ row.column().prop(bone, "tail")
- col = row.column()
- sub = col.column(align=True)
- sub.label(text="Roll:")
- sub.prop(bone, "roll", text="")
- sub.label()
- sub.prop(bone, "lock")
- else:
- col = layout.column()
- col.prop(bone, "head")
- col.prop(bone, "tail")
- col.prop(bone, "roll")
- col.prop(bone, "lock")
+ col = row.column()
+ sub = col.column(align=True)
+ sub.label(text="Roll:")
+ sub.prop(bone, "roll", text="")
+ sub.label()
+ sub.prop(bone, "lock")
else:
pchan = ob.pose.bones[context.bone.name]
- if wide_ui:
- row = layout.row()
- col = row.column()
- col.prop(pchan, "location")
- col.active = not (bone.parent and bone.connected)
+ row = layout.row()
+ col = row.column()
+ col.prop(pchan, "location")
+ col.active = not (bone.parent and bone.connected)
- col = row.column()
- if pchan.rotation_mode == 'QUATERNION':
- col.prop(pchan, "rotation_quaternion", text="Rotation")
- elif pchan.rotation_mode == 'AXIS_ANGLE':
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list