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.
This commit is contained in:
2009-07-27 20:39:10 +00:00
parent 793324ef83
commit 09fd0a5e48
8 changed files with 232 additions and 232 deletions

View File

@@ -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)