Skip to content

Commit

Permalink
Pattern count fix
Browse files Browse the repository at this point in the history
  • Loading branch information
franMarz authored May 23, 2022
1 parent bacb0f0 commit 087f9d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions op_meshtex_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def create_pattern(self, mode, size, scale):
self.report({'ERROR_INVALID_INPUT'}, "This tool requires an available View3D view.")
return

print("Mode '{}' size: '{}'".format(mode, size))

if mode == 'hexagon':
bpy.ops.mesh.primitive_circle_add(vertices=6, radius=scale, fill_type='NGON')
Expand All @@ -102,7 +101,7 @@ def create_pattern(self, mode, size, scale):

AddArray("Array0", 0.75,-0.5,2)
AddArray("Array1", 0,-0.66666666666,size)
AddArray("Array2", 1 - (0.5/3.5),0,size*0.66)
AddArray("Array2", 1 - (0.5/3.5),0,int(size*0.66))

elif mode == 'triangle':
bpy.ops.mesh.primitive_circle_add(vertices=3, radius=scale, fill_type='NGON')
Expand All @@ -122,7 +121,7 @@ def create_pattern(self, mode, size, scale):
modifier.show_expanded = False
AddArray("Array0", 0.5,-0.5,2)
AddArray("Array1", 1-1/3.0,0,size)
AddArray("Array1", 0,-(1-1/3.0),size*0.66)
AddArray("Array1", 0,-(1-1/3.0),int(size*0.66))

elif mode == 'rectangle':
bpy.ops.mesh.primitive_plane_add(size=scale)
Expand Down

0 comments on commit 087f9d7

Please sign in to comment.