add support for newer ac3d file keywords

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9221 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
iobyte 2023-12-02 04:01:09 +00:00
parent 87ae22873a
commit 754d9fdbe6
3 changed files with 44 additions and 2 deletions

View File

@ -328,7 +328,18 @@ osg::Node* ReaderWriterACC::readObject(std::istream& stream, FileData& fileData,
}
else if (token == "shad")
{
}
else if (token == "subdiv")
{
}
else if (token == "folded")
{
}
else if (token == "hidden")
{
}
else if (token == "locked")
{
}
else if (token == "texrep")
{

View File

@ -381,6 +381,10 @@ static Tag object_tags [] =
{ "kids" , do_kids },
{ "crease" , do_ignore },
{ "shader" , do_ignore },
{ "folded" , do_ignore },
{ "subdiv" , do_ignore },
{ "hidden" , do_ignore },
{ "locked" , do_ignore },
{ 0, 0 }
} ;

View File

@ -61,6 +61,9 @@
#define REFS "refs"
#define CREASE "crease"
#define SUBDIV "subdiv"
#define FOLDED "folded"
#define HIDDEN "hidden"
#define LOCKED "locked"
ob_t::ob_t() :
kids(0),
@ -254,6 +257,9 @@ 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);
int doFolded(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials);
int doHidden(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials);
int doLocked(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);
@ -277,7 +283,10 @@ verbaction_t verbTab[] =
{ MAT, doMat },
{ REFS, doRefs },
{ CREASE, doCrease },
{ SUBDIV, doSubdiv, },
{ SUBDIV, doSubdiv },
{ FOLDED, doFolded },
{ HIDDEN, doHidden },
{ LOCKED, doLocked },
{ "END", NULL } };
/** Copies a single surface from the "vertexarray" attributes of srcob to the ones of destob.
@ -1103,6 +1112,24 @@ int doSubdiv(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials
return (0);
}
int doFolded(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials)
{
dataFound = false;
return (0);
}
int doHidden(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials)
{
dataFound = false;
return (0);
}
int doLocked(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 };