diff --git a/code/AssetLib/FBX/FBXConverter.cpp b/code/AssetLib/FBX/FBXConverter.cpp index fff617683..eb995f429 100644 --- a/code/AssetLib/FBX/FBXConverter.cpp +++ b/code/AssetLib/FBX/FBXConverter.cpp @@ -2719,7 +2719,7 @@ void FBXConverter::GenerateNodeAnimations(std::vector &node_anims, if (doc.Settings().optimizeEmptyAnimationCurves && IsRedundantAnimationData(target, comp, (chain[i]->second))) { - FBXImporter::LogDebug("dropping redundant animation channel for node " + target.Name()); + FBXImporter::LogVerboseDebug("dropping redundant animation channel for node " + target.Name()); continue; } diff --git a/code/AssetLib/IFC/IFCBoolean.cpp b/code/AssetLib/IFC/IFCBoolean.cpp index 2c9f6cf8f..22fbaa01d 100644 --- a/code/AssetLib/IFC/IFCBoolean.cpp +++ b/code/AssetLib/IFC/IFCBoolean.cpp @@ -221,7 +221,7 @@ void ProcessBooleanHalfSpaceDifference(const Schema_2x3::IfcHalfSpaceSolid *hs, result.mVerts.pop_back(); } } - IFCImporter::LogDebug("generating CSG geometry by plane clipping (IfcBooleanClippingResult)"); + IFCImporter::LogVerboseDebug("generating CSG geometry by plane clipping (IfcBooleanClippingResult)"); } // ------------------------------------------------------------------------------------------------ @@ -658,7 +658,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const Schema_2x3::IfcPoly } } } - IFCImporter::LogDebug("generating CSG geometry by plane clipping with polygonal bounding (IfcBooleanClippingResult)"); + IFCImporter::LogVerboseDebug("generating CSG geometry by plane clipping with polygonal bounding (IfcBooleanClippingResult)"); } // ------------------------------------------------------------------------------------------------ @@ -706,7 +706,7 @@ void ProcessBooleanExtrudedAreaSolidDifference(const Schema_2x3::IfcExtrudedArea vit += pcount; } - IFCImporter::LogDebug("generating CSG geometry by geometric difference to a solid (IfcExtrudedAreaSolid)"); + IFCImporter::LogVerboseDebug("generating CSG geometry by geometric difference to a solid (IfcExtrudedAreaSolid)"); } // ------------------------------------------------------------------------------------------------ diff --git a/code/AssetLib/IFC/IFCCurve.cpp b/code/AssetLib/IFC/IFCCurve.cpp index ba2b1eaf1..4643574a8 100644 --- a/code/AssetLib/IFC/IFCCurve.cpp +++ b/code/AssetLib/IFC/IFCCurve.cpp @@ -223,7 +223,7 @@ public: } if ( (std::string)curveSegment.Transition != "CONTINUOUS" ) { - IFCImporter::LogDebug("ignoring transition code on composite curve segment, only continuous transitions are supported"); + IFCImporter::LogVerboseDebug("ignoring transition code on composite curve segment, only continuous transitions are supported"); } curves.push_back( CurveEntry(bc,IsTrue(curveSegment.SameSense)) ); diff --git a/code/AssetLib/IFC/IFCGeometry.cpp b/code/AssetLib/IFC/IFCGeometry.cpp index 781f01964..f996c8753 100644 --- a/code/AssetLib/IFC/IFCGeometry.cpp +++ b/code/AssetLib/IFC/IFCGeometry.cpp @@ -319,7 +319,7 @@ void ProcessRevolvedAreaSolid(const Schema_2x3::IfcRevolvedAreaSolid& solid, Tem ConvertAxisPlacement(trafo, solid.Position); result.Transform(trafo); - IFCImporter::LogDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)"); + IFCImporter::LogVerboseDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)"); } // ------------------------------------------------------------------------------------------------ @@ -457,7 +457,7 @@ void ProcessSweptDiskSolid(const Schema_2x3::IfcSweptDiskSolid &solid, TempMesh& } } - IFCImporter::LogDebug("generate mesh procedurally by sweeping a disk along a curve (IfcSweptDiskSolid)"); + IFCImporter::LogVerboseDebug("generate mesh procedurally by sweeping a disk along a curve (IfcSweptDiskSolid)"); } // ------------------------------------------------------------------------------------------------ @@ -660,7 +660,7 @@ void ProcessExtrudedArea(const Schema_2x3::IfcExtrudedAreaSolid& solid, const Te IFCImporter::LogWarn("failed to resolve all openings, presumably their topology is not supported by Assimp"); } - IFCImporter::LogDebug("generate mesh procedurally by extrusion (IfcExtrudedAreaSolid)"); + IFCImporter::LogVerboseDebug("generate mesh procedurally by extrusion (IfcExtrudedAreaSolid)"); // If this is an opening element, store both the extruded mesh and the 2D profile mesh // it was created from. Return an empty mesh to the caller. diff --git a/code/AssetLib/IFC/IFCLoader.cpp b/code/AssetLib/IFC/IFCLoader.cpp index b96733c68..9ec377d21 100644 --- a/code/AssetLib/IFC/IFCLoader.cpp +++ b/code/AssetLib/IFC/IFCLoader.cpp @@ -641,14 +641,14 @@ aiNode *ProcessSpatialStructure(aiNode *parent, const Schema_2x3::IfcProduct &el bool skipGeometry = false; if (conv.settings.skipSpaceRepresentations) { if (el.ToPtr()) { - IFCImporter::LogDebug("skipping IfcSpace entity due to importer settings"); + IFCImporter::LogVerboseDebug("skipping IfcSpace entity due to importer settings"); skipGeometry = true; } } if (conv.settings.skipAnnotations) { if (el.ToPtr()) { - IFCImporter::LogDebug("skipping IfcAnnotation entity due to importer settings"); + IFCImporter::LogVerboseDebug("skipping IfcAnnotation entity due to importer settings"); return nullptr; } } @@ -856,7 +856,7 @@ void ProcessSpatialStructures(ConversionData &conv) { if (!prod) { continue; } - IFCImporter::LogDebug("looking at spatial structure `" + (prod->Name ? prod->Name.Get() : "unnamed") + "`" + (prod->ObjectType ? " which is of type " + prod->ObjectType.Get() : "")); + IFCImporter::LogVerboseDebug("looking at spatial structure `" + (prod->Name ? prod->Name.Get() : "unnamed") + "`" + (prod->ObjectType ? " which is of type " + prod->ObjectType.Get() : "")); // the primary sites are referenced by an IFCRELAGGREGATES element which assigns them to the IFCPRODUCT const STEP::DB::RefMap &refs = conv.db.GetRefs(); @@ -868,7 +868,7 @@ void ProcessSpatialStructures(ConversionData &conv) { // comparing pointer values is not sufficient, we would need to cast them to the same type first // as there is multiple inheritance in the game. if (def.GetID() == prod->GetID()) { - IFCImporter::LogDebug("selecting this spatial structure as root structure"); + IFCImporter::LogVerboseDebug("selecting this spatial structure as root structure"); // got it, this is one primary site. nodes.push_back(ProcessSpatialStructure(NULL, *prod, conv, NULL)); } diff --git a/code/AssetLib/IFC/IFCOpenings.cpp b/code/AssetLib/IFC/IFCOpenings.cpp index f77f33faf..e15691957 100644 --- a/code/AssetLib/IFC/IFCOpenings.cpp +++ b/code/AssetLib/IFC/IFCOpenings.cpp @@ -1359,7 +1359,7 @@ bool GenerateOpenings(std::vector& openings, break; } else { - IFCImporter::LogDebug("merging overlapping openings"); + IFCImporter::LogVerboseDebug("merging overlapping openings"); ExtractVerticesFromClipper(poly[0].outer, temp_contour, false); // Generate the union of the bounding boxes diff --git a/code/AssetLib/IFC/IFCUtil.cpp b/code/AssetLib/IFC/IFCUtil.cpp index 2620160df..e7c04bd89 100644 --- a/code/AssetLib/IFC/IFCUtil.cpp +++ b/code/AssetLib/IFC/IFCUtil.cpp @@ -162,7 +162,7 @@ void TempMesh::RemoveDegenerates() } if(drop) { - IFCImporter::LogDebug("removing degenerate faces"); + IFCImporter::LogVerboseDebug("removing degenerate faces"); } } @@ -437,7 +437,7 @@ void TempMesh::RemoveAdjacentDuplicates() { base += cnt; } if(drop) { - IFCImporter::LogDebug("removing duplicate vertices"); + IFCImporter::LogVerboseDebug("removing duplicate vertices"); } } diff --git a/include/assimp/LogAux.h b/include/assimp/LogAux.h index 2265ff19c..330c5e93e 100644 --- a/include/assimp/LogAux.h +++ b/include/assimp/LogAux.h @@ -94,6 +94,12 @@ public: } } + static void LogVerboseDebug(const Formatter::format& message) { + if (!DefaultLogger::isNullLogger()) { + ASSIMP_LOG_VERBOSE_DEBUG(Prefix()+(std::string)message); + } + } + // https://sourceforge.net/tracker/?func=detail&atid=1067632&aid=3358562&group_id=226462 #if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) @@ -125,6 +131,12 @@ public: } } + // ------------------------------------------------------------------------------------------------ + static void LogVerboseDebug (const char* message) { + if (!DefaultLogger::isNullLogger()) { + LogVerboseDebug(Formatter::format(message)); + } + } #endif private: