Fix ig elevation paths

hg/develop
kaetemi 5 years ago committed by Jan Boon
parent a34541fe95
commit a0869f11cd

@ -259,13 +259,13 @@ int main(int nNbArg, char**ppArgs)
printf ("ZFactor2 = 0.5;\n");
printf ("LandFile = \"w:/matis.land\";\n");
return -1;
return EXIT_FAILURE;
}
SExportOptions options;
if (!options.load(ppArgs[1]))
{
return -1;
return EXIT_FAILURE;
}
// Get all ig files in the input directory and elevate to the z of the double heightmap
@ -358,7 +358,7 @@ int main(int nNbArg, char**ppArgs)
for (uint32 i = 0; i < vAllFiles.size(); ++i)
{
CInstanceGroup *pIG = LoadInstanceGroup (CPath::standardizePath(options.InputIGDir) + vAllFiles[i]);
CInstanceGroup *pIG = LoadInstanceGroup (vAllFiles[i]);
if (pIG != NULL)
{
@ -430,11 +430,13 @@ int main(int nNbArg, char**ppArgs)
pIGout->build (vGlobalPos, IA, Clusters, Portals, PLN);
pIGout->enableRealTimeSunContribution(realTimeSunContribution);
SaveInstanceGroup (CPath::standardizePath(options.OutputIGDir) + vAllFiles[i], pIGout);
std::string outFilePath = CPath::standardizePath(options.OutputIGDir, true) + CFile::getFilename(vAllFiles[i]);
nldebug("Writing %s...", outFilePath.c_str());
SaveInstanceGroup(outFilePath, pIGout);
delete pIG;
}
}
return 1;
return EXIT_SUCCESS;
}

@ -54,6 +54,8 @@ mkPath(log, configDir)
def igElevation(inputIgDir, outputIgDir):
printLog(log, ">>> IG Elevation <<<")
mkPath(log, inputIgDir)
mkPath(log, outputIgDir)
needUpdateIg = needUpdateDirByTagLog(log, inputIgDir, ".ig", outputIgDir, ".ig")
if needUpdateIg:
printLog(log, "DETECT UPDATE IG->Elevated")
@ -100,7 +102,7 @@ def igElevation(inputIgDir, outputIgDir):
os.remove(configFile)
# Copy remaining IG files
copyFilesLogless(log, inputIgDir, outputIgDir)
#BUG:copyFilesLogless(log, inputIgDir, outputIgDir)
else:
printLog(log, "DETECT DECIDE SKIP")
printLog(log, "SKIP *")

Loading…
Cancel
Save