x3d import: make it work without internet connection
Fixes T61052
This commit is contained in:
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
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue