]> OCCT Git - occt.git/commitdiff
0031813: Data Exchange, RWGltf_GltfJsonParser - debug assertion in progress scope...
authorkgv <kgv@opencascade.com>
Thu, 1 Oct 2020 09:43:54 +0000 (12:43 +0300)
committerabv <abv@opencascade.com>
Fri, 2 Oct 2020 13:12:51 +0000 (16:12 +0300)
RWGltf_GltfJsonParser::gltfParseSceneNode() - removed redundant progress indication on sub-meshes list level.

src/RWGltf/RWGltf_GltfJsonParser.cxx
src/RWGltf/RWGltf_GltfJsonParser.pxx

index b6590c7613b9e4310678d2f803c24e1a2cdf36ae..9d2add6d2172983a3f4316a19d537e1ed56ab771 100644 (file)
@@ -1243,9 +1243,8 @@ bool RWGltf_GltfJsonParser::gltfParseSceneNode (TopoDS_Shape& theNodeShape,
    && aMeshes_1->IsArray())
   {
     // glTF 1.0
-    Message_ProgressScope aPS (theProgress, "Reading scene meshes", aMeshes_1->Size());
     for (rapidjson::Value::ConstValueIterator aMeshIter = aMeshes_1->Begin();
-         aMeshIter != aMeshes_1->End() && aPS.More(); ++aMeshIter)
+         aMeshIter != aMeshes_1->End(); ++aMeshIter)
     {
       const RWGltf_JsonValue* aMesh = myGltfRoots[RWGltf_GltfRootElement_Meshes].FindChild (*aMeshIter);
       if (aMesh == NULL)
@@ -1257,7 +1256,7 @@ bool RWGltf_GltfJsonParser::gltfParseSceneNode (TopoDS_Shape& theNodeShape,
       }
 
       TopoDS_Shape aMeshShape;
-      if (!gltfParseMesh (aMeshShape, getKeyString (*aMeshIter), *aMesh, aPS.Next()))
+      if (!gltfParseMesh (aMeshShape, getKeyString (*aMeshIter), *aMesh))
       {
         theNodeShape = aNodeShape;
         bindNodeShape (theNodeShape, aNodeLoc, theSceneNodeId, aName);
@@ -1283,7 +1282,7 @@ bool RWGltf_GltfJsonParser::gltfParseSceneNode (TopoDS_Shape& theNodeShape,
     }
 
     TopoDS_Shape aMeshShape;
-    if (!gltfParseMesh (aMeshShape, getKeyString (*aMesh_2), *aMesh, theProgress))
+    if (!gltfParseMesh (aMeshShape, getKeyString (*aMesh_2), *aMesh))
     {
       theNodeShape = aNodeShape;
       bindNodeShape (theNodeShape, aNodeLoc, theSceneNodeId, aName);
@@ -1314,8 +1313,7 @@ bool RWGltf_GltfJsonParser::gltfParseSceneNode (TopoDS_Shape& theNodeShape,
 // =======================================================================
 bool RWGltf_GltfJsonParser::gltfParseMesh (TopoDS_Shape& theMeshShape,
                                            const TCollection_AsciiString& theMeshId,
-                                           const RWGltf_JsonValue& theMesh,
-                                           const Message_ProgressRange& theProgress)
+                                           const RWGltf_JsonValue& theMesh)
 {
   const RWGltf_JsonValue* aName  = findObjectMember (theMesh, "name");
   const RWGltf_JsonValue* aPrims = findObjectMember (theMesh, "primitives");
@@ -1344,7 +1342,7 @@ bool RWGltf_GltfJsonParser::gltfParseMesh (TopoDS_Shape& theMeshShape,
     }
 
     Handle(RWGltf_GltfLatePrimitiveArray) aMeshData = new RWGltf_GltfLatePrimitiveArray (theMeshId, aUserName);
-    if (!gltfParsePrimArray (aMeshData, theMeshId, *aPrimArrIter, theProgress))
+    if (!gltfParsePrimArray (aMeshData, theMeshId, *aPrimArrIter))
     {
       return false;
     }
@@ -1397,8 +1395,7 @@ bool RWGltf_GltfJsonParser::gltfParseMesh (TopoDS_Shape& theMeshShape,
 // =======================================================================
 bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData,
                                                 const TCollection_AsciiString& theMeshId,
-                                                const RWGltf_JsonValue& thePrimArray,
-                                                const Message_ProgressRange& /*theProgress*/)
+                                                const RWGltf_JsonValue& thePrimArray)
 {
   const RWGltf_JsonValue* anAttribs = findObjectMember (thePrimArray, "attributes");
   const RWGltf_JsonValue* anIndices = findObjectMember (thePrimArray, "indices");
index 048ad20cc48e0694e1de5be79a2eba3021c52d68..57ea9dc82488f91b82c2f5fca40e7fa54429fbf7 100644 (file)
@@ -183,14 +183,12 @@ protected:
   //! Parse mesh element.
   Standard_EXPORT bool gltfParseMesh (TopoDS_Shape& theMeshShape,
                                       const TCollection_AsciiString& theMeshId,
-                                      const RWGltf_JsonValue& theMesh,
-                                      const Message_ProgressRange& theProgress);
+                                      const RWGltf_JsonValue& theMesh);
 
   //! Parse primitive array.
   Standard_EXPORT bool gltfParsePrimArray (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData,
                                            const TCollection_AsciiString& theMeshName,
-                                           const RWGltf_JsonValue& thePrimArray,
-                                           const Message_ProgressRange& theProgress);
+                                           const RWGltf_JsonValue& thePrimArray);
 
   //! Parse accessor.
   Standard_EXPORT bool gltfParseAccessor (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData,