提交 04e5ec82 编写于 作者: R Rob Taglang
A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil.
......@@ -205,7 +205,7 @@ namespace COLLADABU
start = text.find_first_not_of(separators, stop+1);
}
}
#ifdef COLLADABU_OS_WIN
//--------------------------------
bool Utils::createDirectoryIfNeeded( const WideString &pathString )
......@@ -232,7 +232,7 @@ namespace COLLADABU
}
#endif
//--------------------------------
bool Utils::createDirectoryIfNeeded( const String &pathString )
{
......@@ -298,12 +298,14 @@ namespace COLLADABU
for (std::list<WideString>::const_iterator iPath = paths.begin(); iPath != paths.end(); ++iPath)
{
// if path exists
if (_wchdir((*iPath).c_str()) == 0)
if (_wchdir((*iPath).c_str()) == 0) {
_wchdir(currentPath);
continue;
}
// path does not exist, try to create it
_wmkdir((*iPath).c_str());
if (_wchdir((*iPath).c_str()) != 0)
{
pathExists = false;
......@@ -316,7 +318,7 @@ namespace COLLADABU
return pathExists;
}
#endif
//--------------------------------
bool Utils::createDirectoryRecursive( const String &pathString )
{
......@@ -349,12 +351,14 @@ namespace COLLADABU
for (std::list<String>::const_iterator iPath = paths.begin(); iPath != paths.end(); ++iPath)
{
// if path exists
if (_chdir((*iPath).c_str()) == 0)
if (_chdir((*iPath).c_str()) == 0) {
_chdir(currentPath);
continue;
}
// path does not exist, try to create it
_mkdir((*iPath).c_str());
if (_chdir((*iPath).c_str()) != 0)
{
pathExists = false;
......@@ -378,7 +382,7 @@ namespace COLLADABU
// path does not exist, try to create it
mkdir((*iPath).c_str(), 0755);
if (chdir((*iPath).c_str()) != 0)
{
pathExists = false;
......@@ -391,7 +395,7 @@ namespace COLLADABU
#endif
return pathExists;
}
#ifdef COLLADABU_OS_WIN
//--------------------------------
bool Utils::directoryExists( const WideString &pathString )
......@@ -412,7 +416,7 @@ namespace COLLADABU
}
#endif
//--------------------------------
bool Utils::directoryExists( const String &pathString )
{
......@@ -437,7 +441,7 @@ namespace COLLADABU
struct stat st;
if(stat(pathString.c_str(),&st) == 0)
pathExists = true;
#endif
return pathExists;
......@@ -471,8 +475,8 @@ namespace COLLADABU
size_t length = strlen(command);
if( length > 4096)
return false;
int status = system(command);
copystatus = (status == 0 ? true : false);
#endif
......
此差异已折叠。
......@@ -126,6 +126,13 @@
# define MAX_2018
#endif
#if ( MAX_VERSION_MAJOR >= 21 )
# define MAX_2019_OR_NEWER
#endif
#if ( MAX_VERSION_MAJOR == 21 )
# define MAX_2019
#endif
// Max 2009 requires RTTI to be enabled
#ifdef MAX_2009_OR_NEWER
#ifndef _CPPRTTI
......
......@@ -50,6 +50,8 @@
# pragma message ("Compiling for Max2017")
#elif defined MAX_2018
# pragma message ("Compiling for Max2018")
#elif defined MAX_2019
# pragma message ("Compiling for Max2019")
#else
# error( "Unsupported Max version" )
#endif
......
......@@ -1325,8 +1325,11 @@ namespace COLLADAMax
maxobj->MakeBezier(0, shape);
// for each curve
#ifdef MAX_2019_OR_NEWER
int splinesCount = min(shape.SplineCount(), maxobj->NumberOfCurves(0));
#else
int splinesCount = min(shape.SplineCount(), maxobj->NumberOfCurves());
#endif
if( splinesCount < 1 )
{
// no spline to export
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册