From d0ff0a7f64f7e3628f39fefdfa088c9a466f58b3 Mon Sep 17 00:00:00 2001 From: HarrievG Date: Sun, 7 Aug 2022 15:05:14 +0200 Subject: [PATCH] Dont load GLTF data when loading bglb/bgltf --- neo/renderer/Model_gltf.cpp | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/neo/renderer/Model_gltf.cpp b/neo/renderer/Model_gltf.cpp index c85a052f..578b3698 100644 --- a/neo/renderer/Model_gltf.cpp +++ b/neo/renderer/Model_gltf.cpp @@ -275,13 +275,6 @@ bool idRenderModelGLTF::LoadBinaryModel( idFile* file, const ID_TIME_T sourceTim hasAnimations = false; fileExclusive = false; // not written. root = nullptr; - - //we should still load the scene information ? - if( !idRenderModelStatic::LoadBinaryModel( file, sourceTimeStamp ) ) - { - return false; - } - unsigned int magic = 0; file->ReadBig( magic ); @@ -296,34 +289,6 @@ bool idRenderModelGLTF::LoadBinaryModel( idFile* file, const ID_TIME_T sourceTim idStr dataFilename; file->ReadString( dataFilename ); - if( gltfParser->currentFile.Length( ) ) - { - if( gltfParser->currentAsset && gltfParser->currentFile != dataFilename ) - { - common->FatalError( "multiple GLTF file loading not supported" ); - } - } - else - { - gltfParser->Load( dataFilename ); - } - - data = gltfParser->currentAsset; - if( rootID != -1 ) - { - root = data->GetNode( gltf_ModelSceneName.GetString(), rootID ); - } - else - { - root = new gltfNode(); - root->name = gltf_ModelSceneName.GetString(); - gltfScene scene; - data->GetSceneId( root->name, &scene ); - root->children.Append( scene.nodes ); - } - - assert( root ); - int animCnt; file->ReadBig( animCnt ); if( animCnt > 0 ) @@ -362,7 +327,7 @@ bool idRenderModelGLTF::LoadBinaryModel( idFile* file, const ID_TIME_T sourceTim } else { - if( root->skin == -1 && hasAnimations && !bones.Num() ) + if( hasAnimations && !bones.Num() ) { bones.Clear( ); bones.Append( rootID );