Skip to content
Snippets Groups Projects
Commit 147aaf7d authored by Brendon Murphy's avatar Brendon Murphy
Browse files

adding operator presets

parent 8b98016c
Branches
No related tags found
No related merge requests found
...@@ -149,7 +149,7 @@ class AddZFunctionSurface(bpy.types.Operator): ...@@ -149,7 +149,7 @@ class AddZFunctionSurface(bpy.types.Operator):
'''Add a surface defined defined by a function z=f(x,y)''' '''Add a surface defined defined by a function z=f(x,y)'''
bl_idname = "mesh.primitive_z_function_surface" bl_idname = "mesh.primitive_z_function_surface"
bl_label = "Add Z Function Surface" bl_label = "Add Z Function Surface"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
equation = StringProperty(name="Z Equation", equation = StringProperty(name="Z Equation",
description="Equation for z=f(x,y)", description="Equation for z=f(x,y)",
...@@ -403,7 +403,7 @@ class AddXYZFunctionSurface(bpy.types.Operator): ...@@ -403,7 +403,7 @@ class AddXYZFunctionSurface(bpy.types.Operator):
+ ''' x=F1(u,v), y=F2(u,v) and z=F3(u,v)''' + ''' x=F1(u,v), y=F2(u,v) and z=F3(u,v)'''
bl_idname = "mesh.primitive_xyz_function_surface" bl_idname = "mesh.primitive_xyz_function_surface"
bl_label = "Add X,Y,Z Function Surface" bl_label = "Add X,Y,Z Function Surface"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
x_eq = StringProperty(name="X equation", x_eq = StringProperty(name="X equation",
description="Equation for x=F(u,v). " \ description="Equation for x=F(u,v). " \
......
...@@ -360,7 +360,7 @@ class AddSqorus(bpy.types.Operator): ...@@ -360,7 +360,7 @@ class AddSqorus(bpy.types.Operator):
'''Add a sqorus mesh.''' '''Add a sqorus mesh.'''
bl_idname = "mesh.primitive_sqorus_add" bl_idname = "mesh.primitive_sqorus_add"
bl_label = "Add Sqorus" bl_label = "Add Sqorus"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
hole_size = FloatProperty(name="Hole Size", hole_size = FloatProperty(name="Hole Size",
description="Size of the Hole", description="Size of the Hole",
...@@ -389,7 +389,7 @@ class AddWedge(bpy.types.Operator): ...@@ -389,7 +389,7 @@ class AddWedge(bpy.types.Operator):
'''Add a wedge mesh.''' '''Add a wedge mesh.'''
bl_idname = "mesh.primitive_wedge_add" bl_idname = "mesh.primitive_wedge_add"
bl_label = "Add Wedge" bl_label = "Add Wedge"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
size_x = FloatProperty(name="Size X", size_x = FloatProperty(name="Size X",
description="Size along the X axis", description="Size along the X axis",
...@@ -423,7 +423,7 @@ class AddStar(bpy.types.Operator): ...@@ -423,7 +423,7 @@ class AddStar(bpy.types.Operator):
'''Add a star mesh.''' '''Add a star mesh.'''
bl_idname = "mesh.primitive_star_add" bl_idname = "mesh.primitive_star_add"
bl_label = "Add Star" bl_label = "Add Star"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
points = IntProperty(name="Points", points = IntProperty(name="Points",
description="Number of points for the star", description="Number of points for the star",
...@@ -464,7 +464,7 @@ class AddTrapezohedron(bpy.types.Operator): ...@@ -464,7 +464,7 @@ class AddTrapezohedron(bpy.types.Operator):
bl_idname = "mesh.primitive_trapezohedron_add" bl_idname = "mesh.primitive_trapezohedron_add"
bl_label = "Add trapezohedron" bl_label = "Add trapezohedron"
bl_description = "Create one of the regular solids" bl_description = "Create one of the regular solids"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
segments = IntProperty(name = "Segments", segments = IntProperty(name = "Segments",
description = "Number of repeated segments", description = "Number of repeated segments",
......
...@@ -574,7 +574,7 @@ class AddGear(bpy.types.Operator): ...@@ -574,7 +574,7 @@ class AddGear(bpy.types.Operator):
'''Add a gear mesh.''' '''Add a gear mesh.'''
bl_idname = "mesh.primitive_gear" bl_idname = "mesh.primitive_gear"
bl_label = "Add Gear" bl_label = "Add Gear"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
number_of_teeth = IntProperty(name="Number of Teeth", number_of_teeth = IntProperty(name="Number of Teeth",
description="Number of teeth on the gear", description="Number of teeth on the gear",
...@@ -680,7 +680,7 @@ class AddWormGear(bpy.types.Operator): ...@@ -680,7 +680,7 @@ class AddWormGear(bpy.types.Operator):
'''Add a worm gear mesh.''' '''Add a worm gear mesh.'''
bl_idname = "mesh.primitive_worm_gear" bl_idname = "mesh.primitive_worm_gear"
bl_label = "Add Worm Gear" bl_label = "Add Worm Gear"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
number_of_teeth = IntProperty(name="Number of Teeth", number_of_teeth = IntProperty(name="Number of Teeth",
description="Number of teeth on the gear", description="Number of teeth on the gear",
......
...@@ -242,7 +242,7 @@ class AddDiamond(bpy.types.Operator): ...@@ -242,7 +242,7 @@ class AddDiamond(bpy.types.Operator):
'''Add a diamond mesh.''' '''Add a diamond mesh.'''
bl_idname = "mesh.primitive_diamond_add" bl_idname = "mesh.primitive_diamond_add"
bl_label = "Add Diamond" bl_label = "Add Diamond"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
segments = IntProperty(name="Segments", segments = IntProperty(name="Segments",
description="Number of segments for the diamond", description="Number of segments for the diamond",
...@@ -287,7 +287,7 @@ class AddGem(bpy.types.Operator): ...@@ -287,7 +287,7 @@ class AddGem(bpy.types.Operator):
bl_idname = "mesh.primitive_gem_add" bl_idname = "mesh.primitive_gem_add"
bl_label = "Add Gem" bl_label = "Add Gem"
bl_description = "Create an offset faceted gem" bl_description = "Create an offset faceted gem"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
segments = IntProperty(name="Segments", segments = IntProperty(name="Segments",
description="Longitudial segmentation", description="Longitudial segmentation",
......
...@@ -113,7 +113,7 @@ class AddPyramid(bpy.types.Operator, AddObjectHelper): ...@@ -113,7 +113,7 @@ class AddPyramid(bpy.types.Operator, AddObjectHelper):
"""Add a Mesh Object""" """Add a Mesh Object"""
bl_idname = "mesh.primitive_steppyramid_add" bl_idname = "mesh.primitive_steppyramid_add"
bl_label = "Pyramid" bl_label = "Pyramid"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
initial_size = FloatProperty(name="Initial Size", default=2.0, initial_size = FloatProperty(name="Initial Size", default=2.0,
min=0.0, max=20.0, min=0.0, max=20.0,
......
...@@ -152,7 +152,7 @@ class add_supertoroid(bpy.types.Operator): ...@@ -152,7 +152,7 @@ class add_supertoroid(bpy.types.Operator):
bl_idname = "mesh.primitive_supertoroid_add" bl_idname = "mesh.primitive_supertoroid_add"
bl_label = "Add SuperToroid" bl_label = "Add SuperToroid"
bl_description = "Create a SuperToroid" bl_description = "Create a SuperToroid"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
R = FloatProperty(name = "big radius", R = FloatProperty(name = "big radius",
description = "The radius inside the tube", description = "The radius inside the tube",
......
...@@ -186,7 +186,7 @@ class AddTwistedTorus(bpy.types.Operator): ...@@ -186,7 +186,7 @@ class AddTwistedTorus(bpy.types.Operator):
'''Add a torus mesh''' '''Add a torus mesh'''
bl_idname = "mesh.primitive_twisted_torus_add" bl_idname = "mesh.primitive_twisted_torus_add"
bl_label = "Add Torus" bl_label = "Add Torus"
bl_options = {'REGISTER', 'UNDO'} bl_options = {'REGISTER', 'UNDO', 'PRESET'}
major_radius = FloatProperty(name="Major Radius", major_radius = FloatProperty(name="Major Radius",
description="Radius from the origin to the" \ description="Radius from the origin to the" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment