X3D/VRML import: Fix blender/blender-addons#98442, check if USE-based cache is set in IndexedFaceSet #7

Merged
Cedric Steiert merged 2 commits from Bujus_Krachus/io_scene_x3d:add-check-for-USE-based-cache into main 2024-08-06 17:31:43 +02:00

View File

@ -1884,11 +1884,11 @@ def importMesh_IndexedFaceSet(geom, ancestry):
ccw = geom.getFieldAsBool('ccw', True, ancestry) ccw = geom.getFieldAsBool('ccw', True, ancestry)
coord = geom.getChildBySpec('Coordinate') coord = geom.getChildBySpec('Coordinate')
if coord is None: if coord is None:
return None return None
if coord.reference: if coord.reference and coord.getRealNode().parsed:
points = coord.getRealNode().parsed points = coord.getRealNode().parsed
# We need unflattened coord array here, while # We need unflattened coord array here, while
# importMesh_ReadVertices uses flattened. Can't cache both :( # importMesh_ReadVertices uses flattened. Can't cache both :(