Skip to content

Commit 4516b39

Browse files
committed
Mock pywavefronts Texture initializer until new release
1 parent 1711234 commit 4516b39

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

demosys/scene/loaders/wavefront.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import numpy
22
from .base import SceneLoader
33
import pywavefront
4+
from pywavefront.material import Texture
45

56
from OpenGL import GL
67
from demosys.opengl import VAO
@@ -9,6 +10,15 @@
910
from demosys.opengl import samplers
1011

1112

13+
# HACK: Mock the initializer to avoid the exist check
14+
def texture_init_mock(self, path):
15+
self.path = path.replace('\\', '/')
16+
self.image = None
17+
18+
19+
Texture.__init__ = texture_init_mock
20+
21+
1222
class ObjLoader(SceneLoader):
1323
"""Loade obj files"""
1424
file_extensions = ['.obj', '.obj.gz']

0 commit comments

Comments
 (0)