From 18a52f8f92c0d09f65cde7fab194fb73739b095a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 4 Dec 2014 13:28:30 +0100 Subject: [PATCH] Adjust patch orientation script --- .../3d/plugin_max/scripts/nel_orient_zones.ms | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms b/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms index fb5ba2862..26fd67171 100644 --- a/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms +++ b/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms @@ -33,13 +33,19 @@ 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" + --print "x normal" rotnormal = (normal * (rotateXMatrix -90)) ) - -- print rotnormal + else + ( + normal.z = 0 + normal = (normalize normal) + rotnormal = (normal * (rotateZMatrix -90)) + ) + --print rotnormal -- print normal -- print rotnormal @@ -106,3 +112,13 @@ undo off ) ) ) + +max select none +clearselection() +undo off +( + for cnode in nodes do + ( + selectmore cnode + ) +)