Merge branch 'master' into MalcolmTyrrell/gltfCrashes
commit
5f652feb75
|
@ -478,6 +478,7 @@ unsigned int LazyDict<T>::Remove(const char *id) {
|
||||||
mAsset.mUsedIds[id] = false;
|
mAsset.mUsedIds[id] = false;
|
||||||
mObjsById.erase(id);
|
mObjsById.erase(id);
|
||||||
mObjsByOIndex.erase(index);
|
mObjsByOIndex.erase(index);
|
||||||
|
delete mObjs[index];
|
||||||
mObjs.erase(mObjs.begin() + index);
|
mObjs.erase(mObjs.begin() + index);
|
||||||
|
|
||||||
//update index of object in mObjs;
|
//update index of object in mObjs;
|
||||||
|
|
|
@ -325,6 +325,14 @@ bool ExportModel(const aiScene* pOut,
|
||||||
PrintHorBar();
|
PrintHorBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aiMatrix4x4 rx, ry, rz;
|
||||||
|
aiMatrix4x4::RotationX(imp.rot.x, rx);
|
||||||
|
aiMatrix4x4::RotationY(imp.rot.y, ry);
|
||||||
|
aiMatrix4x4::RotationZ(imp.rot.z, rz);
|
||||||
|
pOut->mRootNode->mTransformation *= rx;
|
||||||
|
pOut->mRootNode->mTransformation *= ry;
|
||||||
|
pOut->mRootNode->mTransformation *= rz;
|
||||||
|
|
||||||
// do the actual export, measure time
|
// do the actual export, measure time
|
||||||
const clock_t first = clock();
|
const clock_t first = clock();
|
||||||
const aiReturn res = globalExporter->Export(pOut,pID,path);
|
const aiReturn res = globalExporter->Export(pOut,pID,path);
|
||||||
|
@ -492,6 +500,18 @@ int ProcessStandardArguments(
|
||||||
}
|
}
|
||||||
else if (! strcmp( param, "-v") || ! strcmp( param, "--verbose")) {
|
else if (! strcmp( param, "-v") || ! strcmp( param, "--verbose")) {
|
||||||
fill.verbose = true;
|
fill.verbose = true;
|
||||||
|
}
|
||||||
|
else if (!strncmp(params[i], "-rx=", 4) || !strncmp(params[i], "--rotation-x=", 13)) {
|
||||||
|
std::string value = std::string(params[i] + (params[i][1] == '-' ? 13 : 4));
|
||||||
|
fill.rot.x = std::stof(value);
|
||||||
|
}
|
||||||
|
else if (!strncmp(params[i], "-ry=", 4) || !strncmp(params[i], "--rotation-y=", 13)) {
|
||||||
|
std::string value = std::string(params[i] + (params[i][1] == '-' ? 13 : 4));
|
||||||
|
fill.rot.y = std::stof(value);
|
||||||
|
}
|
||||||
|
else if (!strncmp(params[i], "-rz=", 4) || !strncmp(params[i], "--rotation-z=", 13)) {
|
||||||
|
std::string value = std::string(params[i] + (params[i][1] == '-' ? 13 : 4));
|
||||||
|
fill.rot.z = std::stof(value);
|
||||||
}
|
}
|
||||||
else if (! strncmp( param, "--log-out=",10) || ! strncmp( param, "-lo",3)) {
|
else if (! strncmp( param, "--log-out=",10) || ! strncmp( param, "-lo",3)) {
|
||||||
fill.logFile = std::string(params[i]+(params[i][1] == '-' ? 10 : 3));
|
fill.logFile = std::string(params[i]+(params[i][1] == '-' ? 10 : 3));
|
||||||
|
|
|
@ -96,6 +96,7 @@ struct ImportData {
|
||||||
, showLog (false)
|
, showLog (false)
|
||||||
, verbose (false)
|
, verbose (false)
|
||||||
, log (false)
|
, log (false)
|
||||||
|
, rot (aiVector3D(0.f, 0.f, 0.f))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/// Post-processing flags
|
/// Post-processing flags
|
||||||
|
@ -112,6 +113,9 @@ struct ImportData {
|
||||||
|
|
||||||
// Need to log?
|
// Need to log?
|
||||||
bool log;
|
bool log;
|
||||||
|
|
||||||
|
// Export With Rotation
|
||||||
|
aiVector3D rot;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \enum AssimpCmdError
|
/// \enum AssimpCmdError
|
||||||
|
|
Loading…
Reference in New Issue