Adjust patch orientation script

This commit is contained in:
kaetemi 2014-12-04 13:28:30 +01:00
parent bd19b0e381
commit 3e76aa891f

View file

@ -33,12 +33,18 @@ undo off
normal = (cross (end - begin) (ref - begin))
normal = (normalize normal)
rotnormal = (normal * (rotateZMatrix -90))
rotnormal = (point3 0 0 0)
if (normal.z > 0.9) then
(
--print "x normal"
rotnormal = (normal * (rotateXMatrix -90))
)
else
(
normal.z = 0
normal = (normalize normal)
rotnormal = (normal * (rotateZMatrix -90))
)
--print rotnormal
-- print normal
@ -106,3 +112,13 @@ undo off
)
)
)
max select none
clearselection()
undo off
(
for cnode in nodes do
(
selectmore cnode
)
)