mirror of
https://github.com/drewcassidy/TexTools-Blender
synced 2024-09-01 14:54:44 +00:00
Merge pull request #24 from franMarz/master
op_island_align_world additional fixes (fix by franMarz)
This commit is contained in:
commit
2b5a6c8e12
@ -118,7 +118,7 @@ def main(self, context):
|
|||||||
elif(abs(avg_normal.z) == max_size):
|
elif(abs(avg_normal.z) == max_size):
|
||||||
print("z normal")
|
print("z normal")
|
||||||
if self.bool_simple:
|
if self.bool_simple:
|
||||||
align_island_simple(obj, bm, uv_layers, faces, x, z, avg_normal.y > 0, False)
|
align_island_simple(obj, bm, uv_layers, faces, x, y, False, avg_normal.z < 0)
|
||||||
else:
|
else:
|
||||||
align_island(obj, bm, uv_layers, faces, x, y, False, avg_normal.z < 0)
|
align_island(obj, bm, uv_layers, faces, x, y, False, avg_normal.z < 0)
|
||||||
|
|
||||||
@ -232,6 +232,7 @@ def align_island_simple(obj, bm, uv_layers, faces, x=0, y=1, flip_x=False, flip_
|
|||||||
edge = faces[0].edges[0]
|
edge = faces[0].edges[0]
|
||||||
delta = edge.verts[0].co -edge.verts[1].co
|
delta = edge.verts[0].co -edge.verts[1].co
|
||||||
max_side = max(abs(delta.x), abs(delta.y), abs(delta.z))
|
max_side = max(abs(delta.x), abs(delta.y), abs(delta.z))
|
||||||
|
a_delta = 0
|
||||||
|
|
||||||
# Check edges dominant in active axis
|
# Check edges dominant in active axis
|
||||||
if abs(delta[x]) == max_side or abs(delta[y]) == max_side :
|
if abs(delta[x]) == max_side or abs(delta[y]) == max_side :
|
||||||
|
Loading…
Reference in New Issue
Block a user