mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-11 15:41:48 +00:00
Mesh cooker updates
This commit is contained in:
@@ -371,7 +371,8 @@ static void VisitFile(const ProjectPath& path,
|
||||
if (spec.second->canCook(path))
|
||||
{
|
||||
ProjectPath cooked = path.getCookedPath(*spec.first);
|
||||
if (path.getModtime() > cooked.getModtime())
|
||||
if (cooked.getPathType() == ProjectPath::PT_NONE ||
|
||||
path.getModtime() > cooked.getModtime())
|
||||
{
|
||||
progress.reportFile(spec.first);
|
||||
spec.second->doCook(path, cooked);
|
||||
@@ -398,6 +399,13 @@ static void VisitDirectory(const ProjectPath& dir, bool recursive,
|
||||
++childFileCount;
|
||||
break;
|
||||
}
|
||||
case ProjectPath::PT_LINK:
|
||||
{
|
||||
ProjectPath target = child.resolveLink();
|
||||
if (target.getPathType() == ProjectPath::PT_FILE)
|
||||
++childFileCount;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@@ -416,6 +424,16 @@ static void VisitDirectory(const ProjectPath& dir, bool recursive,
|
||||
VisitFile(child, specInsts, progress);
|
||||
break;
|
||||
}
|
||||
case ProjectPath::PT_LINK:
|
||||
{
|
||||
ProjectPath target = child.resolveLink();
|
||||
if (target.getPathType() == ProjectPath::PT_FILE)
|
||||
{
|
||||
progress.changeFile(target.getLastComponent(), progNum++/progDenom);
|
||||
VisitFile(target, specInsts, progress);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@@ -457,6 +475,13 @@ static void VisitGlob(const ProjectPath& path, bool recursive,
|
||||
++childFileCount;
|
||||
break;
|
||||
}
|
||||
case ProjectPath::PT_LINK:
|
||||
{
|
||||
ProjectPath target = path.resolveLink();
|
||||
if (target.getPathType() == ProjectPath::PT_FILE)
|
||||
++childFileCount;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@@ -475,6 +500,16 @@ static void VisitGlob(const ProjectPath& path, bool recursive,
|
||||
VisitFile(child, specInsts, progress);
|
||||
break;
|
||||
}
|
||||
case ProjectPath::PT_LINK:
|
||||
{
|
||||
ProjectPath target = path.resolveLink();
|
||||
if (target.getPathType() == ProjectPath::PT_FILE)
|
||||
{
|
||||
progress.changeFile(target.getLastComponent(), progNum++/progDenom);
|
||||
VisitFile(target, specInsts, progress);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@@ -518,6 +553,16 @@ bool Project::cookPath(const ProjectPath& path, FProgress progress, bool recursi
|
||||
VisitFile(path, specInsts, cookProg);
|
||||
break;
|
||||
}
|
||||
case ProjectPath::PT_LINK:
|
||||
{
|
||||
ProjectPath target = path.resolveLink();
|
||||
if (target.getPathType() == ProjectPath::PT_FILE)
|
||||
{
|
||||
cookProg.changeFile(target.getLastComponent(), 0.0);
|
||||
VisitFile(target, specInsts, cookProg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ProjectPath::PT_DIRECTORY:
|
||||
{
|
||||
VisitDirectory(path, recursive, specInsts, cookProg);
|
||||
|
||||
Reference in New Issue
Block a user