forked from bartvdbraak/blender
Small UI Tweak:
Let "Add Constraint" Button use the whole space, like the "Add Modifier" Button.
This commit is contained in:
parent
78934da5c4
commit
c005d19c42
@ -37,9 +37,8 @@ class DATA_PT_modifiers(DataButtonsPanel):
|
|||||||
ob = context.object
|
ob = context.object
|
||||||
wide_ui = context.region.width > narrowui
|
wide_ui = context.region.width > narrowui
|
||||||
compact_mod = context.region.width < narrowmod
|
compact_mod = context.region.width < narrowmod
|
||||||
|
|
||||||
row = layout.row()
|
layout.operator_menu_enum("object.modifier_add", "type")
|
||||||
row.operator_menu_enum("object.modifier_add", "type")
|
|
||||||
|
|
||||||
for md in ob.modifiers:
|
for md in ob.modifiers:
|
||||||
box = layout.template_modifier(md, compact=compact_mod)
|
box = layout.template_modifier(md, compact=compact_mod)
|
||||||
|
@ -730,13 +730,10 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
ob = context.object
|
|
||||||
wide_ui = context.region.width > narrowui
|
|
||||||
|
|
||||||
row = layout.row()
|
ob = context.object
|
||||||
row.operator_menu_enum("object.constraint_add", "type")
|
|
||||||
if wide_ui:
|
layout.operator_menu_enum("object.constraint_add", "type")
|
||||||
row.label()
|
|
||||||
|
|
||||||
for con in ob.constraints:
|
for con in ob.constraints:
|
||||||
self.draw_constraint(context, con)
|
self.draw_constraint(context, con)
|
||||||
@ -755,12 +752,8 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
|
|||||||
|
|
||||||
ob = context.object
|
ob = context.object
|
||||||
pchan = ob.pose.bones[context.bone.name]
|
pchan = ob.pose.bones[context.bone.name]
|
||||||
wide_ui = context.region.width > narrowui
|
|
||||||
|
|
||||||
row = layout.row()
|
layout.operator_menu_enum("pose.constraint_add", "type")
|
||||||
row.operator_menu_enum("pose.constraint_add", "type")
|
|
||||||
if wide_ui:
|
|
||||||
row.label()
|
|
||||||
|
|
||||||
for con in pchan.constraints:
|
for con in pchan.constraints:
|
||||||
self.draw_constraint(context, con)
|
self.draw_constraint(context, con)
|
||||||
|
Loading…
Reference in New Issue
Block a user