2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-05-19 15:38:36 +00:00
|
|
|
import bpy
|
2010-01-08 08:54:41 +00:00
|
|
|
from rna_prop_ui import PropertyPanel
|
2009-05-19 15:38:36 +00:00
|
|
|
|
2009-11-12 15:41:44 +00:00
|
|
|
narrowui = 180
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-05-19 15:38:36 +00:00
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
def poll(self, context):
|
2009-11-14 23:24:15 +00:00
|
|
|
return (context.object and context.object.type in ('CURVE', 'SURFACE', 'TEXT') and context.curve)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-09-07 15:02:43 +00:00
|
|
|
class DataButtonsPanelCurve(DataButtonsPanel):
|
2009-10-31 23:35:56 +00:00
|
|
|
'''Same as above but for curves only'''
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def poll(self, context):
|
|
|
|
return (context.object and context.object.type == 'CURVE' and context.curve)
|
2009-09-09 00:10:12 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-09-08 07:35:07 +00:00
|
|
|
class DataButtonsPanelActive(DataButtonsPanel):
|
2009-10-31 23:35:56 +00:00
|
|
|
'''Same as above but for curves only'''
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def poll(self, context):
|
|
|
|
curve = context.curve
|
|
|
|
return (curve and curve.active_spline)
|
2009-05-19 15:38:36 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-07-09 09:42:34 +00:00
|
|
|
class DATA_PT_context_curve(DataButtonsPanel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = ""
|
|
|
|
bl_show_header = False
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
curve = context.curve
|
|
|
|
space = context.space_data
|
2009-11-19 13:26:51 +00:00
|
|
|
wide_ui = context.region.width > narrowui
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-12 15:41:44 +00:00
|
|
|
split = layout.split(percentage=0.65)
|
2009-05-19 15:38:36 +00:00
|
|
|
|
2009-11-12 15:41:44 +00:00
|
|
|
if ob:
|
|
|
|
split.template_ID(ob, "data")
|
2009-11-23 00:27:30 +00:00
|
|
|
split.separator()
|
2009-11-12 15:41:44 +00:00
|
|
|
elif curve:
|
|
|
|
split.template_ID(space, "pin_id")
|
2009-11-23 00:27:30 +00:00
|
|
|
split.separator()
|
2009-11-12 15:41:44 +00:00
|
|
|
else:
|
|
|
|
layout.template_ID(ob, "data")
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2010-01-08 08:54:41 +00:00
|
|
|
class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel):
|
|
|
|
_context_path = "object.data"
|
|
|
|
|
|
|
|
|
2009-07-09 09:07:25 +00:00
|
|
|
class DATA_PT_shape_curve(DataButtonsPanel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Shape"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
curve = context.curve
|
2009-11-19 13:26:51 +00:00
|
|
|
wide_ui = context.region.width > narrowui
|
2009-10-31 19:31:45 +00:00
|
|
|
is_surf = (ob.type == 'SURFACE')
|
2009-11-14 23:24:15 +00:00
|
|
|
is_curve = (ob.type == 'CURVE')
|
|
|
|
is_text = (ob.type == 'TEXT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
if is_curve:
|
2009-10-31 19:31:45 +00:00
|
|
|
row = layout.row()
|
2009-11-23 00:27:30 +00:00
|
|
|
row.prop(curve, "dimensions", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Resolution:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(curve, "resolution_u", text="Preview U")
|
|
|
|
sub.prop(curve, "render_resolution_u", text="Render U")
|
2009-11-14 23:24:15 +00:00
|
|
|
if is_curve:
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Twisting:")
|
|
|
|
col.prop(curve, "twist_mode", text="")
|
|
|
|
col.prop(curve, "twist_smooth", text="Smooth")
|
2009-11-14 23:24:15 +00:00
|
|
|
if is_text:
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Display:")
|
|
|
|
col.prop(curve, "fast", text="Fast Editing")
|
2009-11-19 23:59:37 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-14 23:24:15 +00:00
|
|
|
col = split.column()
|
2009-11-20 20:40:29 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
if is_surf:
|
|
|
|
sub = col.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="")
|
|
|
|
sub.prop(curve, "resolution_v", text="Preview V")
|
|
|
|
sub.prop(curve, "render_resolution_v", text="Render V")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
if is_curve or is_text:
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = (curve.dimensions == '2D')
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Caps:")
|
|
|
|
sub.prop(curve, "front")
|
|
|
|
sub.prop(curve, "back")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Textures:")
|
|
|
|
# col.prop(curve, "uv_orco")
|
|
|
|
col.prop(curve, "auto_texspace")
|
2009-05-19 15:38:36 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-09-13 21:36:24 +00:00
|
|
|
class DATA_PT_geometry_curve(DataButtonsPanel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Geometry"
|
|
|
|
|
2009-11-30 19:24:13 +00:00
|
|
|
def poll(self, context):
|
|
|
|
obj = context.object
|
|
|
|
if obj and obj.type == 'SURFACE':
|
|
|
|
return False
|
|
|
|
|
2009-12-03 14:20:35 +00:00
|
|
|
return context.curve
|
2009-11-30 19:24:13 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
curve = context.curve
|
2009-11-19 13:26:51 +00:00
|
|
|
wide_ui = context.region.width > narrowui
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Modification:")
|
|
|
|
col.prop(curve, "width")
|
|
|
|
col.prop(curve, "extrude")
|
|
|
|
col.label(text="Taper Object:")
|
|
|
|
col.prop(curve, "taper_object", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-12 15:41:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Bevel:")
|
|
|
|
col.prop(curve, "bevel_depth", text="Depth")
|
|
|
|
col.prop(curve, "bevel_resolution", text="Resolution")
|
|
|
|
col.label(text="Bevel Object:")
|
|
|
|
col.prop(curve, "bevel_object", text="")
|
2009-09-07 15:02:43 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-09-07 15:02:43 +00:00
|
|
|
class DATA_PT_pathanim(DataButtonsPanelCurve):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Path Animation"
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
curve = context.curve
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
self.layout.prop(curve, "use_path", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
curve = context.curve
|
2009-11-19 13:26:51 +00:00
|
|
|
wide_ui = context.region.width > narrowui
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
layout.active = curve.use_path
|
|
|
|
|
2010-01-31 23:41:38 +00:00
|
|
|
col = layout.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(curve, "path_length", text="Frames")
|
2010-01-31 23:41:38 +00:00
|
|
|
layout.prop(curve, "eval_time")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(curve, "use_path_follow")
|
|
|
|
col.prop(curve, "use_stretch")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-12 15:41:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(curve, "use_radius")
|
|
|
|
col.prop(curve, "use_time_offset", text="Offset Children")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-09-08 07:35:07 +00:00
|
|
|
class DATA_PT_active_spline(DataButtonsPanelActive):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Active Spline"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
curve = context.curve
|
|
|
|
act_spline = curve.active_spline
|
|
|
|
is_surf = (ob.type == 'SURFACE')
|
|
|
|
is_poly = (act_spline.type == 'POLY')
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
if is_poly:
|
|
|
|
# These settings are below but its easier to have
|
|
|
|
# poly's set aside since they use so few settings
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Cyclic:")
|
|
|
|
col.prop(act_spline, "smooth")
|
2009-10-31 19:31:45 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(act_spline, "cyclic_u", text="U")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
else:
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Cyclic:")
|
2009-10-31 19:31:45 +00:00
|
|
|
if act_spline.type == 'NURBS':
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Bezier:")
|
|
|
|
col.label(text="Endpoint:")
|
|
|
|
col.label(text="Order:")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Resolution:")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(act_spline, "cyclic_u", text="U")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if act_spline.type == 'NURBS':
|
|
|
|
sub = col.column()
|
|
|
|
# sub.active = (not act_spline.cyclic_u)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(act_spline, "bezier_u", text="U")
|
|
|
|
sub.prop(act_spline, "endpoint_u", text="U")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
sub = col.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(act_spline, "order_u", text="U")
|
|
|
|
col.prop(act_spline, "resolution_u", text="U")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if is_surf:
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(act_spline, "cyclic_v", text="V")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
# its a surface, assume its a nurb.
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = (not act_spline.cyclic_v)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(act_spline, "bezier_v", text="V")
|
|
|
|
sub.prop(act_spline, "endpoint_v", text="V")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(act_spline, "order_v", text="V")
|
|
|
|
sub.prop(act_spline, "resolution_v", text="V")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if not is_surf:
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2009-10-31 23:35:56 +00:00
|
|
|
col.active = (curve.dimensions == '3D')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Interpolation:")
|
|
|
|
col.prop(act_spline, "tilt_interpolation", text="Tilt")
|
|
|
|
col.prop(act_spline, "radius_interpolation", text="Radius")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(act_spline, "smooth")
|
2009-09-09 00:10:12 +00:00
|
|
|
|
2009-11-19 23:59:37 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
class DATA_PT_font(DataButtonsPanel):
|
|
|
|
bl_label = "Font"
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
def poll(self, context):
|
|
|
|
return (context.object and context.object.type == 'TEXT' and context.curve)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
text = context.curve
|
|
|
|
char = context.curve.edit_format
|
2009-11-19 13:26:51 +00:00
|
|
|
wide_ui = context.region.width > narrowui
|
2009-11-14 23:24:15 +00:00
|
|
|
|
2010-01-11 05:10:57 +00:00
|
|
|
layout.template_ID(text, "font", open="font.open", unlink="font.unlink")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-11 05:10:57 +00:00
|
|
|
#if wide_ui:
|
|
|
|
# layout.prop(text, "font")
|
|
|
|
#else:
|
|
|
|
# layout.prop(text, "font", text="")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(text, "text_size", text="Size")
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-14 23:24:15 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(text, "shear")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Object Font:")
|
|
|
|
col.prop(text, "family", text="")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-14 23:24:15 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Text on Curve:")
|
|
|
|
col.prop(text, "text_on_curve", text="")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
col = split.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Underline:")
|
|
|
|
col.prop(text, "ul_position", text="Position")
|
|
|
|
col.prop(text, "ul_height", text="Thickness")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-14 23:24:15 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Character:")
|
|
|
|
col.prop(char, "bold")
|
|
|
|
col.prop(char, "italic")
|
|
|
|
col.prop(char, "underline")
|
|
|
|
# col.prop(char, "style")
|
|
|
|
# col.prop(char, "wrap")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DATA_PT_paragraph(DataButtonsPanel):
|
|
|
|
bl_label = "Paragraph"
|
2009-11-18 01:30:28 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
def poll(self, context):
|
|
|
|
return (context.object and context.object.type == 'TEXT' and context.curve)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
text = context.curve
|
2009-11-19 13:26:51 +00:00
|
|
|
wide_ui = context.region.width > narrowui
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Align:")
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(text, "spacemode", expand=True)
|
2009-11-14 23:24:15 +00:00
|
|
|
else:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(text, "spacemode", text="")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Spacing:")
|
|
|
|
col.prop(text, "spacing", text="Character")
|
|
|
|
col.prop(text, "word_spacing", text="Word")
|
|
|
|
col.prop(text, "line_dist", text="Line")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-14 23:24:15 +00:00
|
|
|
col = split.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Offset:")
|
|
|
|
col.prop(text, "offset_x", text="X")
|
|
|
|
col.prop(text, "offset_y", text="Y")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DATA_PT_textboxes(DataButtonsPanel):
|
|
|
|
bl_label = "Text Boxes"
|
2009-11-19 23:59:37 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
def poll(self, context):
|
|
|
|
return (context.object and context.object.type == 'TEXT' and context.curve)
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
text = context.curve
|
2009-11-19 13:26:51 +00:00
|
|
|
wide_ui = context.region.width > narrowui
|
2009-11-14 23:24:15 +00:00
|
|
|
|
|
|
|
for box in text.textboxes:
|
|
|
|
split = layout.box().split()
|
|
|
|
|
|
|
|
col = split.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Dimensions:")
|
|
|
|
col.prop(box, "width", text="Width")
|
|
|
|
col.prop(box, "height", text="Height")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
2009-11-19 13:26:51 +00:00
|
|
|
if wide_ui:
|
2009-11-14 23:24:15 +00:00
|
|
|
col = split.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Offset:")
|
|
|
|
col.prop(box, "x", text="X")
|
|
|
|
col.prop(box, "y", text="Y")
|
2009-11-14 23:24:15 +00:00
|
|
|
|
2010-01-08 08:54:41 +00:00
|
|
|
|
2010-02-14 11:21:21 +00:00
|
|
|
classes = [
|
|
|
|
DATA_PT_context_curve,
|
|
|
|
DATA_PT_shape_curve,
|
|
|
|
DATA_PT_geometry_curve,
|
|
|
|
DATA_PT_pathanim,
|
|
|
|
DATA_PT_active_spline,
|
|
|
|
DATA_PT_font,
|
|
|
|
DATA_PT_paragraph,
|
|
|
|
DATA_PT_textboxes,
|
|
|
|
|
|
|
|
DATA_PT_custom_props_curve]
|
|
|
|
|
|
|
|
|
|
|
|
def register():
|
|
|
|
register = bpy.types.register
|
|
|
|
for cls in classes:
|
|
|
|
register(cls)
|
|
|
|
|
2010-02-22 23:32:58 +00:00
|
|
|
|
2010-02-14 11:21:21 +00:00
|
|
|
def unregister():
|
|
|
|
unregister = bpy.types.unregister
|
|
|
|
for cls in classes:
|
|
|
|
unregister(cls)
|
2010-02-16 09:55:07 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
register()
|