mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
Fix XRef ligo export
This commit is contained in:
parent
fa64fb9359
commit
98db1841c3
1 changed files with 37 additions and 67 deletions
|
@ -233,6 +233,15 @@ fn exportCollisionsFromZone outputNelDir filename =
|
|||
if (isToBeExportedCollision m) == true then
|
||||
selectmore m
|
||||
)
|
||||
for node in objects where classOf node == XRefObject do
|
||||
(
|
||||
sourceObject = node.GetSourceObject false
|
||||
if (superclassOf sourceObject == GeometryClass) then
|
||||
(
|
||||
if (isToBeExportedCollision node) == true then
|
||||
selectmore node
|
||||
)
|
||||
)
|
||||
|
||||
-- Export the collision
|
||||
if (NelExportCollision ($selection as array) outputNelDir) == false then
|
||||
|
@ -311,10 +320,10 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi
|
|||
|
||||
-- Scan all the ig in this project
|
||||
nlerror("Scan all the ig in this project")
|
||||
for node in geometry do
|
||||
for node in objects do
|
||||
(
|
||||
ig = getIg node
|
||||
nlerror("geometry node")
|
||||
nlerror("object node")
|
||||
if ( (ig != undefined) and (ig != "") and ( (igName == "") or (ig == igName) ) ) then
|
||||
(
|
||||
nlerror("Found something with an IG name")
|
||||
|
@ -347,71 +356,6 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi
|
|||
)
|
||||
)
|
||||
|
||||
for node in lights do
|
||||
(
|
||||
ig = getIg node
|
||||
|
||||
if ( (ig != undefined) and (ig != "") and ( (igName == "") or ( ig == igName) ) ) then
|
||||
(
|
||||
-- Transition ?
|
||||
if ( ig == IgName) then
|
||||
(
|
||||
-- Transform the object
|
||||
node.transform = buildTransitionMatrixObj node.transform transitionZone cellSize
|
||||
)
|
||||
|
||||
-- Found ?
|
||||
found = false
|
||||
|
||||
-- Already found ?
|
||||
for j = 1 to ig_array.count do
|
||||
(
|
||||
if (ig_array[j]==ig) then
|
||||
(
|
||||
found = true
|
||||
)
|
||||
)
|
||||
|
||||
-- Found ?
|
||||
if (found == false) then
|
||||
(
|
||||
append ig_array ig
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
for node in helpers do
|
||||
(
|
||||
ig = getIg node
|
||||
if ( (ig != undefined) and (ig != "") and ( (igName == "") or (ig == igName) ) ) then
|
||||
(
|
||||
-- Transition ?
|
||||
if (ig == IgName) then
|
||||
(
|
||||
-- Transform the object
|
||||
node.transform = buildTransitionMatrixObj node.transform transitionZone cellSize
|
||||
)
|
||||
|
||||
-- Found ?
|
||||
found = false
|
||||
-- Already found ?
|
||||
for j = 1 to ig_array.count do
|
||||
(
|
||||
if (ig_array[j]==ig) then
|
||||
(
|
||||
found = true
|
||||
)
|
||||
)
|
||||
-- Found ?
|
||||
if (found == false) then
|
||||
(
|
||||
append ig_array ig
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- Have some ig ?
|
||||
if (ig_array.count != 0) then
|
||||
(
|
||||
|
@ -429,6 +373,29 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi
|
|||
-- Select none
|
||||
max select none
|
||||
|
||||
for node in objects where classOf node == XRefObject do
|
||||
(
|
||||
if ((getIg node) == ig_array[ig]) then
|
||||
(
|
||||
sourceObject = node.GetSourceObject false
|
||||
if (classOf sourceObject == XRefObject) then
|
||||
(
|
||||
nlerror("FAIL XREF STILL XREF " + node.name)
|
||||
)
|
||||
else if (superclassOf sourceObject == GeometryClass) then
|
||||
(
|
||||
selectmore node
|
||||
)
|
||||
else if (superclassOf sourceObject == Helper) then
|
||||
(
|
||||
selectmore node
|
||||
)
|
||||
else if (superclassOf sourceObject == Light) then
|
||||
(
|
||||
selectmore node
|
||||
)
|
||||
)
|
||||
)
|
||||
-- Select all node in this ig
|
||||
for node in geometry do
|
||||
(
|
||||
|
@ -528,6 +495,7 @@ try
|
|||
|
||||
nlerror ("Scanning file "+curFileName+" ...")
|
||||
mergeMaxFile curFileName quiet:true
|
||||
objXRefMgr.UpdateAllRecords()
|
||||
|
||||
-- Unhide category
|
||||
unhidecategory()
|
||||
|
@ -674,6 +642,7 @@ try
|
|||
|
||||
nlerror ("Scanning file "+curFileName+" ...")
|
||||
mergeMaxFile curFileName quiet:true
|
||||
objXRefMgr.UpdateAllRecords()
|
||||
|
||||
-- Unhide category
|
||||
unhidecategory()
|
||||
|
@ -888,6 +857,7 @@ try
|
|||
|
||||
nlerror ("Scanning file "+curFileName+" ...")
|
||||
mergeMaxFile curFileName quiet:true
|
||||
objXRefMgr.UpdateAllRecords()
|
||||
|
||||
-- Unhide category
|
||||
unhidecategory()
|
||||
|
|
Loading…
Reference in a new issue