diff options
author | Thomas Dinges <blender@dingto.org> | 2009-06-14 01:22:21 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-06-14 01:22:21 +0400 |
commit | c3c38155ad2aca369fa956b2251ed41c749942cc (patch) | |
tree | 7c522007b81b30989af91dcad1bb573b78c19da5 /release/ui/buttons_data_text.py | |
parent | 646d4041e2c3461f4494be126172cf10472914b7 (diff) |
2.5 Buttons:
* Added more material buttons by William. Thanks.
I made some minor adjustments and added Specular Shader Model RNA.
* Code cleanup and some consistency tweaks of button files.
Notes: Preview render now only shows up when there is an active world, material, texture or lamp.
* Made sure initial panels with ID Datablocks are shown, even when no block is active.
Diffstat (limited to 'release/ui/buttons_data_text.py')
-rw-r--r-- | release/ui/buttons_data_text.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py index 20503d8d2fd..d6f6feaa389 100644 --- a/release/ui/buttons_data_text.py +++ b/release/ui/buttons_data_text.py @@ -7,18 +7,22 @@ class DataButtonsPanel(bpy.types.Panel): __context__ = "data" def poll(self, context): - ob = context.object - return (ob and ob.type == 'TEXT') + return (context.object.type == 'TEXT' and context.curve) class DATA_PT_shape_text(DataButtonsPanel): __idname__ = "DATA_PT_shape_text" - __label__ = "Shape" + __label__ = "Shape Text" + + def poll(self, context): + ob = context.object + return (context.object.type == 'TEXT') def draw(self, context): + layout = self.layout + ob = context.object curve = context.curve space = context.space_data - layout = self.layout split = layout.split(percentage=0.65) @@ -59,8 +63,8 @@ class DATA_PT_font(DataButtonsPanel): __label__ = "Font" def draw(self, context): - text = context.curve layout = self.layout + text = context.curve layout.row() layout.itemR(text, "font") @@ -90,8 +94,8 @@ class DATA_PT_paragraph(DataButtonsPanel): __label__ = "Paragraph" def draw(self, context): - text = context.curve layout = self.layout + text = context.curve layout.itemL(text="Align:") layout.itemR(text, "spacemode", expand=True) @@ -109,14 +113,16 @@ class DATA_PT_paragraph(DataButtonsPanel): sub.itemR(text, "x_offset", text="X") sub.itemR(text, "y_offset", text="Y") sub.itemR(text, "wrap") - + +""" class DATA_PT_textboxes(DataButtonsPanel): __idname__ = "DATA_PT_textboxes" __label__ = "Text Boxes" def draw(self, context): - text = context.curve layout = self.layout + text = context.curve +""" bpy.types.register(DATA_PT_shape_text) bpy.types.register(DATA_PT_font) |