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:
authorWilliam Reynish <william@reynish.com>2010-06-22 03:20:44 +0400
committerWilliam Reynish <william@reynish.com>2010-06-22 03:20:44 +0400
commit91deffc42966156356151dbd6a2731c79ce088bd (patch)
treec09b0533ce873ccec3ca3adeb78899bf5853f478 /release
parentdf6e5aeafc346d3e28795a7653104f8b0495c255 (diff)
Added ability to add and remove text boxes back from Blender 2.4x. One on those small things missing.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/properties_data_curve.py41
1 files changed, 28 insertions, 13 deletions
diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py
index c5bf4b8459b..d807fa1631b 100644
--- a/release/scripts/ui/properties_data_curve.py
+++ b/release/scripts/ui/properties_data_curve.py
@@ -367,21 +367,36 @@ class DATA_PT_textboxes(DataButtonsPanel):
text = context.curve
wide_ui = context.region.width > narrowui
-
- for box in text.textboxes:
- split = layout.box().split()
-
- col = split.column(align=True)
- col.label(text="Dimensions:")
- col.prop(box, "width", text="Width")
- col.prop(box, "height", text="Height")
+
+ split = layout.split()
+ col = split.column()
+ col.operator("font.textbox_add", icon='ZOOMIN')
+ if wide_ui:
+ col = split.column()
+
+ for i, box in enumerate(text.textboxes):
+
+ boxy = layout.box()
+
+ split = boxy.split()
+
+ col = split.column()
+
+ col2 = col.column(align=True)
+ col2.label(text="Dimensions:")
+ col2.prop(box, "width", text="Width")
+ col2.prop(box, "height", text="Height")
if wide_ui:
- col = split.column(align=True)
- col.label(text="Offset:")
- col.prop(box, "x", text="X")
- col.prop(box, "y", text="Y")
-
+ col = split.column()
+
+ row = col.row()
+ row.label(text="Offset:")
+ row.operator("font.textbox_remove", text='', icon='X').index = i
+
+ col2 = col.column(align=True)
+ col2.prop(box, "x", text="X")
+ col2.prop(box, "y", text="Y")
classes = [
DATA_PT_context_curve,