File paths in egg files


I have a quick question, I could not find posted on this forum.
I recently changed some folder setup on my computer, messing up some file paths for textures in my game. As the file paths were hard-coded from the root directory, I decided to kill two birds with one stone and change them to a local file path. So a file path would change as the example below:

../../../Python37/Portfolio/Panda3D/Omicron 35/textures/Day/HouseInterior/Kettle.png   --> ../textures/Day/HouseInterior/Kettle.png

This seems to work all right when opening an egg file with pview.exe, but the textures are not appearing, when opening them through Python code. Do you have any suggestions to as why this is?

Thanks a lot :slight_smile:

I would guess that the working directory with which you’re running your code is different to the directory from which you’re opening your models in PView. As a result, the directory produced by that initial “../” differs, and thus the texture isn’t found.

1 Like

Of course! That was it. Thanks a lot :slight_smile:

1 Like