replace self.properties.foo --> self.foo
This commit is contained in:
@@ -107,17 +107,16 @@ class AddTorus(bpy.types.Operator):
|
||||
rotation = FloatVectorProperty(name="Rotation")
|
||||
|
||||
def execute(self, context):
|
||||
props = self.properties
|
||||
|
||||
if props.use_abso == True:
|
||||
extra_helper = (props.abso_major_rad - props.abso_minor_rad) * 0.5
|
||||
props.major_radius = props.abso_minor_rad + extra_helper
|
||||
props.minor_radius = extra_helper
|
||||
if self.use_abso == True:
|
||||
extra_helper = (self.abso_major_rad - self.abso_minor_rad) * 0.5
|
||||
self.major_radius = self.abso_minor_rad + extra_helper
|
||||
self.minor_radius = extra_helper
|
||||
|
||||
verts_loc, faces = add_torus(props.major_radius,
|
||||
props.minor_radius,
|
||||
props.major_segments,
|
||||
props.minor_segments)
|
||||
verts_loc, faces = add_torus(self.major_radius,
|
||||
self.minor_radius,
|
||||
self.major_segments,
|
||||
self.minor_segments)
|
||||
|
||||
mesh = bpy.data.meshes.new("Torus")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user