No need for bespoke macros
parent
6be0ce1ec9
commit
bcca3a0d79
|
@ -428,7 +428,7 @@ bool ReadScope(TokenList& output_tokens, const char* input, const char*& cursor,
|
|||
void TokenizeBinary(TokenList& output_tokens, const char* input, size_t length)
|
||||
{
|
||||
ai_assert(input);
|
||||
ASSIMP_FBX_LOG_DEBUG("Tokenizing binary FBX file");
|
||||
ASSIMP_LOG_DEBUG("Tokenizing binary FBX file");
|
||||
|
||||
if(length < 0x1b) {
|
||||
TokenizeError("file is too short",0);
|
||||
|
@ -453,7 +453,7 @@ void TokenizeBinary(TokenList& output_tokens, const char* input, size_t length)
|
|||
/*Result ignored*/ ReadByte(input, cursor, input + length);
|
||||
/*Result ignored*/ ReadByte(input, cursor, input + length);
|
||||
const uint32_t version = ReadWord(input, cursor, input + length);
|
||||
ASSIMP_FBX_LOG_DEBUG_F("FBX version: ", version);
|
||||
ASSIMP_LOG_DEBUG_F("FBX version: ", version);
|
||||
const bool is64bits = version >= 7500;
|
||||
const char *end = input + length;
|
||||
while (cursor < end ) {
|
||||
|
|
|
@ -75,10 +75,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ASSIMP_FBX_LOG_DEBUG
|
||||
// These require the DefaultLogger header.
|
||||
#define ASSIMP_FBX_LOG_DEBUG ASSIMP_LOG_DEBUG
|
||||
#define ASSIMP_FBX_LOG_DEBUG_F ASSIMP_LOG_DEBUG_F
|
||||
#endif
|
||||
|
||||
#endif // INCLUDED_AI_FBX_COMPILECONFIG_H
|
||||
|
|
|
@ -266,7 +266,7 @@ Document::Document(const Parser& parser, const ImportSettings& settings)
|
|||
: settings(settings)
|
||||
, parser(parser)
|
||||
{
|
||||
ASSIMP_FBX_LOG_DEBUG("Creating FBX Document");
|
||||
ASSIMP_LOG_DEBUG("Creating FBX Document");
|
||||
|
||||
// Cannot use array default initialization syntax because vc8 fails on it
|
||||
for (auto &timeStamp : creationTimeStamp) {
|
||||
|
@ -312,7 +312,7 @@ void Document::ReadHeader() {
|
|||
|
||||
const Scope& shead = *ehead->Compound();
|
||||
fbxVersion = ParseTokenAsInt(GetRequiredToken(GetRequiredElement(shead,"FBXVersion",ehead),0));
|
||||
ASSIMP_FBX_LOG_DEBUG_F("FBX Version: ", fbxVersion);
|
||||
ASSIMP_LOG_DEBUG_F("FBX Version: ", fbxVersion);
|
||||
|
||||
// While we may have some success with newer files, we don't support
|
||||
// the older 6.n fbx format
|
||||
|
|
|
@ -146,7 +146,7 @@ void FBXImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
|||
ThrowException("Could not open file for reading");
|
||||
}
|
||||
|
||||
ASSIMP_FBX_LOG_DEBUG("Reading FBX file");
|
||||
ASSIMP_LOG_DEBUG("Reading FBX file");
|
||||
|
||||
// read entire file into memory - no streaming for this, fbx
|
||||
// files can grow large, but the assimp output data structure
|
||||
|
|
|
@ -221,7 +221,7 @@ Parser::Parser (const TokenList& tokens, bool is_binary)
|
|||
, cursor(tokens.begin())
|
||||
, is_binary(is_binary)
|
||||
{
|
||||
ASSIMP_FBX_LOG_DEBUG("Parsing FBX tokens");
|
||||
ASSIMP_LOG_DEBUG("Parsing FBX tokens");
|
||||
root.reset(new Scope(*this,true));
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ void ProcessDataToken( TokenList& output_tokens, const char*& start, const char*
|
|||
void Tokenize(TokenList& output_tokens, const char* input)
|
||||
{
|
||||
ai_assert(input);
|
||||
ASSIMP_FBX_LOG_DEBUG("Tokenizing ascii FBX file");
|
||||
ASSIMP_LOG_DEBUG("Tokenizing ascii FBX file");
|
||||
|
||||
// line and column numbers numbers are one-based
|
||||
unsigned int line = 1;
|
||||
|
|
|
@ -286,7 +286,7 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
|
|||
|
||||
void glTF2Importer::ImportMaterials(glTF2::Asset &r) {
|
||||
const unsigned int numImportedMaterials = unsigned(r.materials.Size());
|
||||
ASSIMP_GLTF_LOG_DEBUG_F("Importing ", numImportedMaterials, " materials");
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numImportedMaterials, " materials");
|
||||
Material defaultMaterial;
|
||||
|
||||
mScene->mNumMaterials = numImportedMaterials + 1;
|
||||
|
@ -334,7 +334,7 @@ static inline bool CheckValidFacesIndices(aiFace *faces, unsigned nFaces, unsign
|
|||
#endif // ASSIMP_BUILD_DEBUG
|
||||
|
||||
void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
|
||||
ASSIMP_GLTF_LOG_DEBUG_F("Importing ", r.meshes.Size(), " meshes");
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", r.meshes.Size(), " meshes");
|
||||
std::vector<aiMesh *> meshes;
|
||||
|
||||
unsigned int k = 0;
|
||||
|
@ -665,7 +665,7 @@ void glTF2Importer::ImportCameras(glTF2::Asset &r) {
|
|||
if (!r.cameras.Size()) return;
|
||||
|
||||
const unsigned int numCameras = r.cameras.Size();
|
||||
ASSIMP_GLTF_LOG_DEBUG_F("Importing ", numCameras, " cameras");
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numCameras, " cameras");
|
||||
mScene->mNumCameras = numCameras;
|
||||
mScene->mCameras = new aiCamera *[numCameras];
|
||||
|
||||
|
@ -701,7 +701,7 @@ void glTF2Importer::ImportLights(glTF2::Asset &r) {
|
|||
return;
|
||||
|
||||
const unsigned int numLights = r.lights.Size();
|
||||
ASSIMP_GLTF_LOG_DEBUG_F("Importing ", numLights, " lights");
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numLights, " lights");
|
||||
mScene->mNumLights = numLights;
|
||||
mScene->mLights = new aiLight *[numLights];
|
||||
|
||||
|
@ -964,7 +964,7 @@ void glTF2Importer::ImportNodes(glTF2::Asset &r) {
|
|||
if (!r.scene) {
|
||||
throw DeadlyImportError("GLTF: No scene");
|
||||
}
|
||||
ASSIMP_GLTF_LOG_DEBUG("Importing nodes");
|
||||
ASSIMP_LOG_DEBUG("Importing nodes");
|
||||
|
||||
std::vector<Ref<Node>> rootNodes = r.scene->nodes;
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ void glTF2Importer::ImportAnimations(glTF2::Asset &r) {
|
|||
if (!r.scene) return;
|
||||
|
||||
const unsigned numAnimations = r.animations.Size();
|
||||
ASSIMP_GLTF_LOG_DEBUG_F("Importing ", numAnimations, " animations");
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numAnimations, " animations");
|
||||
mScene->mNumAnimations = numAnimations;
|
||||
if (mScene->mNumAnimations == 0) {
|
||||
return;
|
||||
|
@ -1258,7 +1258,7 @@ void glTF2Importer::ImportEmbeddedTextures(glTF2::Asset &r) {
|
|||
if (numEmbeddedTexs == 0)
|
||||
return;
|
||||
|
||||
ASSIMP_GLTF_LOG_DEBUG_F("Importing ", numEmbeddedTexs, " embedded textures");
|
||||
ASSIMP_LOG_DEBUG_F("Importing ", numEmbeddedTexs, " embedded textures");
|
||||
|
||||
mScene->mTextures = new aiTexture *[numEmbeddedTexs];
|
||||
|
||||
|
@ -1299,7 +1299,7 @@ void glTF2Importer::ImportEmbeddedTextures(glTF2::Asset &r) {
|
|||
}
|
||||
|
||||
void glTF2Importer::ImportCommonMetadata(glTF2::Asset& a) {
|
||||
ASSIMP_GLTF_LOG_DEBUG("Importing metadata");
|
||||
ASSIMP_LOG_DEBUG("Importing metadata");
|
||||
ai_assert(mScene->mMetaData == nullptr);
|
||||
const bool hasVersion = !a.asset.version.empty();
|
||||
const bool hasGenerator = !a.asset.generator.empty();
|
||||
|
@ -1320,7 +1320,7 @@ void glTF2Importer::ImportCommonMetadata(glTF2::Asset& a) {
|
|||
|
||||
void glTF2Importer::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) {
|
||||
|
||||
ASSIMP_GLTF_LOG_DEBUG("Reading GLTF file");
|
||||
ASSIMP_LOG_DEBUG("Reading GLTF file");
|
||||
|
||||
// clean all member arrays
|
||||
meshOffsets.clear();
|
||||
|
|
Loading…
Reference in New Issue