diff options
author | Thomas Dinges <blender@dingto.org> | 2009-07-28 00:39:10 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-07-28 00:39:10 +0400 |
commit | 09fd0a5e48ec415a1e1ec3bbc1e062d206c8a8f3 (patch) | |
tree | 35831f0a148ec57350575151a70e7a06c3b5c5e9 /release/ui/buttons_data_curve.py | |
parent | 793324ef836f9719c8c97c51ed9e4c6a7bb68e59 (diff) |
2.5 Part 1 of Layout Code Cleanup:
* Again, some layout code cleaning.
* Made assignments more consistent.
I started to write code guidelines in the wiki:
http://wiki.blender.org/index.php/LayoutFiles-Code_Guidelines
Matt/William: You are welcome to change them or add new infos, I will continue on improving them as well in the next few days.
Diffstat (limited to 'release/ui/buttons_data_curve.py')
-rw-r--r-- | release/ui/buttons_data_curve.py | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py index 36272ca5d3d..d0e1756986d 100644 --- a/release/ui/buttons_data_curve.py +++ b/release/ui/buttons_data_curve.py @@ -28,7 +28,6 @@ class DATA_PT_context_curve(DataButtonsPanel): split.template_ID(space, "pin_id") split.itemS() - class DATA_PT_shape_curve(DataButtonsPanel): __label__ = "Shape" @@ -72,6 +71,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel): def draw(self, context): layout = self.layout + curve = context.curve split = layout.split() @@ -93,60 +93,63 @@ class DATA_PT_pathanim(DataButtonsPanel): def draw_header(self, context): layout = self.layout + curve = context.curve layout.itemR(curve, "path", text="") def draw(self, context): - curve = context.curve layout = self.layout + + curve = context.curve + layout.active = curve.path split = layout.split() - sub = split.column() - sub.itemR(curve, "path_length", text="Frames") - sub.itemR(curve, "follow") + col = split.column() + col.itemR(curve, "path_length", text="Frames") + col.itemR(curve, "follow") - sub = split.column() - sub.itemR(curve, "stretch") - sub.itemR(curve, "offset_path_distance", text="Offset Children") + col = split.column() + col.itemR(curve, "stretch") + col.itemR(curve, "offset_path_distance", text="Offset Children") class DATA_PT_current_curve(DataButtonsPanel): __label__ = "Current Curve" def draw(self, context): layout = self.layout + currentcurve = context.curve.curves[0] # XXX split = layout.split() - sub = split.column() - sub.itemL(text="Cyclic:") - sub.itemR(currentcurve, "cyclic_u", text="U") - sub.itemR(currentcurve, "cyclic_v", text="V") - sub.itemL(text="Order:") - sub.itemR(currentcurve, "order_u", text="U") - sub.itemR(currentcurve, "order_v", text="V") - sub.itemL(text="Endpoints:") - sub.itemR(currentcurve, "endpoint_u", text="U") - sub.itemR(currentcurve, "endpoint_v", text="V") + col = split.column() + col.itemL(text="Cyclic:") + col.itemR(currentcurve, "cyclic_u", text="U") + col.itemR(currentcurve, "cyclic_v", text="V") + col.itemL(text="Order:") + col.itemR(currentcurve, "order_u", text="U") + col.itemR(currentcurve, "order_v", text="V") + col.itemL(text="Endpoints:") + col.itemR(currentcurve, "endpoint_u", text="U") + col.itemR(currentcurve, "endpoint_v", text="V") - sub = split.column() - sub.itemL(text="Bezier:") - sub.itemR(currentcurve, "bezier_u", text="U") - sub.itemR(currentcurve, "bezier_v", text="V") - sub.itemL(text="Resolution:") - sub.itemR(currentcurve, "resolution_u", text="U") - sub.itemR(currentcurve, "resolution_v", text="V") - sub.itemL(text="Interpolation:") - sub.itemR(currentcurve, "tilt_interpolation", text="Tilt") - sub.itemR(currentcurve, "radius_interpolation", text="Tilt") - sub.itemR(currentcurve, "smooth") + col = split.column() + col.itemL(text="Bezier:") + col.itemR(currentcurve, "bezier_u", text="U") + col.itemR(currentcurve, "bezier_v", text="V") + col.itemL(text="Resolution:") + col.itemR(currentcurve, "resolution_u", text="U") + col.itemR(currentcurve, "resolution_v", text="V") + col.itemL(text="Interpolation:") + col.itemR(currentcurve, "tilt_interpolation", text="Tilt") + col.itemR(currentcurve, "radius_interpolation", text="Tilt") + col.itemR(currentcurve, "smooth") bpy.types.register(DATA_PT_context_curve) bpy.types.register(DATA_PT_shape_curve) bpy.types.register(DATA_PT_geometry_curve) bpy.types.register(DATA_PT_pathanim) bpy.types.register(DATA_PT_current_curve) - |