mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-05 11:24:17 +03:00
fix error
This commit is contained in:
parent
f2f107d6f7
commit
d979d19715
@ -20,6 +20,7 @@
|
|||||||
#include <Message_Messenger.hxx>
|
#include <Message_Messenger.hxx>
|
||||||
#include <Message_ProgressScope.hxx>
|
#include <Message_ProgressScope.hxx>
|
||||||
#include <OSD_File.hxx>
|
#include <OSD_File.hxx>
|
||||||
|
#include <OSD_FileSystem.hxx>
|
||||||
#include <OSD_OpenFile.hxx>
|
#include <OSD_OpenFile.hxx>
|
||||||
#include <OSD_Path.hxx>
|
#include <OSD_Path.hxx>
|
||||||
#include <OSD_ThreadPool.hxx>
|
#include <OSD_ThreadPool.hxx>
|
||||||
@ -2460,6 +2461,18 @@ void RWGltf_GltfJsonParser::bindNamedShape(TopoDS_Shape& the
|
|||||||
bool RWGltf_GltfJsonParser::fillMeshData(
|
bool RWGltf_GltfJsonParser::fillMeshData(
|
||||||
const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData) const
|
const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData) const
|
||||||
{
|
{
|
||||||
|
if (myStream == nullptr)
|
||||||
|
{
|
||||||
|
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||||
|
myStream = aFileSystem->OpenIStream(myFilePath, std::ios::in | std::ios::binary);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (myStream == nullptr)
|
||||||
|
{
|
||||||
|
reportGltfError("Buffer '" + myFilePath + "' isn't defined.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for (NCollection_Sequence<RWGltf_GltfPrimArrayData>::Iterator aDataIter(theMeshData->Data());
|
for (NCollection_Sequence<RWGltf_GltfPrimArrayData>::Iterator aDataIter(theMeshData->Data());
|
||||||
aDataIter.More();
|
aDataIter.More();
|
||||||
aDataIter.Next())
|
aDataIter.Next())
|
||||||
|
@ -445,7 +445,7 @@ protected:
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
TColStd_IndexedDataMapOfStringString* myMetadata; //!< file metadata
|
TColStd_IndexedDataMapOfStringString* myMetadata; //!< file metadata
|
||||||
|
|
||||||
std::shared_ptr<std::istream> myStream; //!< input stream
|
mutable std::shared_ptr<std::istream> myStream; //!< input stream
|
||||||
|
|
||||||
NCollection_DataMap<TCollection_AsciiString, Handle(RWGltf_MaterialMetallicRoughness)>
|
NCollection_DataMap<TCollection_AsciiString, Handle(RWGltf_MaterialMetallicRoughness)>
|
||||||
myMaterialsPbr;
|
myMaterialsPbr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user