Forráskód Böngészése

FBX: add debugging tool to log class type + info.

Kim Kulling 9 éve
szülő
commit
23892a6ded
1 módosított fájl, 10 hozzáadás és 2 törlés
  1. 10 2
      code/FBXDocument.cpp

+ 10 - 2
code/FBXDocument.cpp

@@ -79,6 +79,12 @@ LazyObject::~LazyObject()
 
 }
 
+// ------------------------------------------------------------------------------------------------
+static void dumpObjectClassInfo( const char* obtype, const std::string &classtag ) {
+    DefaultLogger::get()->debug( "obtype: " + std::string(obtype ));
+    DefaultLogger::get()->debug( "Classtag: " + classtag );
+}
+
 // ------------------------------------------------------------------------------------------------
 const Object* LazyObject::Get(bool dieOnError)
 {
@@ -137,8 +143,10 @@ const Object* LazyObject::Get(bool dieOnError)
         // so avoid constructing strings all the time.
         const char* obtype = key.begin();
         const size_t length = static_cast<size_t>(key.end()-key.begin());
-        DefaultLogger::get()->debug( "obtype: " + std::string(obtype ));
-        DefaultLogger::get()->debug( "Classtag: " + classtag );
+
+        // For debugging
+        //dumpObjectClassInfo( objtype, classtag );
+        
         if (!strncmp(obtype,"Geometry",length)) {
             if (!strcmp(classtag.c_str(),"Mesh")) {
                 object.reset(new MeshGeometry(id,element,name,doc));