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:
Diffstat (limited to 'release/ui/buttons_data_text.py')
-rw-r--r--release/ui/buttons_data_text.py119
1 files changed, 46 insertions, 73 deletions
diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py
index d0e7ea09a92..754d6fcda39 100644
--- a/release/ui/buttons_data_text.py
+++ b/release/ui/buttons_data_text.py
@@ -2,8 +2,8 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
@@ -38,31 +38,29 @@ class DATA_PT_shape_text(DataButtonsPanel):
curve = context.curve
space = context.space_data
- layout.itemR(curve, "curve_2d")
+ if curve:
+ layout.itemR(curve, "curve_2d")
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Caps:")
- row = col.row()
- row .itemR(curve, "front")
- row .itemR(curve, "back")
- # col = split.column()
- col.itemL(text="Textures:")
- col.itemR(curve, "uv_orco")
- col.itemR(curve, "auto_texspace")
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Caps:")
+ col.itemR(curve, "front")
+ col.itemR(curve, "back")
+ col.itemL(text="Textures:")
+ col.itemR(curve, "uv_orco")
+ col.itemR(curve, "auto_texspace")
- col = split.column()
- col.itemL(text="Resolution:")
- sub = col.column(align=True)
- sub.itemR(curve, "resolution_u", text="Preview U")
- sub.itemR(curve, "render_resolution_u", text="Render U")
-
- # resolution_v is not used for text
-
- sub = col.column(align=True)
- col.itemL(text="Display:")
- col.itemR(curve, "fast", text="Fast Editing")
+ col = split.column()
+ col.itemL(text="Resolution:")
+ sub = col.column(align=True)
+ sub.itemR(curve, "resolution_u", text="Preview U")
+ sub.itemR(curve, "render_resolution_u", text="Render U")
+ sub = col.column(align=True)
+ sub.itemR(curve, "resolution_v", text="Preview V")
+ sub.itemR(curve, "render_resolution_v", text="Render V")
+ col.itemL(text="Display:")
+ col.itemR(curve, "fast")
class DATA_PT_geometry_text(DataButtonsPanel):
__label__ = "Geometry"
@@ -78,15 +76,13 @@ class DATA_PT_geometry_text(DataButtonsPanel):
col.itemL(text="Modification:")
col.itemR(curve, "width")
col.itemR(curve, "extrude")
- col.itemL(text="Taper Object:")
- col.itemR(curve, "taper_object", text="")
+ col.itemR(curve, "taper_object")
col = split.column()
col.itemL(text="Bevel:")
col.itemR(curve, "bevel_depth", text="Depth")
col.itemR(curve, "bevel_resolution", text="Resolution")
- col.itemL(text="Bevel Object:")
- col.itemR(curve, "bevel_object", text="")
+ col.itemR(curve, "bevel_object")
class DATA_PT_font(DataButtonsPanel):
__label__ = "Font"
@@ -95,39 +91,27 @@ class DATA_PT_font(DataButtonsPanel):
layout = self.layout
text = context.curve
- char = context.curve.edit_format
layout.itemR(text, "font")
- row = layout.row()
- row.itemR(text, "text_size", text="Size")
- row.itemR(text, "shear")
-
split = layout.split()
col = split.column()
- col.itemL(text="Object Font:")
- col.itemR(text, "family", text="")
+ # col.itemR(text, "style")
+ # col.itemR(text, "bold")
+ # col.itemR(text, "italic")
+ # col.itemR(text, "underline")
+ # ToDo: These settings are in a sub struct (Edit Format).
+ col.itemR(text, "text_size")
+ col.itemR(text, "shear")
col = split.column()
- col.itemL(text="Text on Curve:")
- col.itemR(text, "text_on_curve", text="")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Character:")
- col.itemR(char, "bold")
- col.itemR(char, "italic")
- col.itemR(char, "underline")
-# col.itemR(char, "style")
-# col.itemR(char, "wrap")
-
- col = split.column(align=True)
+ col.itemR(text, "text_on_curve")
+ col.itemR(text, "family")
col.itemL(text="Underline:")
col.itemR(text, "ul_position", text="Position")
- col.itemR(text, "ul_height", text="Thickness")
-
+ col.itemR(text, "ul_height", text="Height")
+ # col.itemR(text, "edit_format")
class DATA_PT_paragraph(DataButtonsPanel):
__label__ = "Paragraph"
@@ -150,34 +134,23 @@ class DATA_PT_paragraph(DataButtonsPanel):
col = split.column(align=True)
col.itemL(text="Offset:")
- col.itemR(text, "offset_x", text="X")
- col.itemR(text, "offset_y", text="Y")
-
+ col.itemR(text, "x_offset", text="X")
+ col.itemR(text, "y_offset", text="Y")
+ #col.itemR(text, "wrap")
+"""
class DATA_PT_textboxes(DataButtonsPanel):
- __label__ = "Text Boxes"
+ __label__ = "Text Boxes"
- def draw(self, context):
- layout = self.layout
+ def draw(self, context):
+ layout = self.layout
- text = context.curve
-
- for box in text.textboxes:
- split = layout.box().split()
-
- col = split.column(align=True)
- col.itemL(text="Dimensions:")
- col.itemR(box, "width", text="Width")
- col.itemR(box, "height", text="Height")
-
- col = split.column(align=True)
- col.itemL(text="Offset:")
- col.itemR(box, "x", text="X")
- col.itemR(box, "y", text="Y")
+ text = context.curve
+"""
bpy.types.register(DATA_PT_context_text)
bpy.types.register(DATA_PT_shape_text)
bpy.types.register(DATA_PT_geometry_text)
bpy.types.register(DATA_PT_font)
bpy.types.register(DATA_PT_paragraph)
-bpy.types.register(DATA_PT_textboxes)
+#bpy.types.register(DATA_PT_textboxes)