Prepaation for conversion.

pull/2448/head
Kim Kulling 2019-05-06 20:51:04 +02:00
parent e611ccc933
commit 4a9cd08451
4 changed files with 26 additions and 4 deletions

View File

@ -90,7 +90,8 @@ namespace Assimp {
, anim_fps()
, out(out)
, doc(doc)
, mRemoveEmptyBones( removeEmptyBones ) {
, mRemoveEmptyBones( removeEmptyBones )
, mCurrentUnit( FbxUnit::Undefined ) {
// animations need to be converted first since this will
// populate the node_anim_chain_bits map, which is needed
// to determine which nodes need to be generated.
@ -3474,6 +3475,10 @@ void FBXConverter::SetShadingPropertiesRaw(aiMaterial* out_mat, const PropertyTa
out->mMetaData->Set(14, "CustomFrameRate", doc.GlobalSettings().CustomFrameRate());
}
void FBXConverter::ConvertToUnitScale(FbxUnit unit) {
}
void FBXConverter::TransferDataToScene()
{
ai_assert(!out->mMeshes);

View File

@ -415,6 +415,21 @@ private:
void ConvertGlobalSettings();
enum class FbxUnit {
cm = 0,
m,
km,
inch,
foot,
mile,
yard,
NumUnits,
Undefined
};
void ConvertToUnitScale(FbxUnit unit);
// ------------------------------------------------------------------------------------------------
// copy generated meshes, animations, lights, cameras and textures to the output scene
void TransferDataToScene();
@ -456,6 +471,8 @@ private:
const FBX::Document& doc;
bool mRemoveEmptyBones;
FbxUnit mCurrentUnit;
};
}

View File

@ -568,8 +568,8 @@ void MeshGeometry::ReadVertexDataColors(std::vector<aiColor4D>& colors_out, cons
}
// ------------------------------------------------------------------------------------------------
static const std::string TangentIndexToken = "TangentIndex";
static const std::string TangentsIndexToken = "TangentsIndex";
static const char *TangentIndexToken = "TangentIndex";
static const char *TangentsIndexToken = "TangentsIndex";
void MeshGeometry::ReadVertexDataTangents(std::vector<aiVector3D>& tangents_out, const Scope& source,
const std::string& MappingInformationType,

View File

@ -117,7 +117,7 @@ namespace FBX {
Element::Element(const Token& key_token, Parser& parser)
: key_token(key_token)
{
TokenPtr n = NULL;
TokenPtr n = nullptr;
do {
n = parser.AdvanceToNextToken();
if(!n) {