Copy constructor ExportProperties
Fix name dummy node in PreTransformVerticespull/493/head
parent
290a16eea5
commit
56da80bc6e
|
@ -492,18 +492,17 @@ void Exporter :: UnregisterExporter(const char* id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportProperties :: ExportProperties()
|
ExportProperties :: ExportProperties() {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
ExportProperties::ExportProperties(const ExportProperties &other)
|
||||||
|
|
||||||
ExportProperties :: ExportProperties(const ExportProperties* source)
|
|
||||||
{
|
{
|
||||||
if (!source) return;
|
new(this) ExportProperties();
|
||||||
mIntProperties = IntPropertyMap(source->mIntProperties);
|
|
||||||
mFloatProperties = FloatPropertyMap(source->mFloatProperties);
|
mIntProperties = other.mIntProperties;
|
||||||
mStringProperties = StringPropertyMap(source->mStringProperties);
|
mFloatProperties = other.mFloatProperties;
|
||||||
mMatrixProperties = MatrixPropertyMap(source->mMatrixProperties);
|
mStringProperties = other.mStringProperties;
|
||||||
|
mMatrixProperties = other.mMatrixProperties;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -625,7 +625,7 @@ void PretransformVertices::Execute( aiScene* pScene)
|
||||||
// flat node graph with a root node and some level 1 children
|
// flat node graph with a root node and some level 1 children
|
||||||
delete pScene->mRootNode;
|
delete pScene->mRootNode;
|
||||||
pScene->mRootNode = new aiNode();
|
pScene->mRootNode = new aiNode();
|
||||||
pScene->mRootNode->mName.Set("<dummy_root>");
|
pScene->mRootNode->mName.Set("dummy_root");
|
||||||
|
|
||||||
if (1 == pScene->mNumMeshes && !pScene->mNumLights && !pScene->mNumCameras)
|
if (1 == pScene->mNumMeshes && !pScene->mNumLights && !pScene->mNumCameras)
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,11 +79,10 @@ void ExportSceneXFile(const char* pFile,IOSystem* pIOSystem, const aiScene* pSce
|
||||||
}
|
}
|
||||||
|
|
||||||
// create/copy Properties
|
// create/copy Properties
|
||||||
ExportProperties props(pProperties);
|
ExportProperties props(*pProperties);
|
||||||
|
|
||||||
// set standard properties if not set
|
// set standard properties if not set
|
||||||
if (!props.HasPropertyBool(AI_CONFIG_EXPORT_XFILE_64BIT)) props.SetPropertyBool(AI_CONFIG_EXPORT_XFILE_64BIT, false);
|
if (!props.HasPropertyBool(AI_CONFIG_EXPORT_XFILE_64BIT)) props.SetPropertyBool(AI_CONFIG_EXPORT_XFILE_64BIT, false);
|
||||||
if (!props.HasPropertyBool(AI_CONFIG_EXPORT_XFILE_BAKETRANSFORM)) props.SetPropertyBool(AI_CONFIG_EXPORT_XFILE_BAKETRANSFORM, false);
|
|
||||||
|
|
||||||
// invoke the exporter
|
// invoke the exporter
|
||||||
XFileExporter iDoTheExportThing( pScene, pIOSystem, path, file, &props);
|
XFileExporter iDoTheExportThing( pScene, pIOSystem, path, file, &props);
|
||||||
|
|
|
@ -334,11 +334,13 @@ public:
|
||||||
|
|
||||||
ExportProperties();
|
ExportProperties();
|
||||||
|
|
||||||
/** Copy constructor
|
// -------------------------------------------------------------------
|
||||||
* @see ExportProperties(const ExportProperties* source)
|
/** Copy constructor.
|
||||||
*/
|
*
|
||||||
ExportProperties(const ExportProperties* source);
|
* This copies the configuration properties of another ExportProperties.
|
||||||
|
* @see ExportProperties(const ExportProperties& other)
|
||||||
|
*/
|
||||||
|
ExportProperties(const ExportProperties& other);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Set an integer configuration property.
|
/** Set an integer configuration property.
|
||||||
|
|
|
@ -889,11 +889,5 @@ enum aiComponent
|
||||||
|
|
||||||
#define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT"
|
#define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT"
|
||||||
|
|
||||||
/** @brief Specifies the xfile applies all transformations to the coordinates, normals
|
|
||||||
* so all motions are identities
|
|
||||||
* Property type: Bool. Default value: false.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define AI_CONFIG_EXPORT_XFILE_BAKETRANSFORM "EXPORT_XFILE_BAKETRANSFORM"
|
|
||||||
|
|
||||||
#endif // !! AI_CONFIG_H_INC
|
#endif // !! AI_CONFIG_H_INC
|
||||||
|
|
Loading…
Reference in New Issue