Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/ui/properties_data_modifier.py5
-rw-r--r--release/scripts/ui/properties_object_constraint.py13
2 files changed, 5 insertions, 13 deletions
diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py
index 77d46fbb6ef..2d97ef10506 100644
--- a/release/scripts/ui/properties_data_modifier.py
+++ b/release/scripts/ui/properties_data_modifier.py
@@ -37,9 +37,8 @@ class DATA_PT_modifiers(DataButtonsPanel):
ob = context.object
wide_ui = context.region.width > narrowui
compact_mod = context.region.width < narrowmod
-
- row = layout.row()
- row.operator_menu_enum("object.modifier_add", "type")
+
+ layout.operator_menu_enum("object.modifier_add", "type")
for md in ob.modifiers:
box = layout.template_modifier(md, compact=compact_mod)
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py
index cb6f8cd71a2..21afadfa425 100644
--- a/release/scripts/ui/properties_object_constraint.py
+++ b/release/scripts/ui/properties_object_constraint.py
@@ -730,13 +730,10 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
def draw(self, context):
layout = self.layout
+
ob = context.object
- wide_ui = context.region.width > narrowui
- row = layout.row()
- row.operator_menu_enum("object.constraint_add", "type")
- if wide_ui:
- row.label()
+ layout.operator_menu_enum("object.constraint_add", "type")
for con in ob.constraints:
self.draw_constraint(context, con)
@@ -755,12 +752,8 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
ob = context.object
pchan = ob.pose.bones[context.bone.name]
- wide_ui = context.region.width > narrowui
- row = layout.row()
- row.operator_menu_enum("pose.constraint_add", "type")
- if wide_ui:
- row.label()
+ layout.operator_menu_enum("pose.constraint_add", "type")
for con in pchan.constraints:
self.draw_constraint(context, con)