Newer
Older
box.prop(props, 'arcType') # has only one Type?
box.prop(props, 'startAngle')
box.prop(props, 'endAngle')
box.prop(props, 'innerRadius') # doesn't seem to do anything
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
box.prop(props, 'outerRadius')
if props.GalloreType == 'Cogwheel':
box.prop(props, 'teeth')
box.prop(props, 'bevel')
box.prop(props, 'innerRadius')
box.prop(props, 'middleRadius')
box.prop(props, 'outerRadius')
if props.GalloreType == 'Nsided':
box.prop(props, 'Nsides')
box.prop(props, 'outerRadius', text='Radius')
'''
if props.GalloreType == 'Splat':
box.prop(props, 'splatSides')
box.prop(props, 'outerRadius')
box.prop(props, 'splatScale')
box.prop(props, 'seed')
box.prop(props, 'basis')
'''
if props.GalloreType == 'Helix':
box.prop(props, 'helixPoints')
box.prop(props, 'helixHeight')
box.prop(props, 'helixWidth')
box.prop(props, 'helixStart')
box.prop(props, 'helixEnd')
box.prop(props, 'helix_a')
box.prop(props, 'helix_b')
if props.GalloreType == 'Cycloid':
box.prop(props, 'cycloPoints')
#box.prop(props, 'cycloType') # needs the other types first
box.prop(props, 'cycloStart')
box.prop(props, 'cycloEnd')
box.prop(props, 'cyclo_a')
box.prop(props, 'cyclo_b')
box.prop(props, 'cyclo_d')
col = layout.column()
col.label(text="Output Curve Type")
row = layout.row()
row.prop(props, 'outputType', expand=True)
col = layout.column()
col.label(text="Curve Options")
# output options
box = layout.box()
if props.outputType == 'NURBS':
box.row().prop(props, 'shape', expand=True)
box.prop(props, 'order_u')
if props.outputType == 'POLY':
box.row().prop(props, 'shape', expand=True)
if props.outputType == 'BEZIER':
box.row().prop(props, 'shape', expand=True)
box.row().prop(props, 'handleType', expand=True)
@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
props = self.properties
if props.GalloreType in ['Helix', 'Cycloid']:
props.shape = '3D'
#else:
#props.shape = '2D' # someone decide if we want this
main(context, props, 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__":