Newer
Older
Thomas Dinges
committed
box.prop(self.properties, 'arcType') # has only one Type?
box.prop(self.properties, 'startAngle')
box.prop(self.properties, 'endAngle')
box.prop(self.properties, 'innerRadius') # doesn't seem to do anything
box.prop(self.properties, 'outerRadius')
if self.GalloreType == 'Cogwheel':
box.prop(self.properties, 'teeth')
box.prop(self.properties, 'bevel')
box.prop(self.properties, 'innerRadius')
box.prop(self.properties, 'middleRadius')
box.prop(self.properties, 'outerRadius')
if self.GalloreType == 'Nsided':
box.prop(self.properties, 'Nsides')
box.prop(self.properties, 'outerRadius', text='Radius')
Thomas Dinges
committed
if self.GalloreType == 'Splat':
box.prop(self.properties, 'splatSides')
box.prop(self.properties, 'outerRadius')
box.prop(self.properties, 'splatScale')
box.prop(self.properties, 'seed')
box.prop(self.properties, 'basis')
Thomas Dinges
committed
if self.GalloreType == 'Helix':
box.prop(self.properties, 'helixPoints')
box.prop(self.properties, 'helixHeight')
box.prop(self.properties, 'helixWidth')
box.prop(self.properties, 'helixStart')
box.prop(self.properties, 'helixEnd')
box.prop(self.properties, 'helix_a')
box.prop(self.properties, 'helix_b')
if self.GalloreType == 'Cycloid':
box.prop(self.properties, 'cycloPoints')
#box.prop(self.properties, 'cycloType') # needs the other types first
box.prop(self.properties, 'cycloStart')
box.prop(self.properties, 'cycloEnd')
box.prop(self.properties, 'cyclo_a')
box.prop(self.properties, 'cyclo_b')
box.prop(self.properties, 'cyclo_d')
col = layout.column()
col.label(text="Output Curve Type")
row = layout.row()
Thomas Dinges
committed
row.prop(self.properties, 'outputType', expand=True)
col = layout.column()
col.label(text="Curve Options")
# output options
box = layout.box()
Thomas Dinges
committed
if self.outputType == 'NURBS':
box.row().prop(self.properties, 'shape', expand=True)
#box.prop(self.properties, 'use_cyclic_u')
#box.prop(self.properties, 'endp_u')
box.prop(self.properties, 'order_u')
Thomas Dinges
committed
if self.outputType == 'POLY':
box.row().prop(self.properties, 'shape', expand=True)
#box.prop(self.properties, 'use_cyclic_u')
Thomas Dinges
committed
if self.outputType == 'BEZIER':
box.row().prop(self.properties, 'shape', expand=True)
box.row().prop(self.properties, 'handleType', expand=True)
#box.prop(self.properties, 'use_cyclic_u')
@classmethod
def poll(cls, context):
return context.scene != None
##### EXECUTE #####
def execute(self, context):
# turn off undo
undo = bpy.context.user_preferences.edit.use_global_undo
bpy.context.user_preferences.edit.use_global_undo = False
# deal with 2D - 3D curve differences
Thomas Dinges
committed
if self.GalloreType in ['Helix', 'Cycloid']:
self.shape = '3D'
Thomas Dinges
committed
#self.shape = '2D' # someone decide if we want this
Thomas Dinges
committed
if self.GalloreType in ['Helix']:
self.use_cyclic_u = False
Thomas Dinges
committed
self.use_cyclic_u = True
Thomas Dinges
committed
main(context, self, self.align_matrix)
# restore pre operator undo state
bpy.context.user_preferences.edit.use_global_undo = undo
return {'FINISHED'}
##### INVOKE #####
def invoke(self, context, event):
# store creation_matrix
self.align_matrix = align_matrix(context)
self.execute(context)
return {'FINISHED'}
################################################################################
##### REGISTER #####
def Curveaceous_galore_button(self, context):
self.layout.operator(Curveaceous_galore.bl_idname, text="curvatures gallore", icon="PLUGIN")
def register():
bpy.types.INFO_MT_curve_add.append(Curveaceous_galore_button)
def unregister():
bpy.types.INFO_MT_curve_add.remove(Curveaceous_galore_button)
if __name__ == "__main__":