Reputation: 11
I'm using macbook2019 monterey, Python 3.10.0, Panda3D 1.10.11
After I installed the panda3d-simplepbr
, I try to run my program.
Here is my code:
import sys
import simplepbr
from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
simplepbr.init()
self.accept('escape', sys.exit)
# base.disableMouse()
self.jack = self.loader.loadModel("jack")
self.jack.reparentTo(self.render)
self.jack.setScale(2.0, 2.0, 2.0)
self.jack.setPos(8, 50, 0)
if __name__ == '__main__':
app = MyApp()
app.run()
Here is the error:
Traceback (most recent call last):
File "/Users/gitdir/fyp/project/test_setup.py", line 19, in <module>
base = AppBase()
File "/Users/gitdir/fyp/project/test_setup.py", line 9, in __init__
self.pipeline = simplepbr.init()
File "/Users/opt/anaconda3/envs/py310/lib/python3.10/site-packages/simplepbr/__init__.py", line 350, in init
return Pipeline(**kwargs)
File "/Users/opt/anaconda3/envs/py310/lib/python3.10/site-packages/simplepbr/__init__.py", line 128, in __init__
self._recompile_pbr()
File "/Users/opt/anaconda3/envs/py310/lib/python3.10/site-packages/simplepbr/__init__.py", line 214, in _recompile_pbr
pbr_vert_str = _load_shader_str('simplepbr.vert', pbr_defines)
File "/Users/opt/anaconda3/envs/py310/lib/python3.10/site-packages/simplepbr/__init__.py", line 48, in _load_shader_str
with open(os.path.join(shader_dir, shaderpath)) as shaderfile:
FileNotFoundError: [Errno 2] No such file or directory: './shaders/simplepbr.vert'
If you know how to solve this problem please tell me. Thank you for reading this post.
Upvotes: 1
Views: 171