accc: fix crash on missing file names and ignore subdiv
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9220 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
parent
c2951db895
commit
87ae22873a
|
@ -60,6 +60,7 @@
|
|||
#define MAT "mat"
|
||||
#define REFS "refs"
|
||||
#define CREASE "crease"
|
||||
#define SUBDIV "subdiv"
|
||||
|
||||
ob_t::ob_t() :
|
||||
kids(0),
|
||||
|
@ -252,6 +253,7 @@ int doSurf(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials);
|
|||
int doMat(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials);
|
||||
int doRefs(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials);
|
||||
int doCrease(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials);
|
||||
int doSubdiv(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials);
|
||||
|
||||
void computeSaveAC3D(const std::string & OutputFilename, std::list<ob_t> &objects, const std::vector<mat_t> &materials);
|
||||
void computeSaveOBJ(const std::string & OutputFilename, std::list<ob_t> &objects, const std::vector<mat_t> &materials);
|
||||
|
@ -275,6 +277,7 @@ verbaction_t verbTab[] =
|
|||
{ MAT, doMat },
|
||||
{ REFS, doRefs },
|
||||
{ CREASE, doCrease },
|
||||
{ SUBDIV, doSubdiv, },
|
||||
{ "END", NULL } };
|
||||
|
||||
/** Copies a single surface from the "vertexarray" attributes of srcob to the ones of destob.
|
||||
|
@ -1094,6 +1097,12 @@ int doCrease(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials
|
|||
return (0);
|
||||
}
|
||||
|
||||
int doSubdiv(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials)
|
||||
{
|
||||
dataFound = false;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int doTexture(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials)
|
||||
{
|
||||
char name[256] = { 0 };
|
||||
|
|
|
@ -131,7 +131,17 @@ void init_args(int argc, char **argv)
|
|||
fprintf(stderr, "invalid +es %s\n", argv[2]);
|
||||
exit(1);
|
||||
}
|
||||
if (argc < 4)
|
||||
{
|
||||
fprintf(stderr, "missing input file name\n");
|
||||
exit(1);
|
||||
}
|
||||
InputFileName = argv[3];
|
||||
if (argc < 5)
|
||||
{
|
||||
fprintf(stderr, "missing output file name\n");
|
||||
exit(1);
|
||||
}
|
||||
OutputFileName = argv[4];
|
||||
}
|
||||
else if (!strcmp(argv[1], "+et"))
|
||||
|
|
Loading…
Reference in New Issue