Adjust patch orientation script
--HG-- branch : develop
This commit is contained in:
parent
90f1234ed0
commit
07286c14d1
1 changed files with 19 additions and 3 deletions
|
@ -33,12 +33,18 @@ undo off
|
||||||
normal = (cross (end - begin) (ref - begin))
|
normal = (cross (end - begin) (ref - begin))
|
||||||
normal = (normalize normal)
|
normal = (normalize normal)
|
||||||
|
|
||||||
rotnormal = (normal * (rotateZMatrix -90))
|
rotnormal = (point3 0 0 0)
|
||||||
if (normal.z > 0.9) then
|
if (normal.z > 0.9) then
|
||||||
(
|
(
|
||||||
--print "x normal"
|
--print "x normal"
|
||||||
rotnormal = (normal * (rotateXMatrix -90))
|
rotnormal = (normal * (rotateXMatrix -90))
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
(
|
||||||
|
normal.z = 0
|
||||||
|
normal = (normalize normal)
|
||||||
|
rotnormal = (normal * (rotateZMatrix -90))
|
||||||
|
)
|
||||||
--print rotnormal
|
--print rotnormal
|
||||||
|
|
||||||
-- print normal
|
-- print normal
|
||||||
|
@ -106,3 +112,13 @@ undo off
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
max select none
|
||||||
|
clearselection()
|
||||||
|
undo off
|
||||||
|
(
|
||||||
|
for cnode in nodes do
|
||||||
|
(
|
||||||
|
selectmore cnode
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue