x3d import: make it work without internet connection

Fixes T61052
This commit is contained in:
Philipp Oeser 2019-02-01 09:21:22 +01:00
parent 9cc2ad1eaf
commit d410029833
Notes: blender-bot 2023-02-14 03:53:55 +01:00
Referenced by issue blender/blender#61052, X3D import is broken
1 changed files with 3 additions and 0 deletions

View File

@ -1413,6 +1413,7 @@ def x3d_parse(path):
"""
import xml.dom.minidom
import xml.sax
from xml.sax import handler
'''
try: doc = xml.dom.minidom.parse(path)
@ -1438,6 +1439,8 @@ def x3d_parse(path):
parser = xml.sax.make_parser()
orig_set_content_handler = parser.setContentHandler
parser.setFeature(handler.feature_external_ges, False)
parser.setFeature(handler.feature_external_pes, False)
parser.setContentHandler = set_content_handler
doc = xml.dom.minidom.parseString(data, parser)