Hi all,
What seems to be a really easy operation has gone bad.
I am trying to display a simple image using :
self.menu = OnscreenImage(image = Constants.MYDIR+"/models/cafeScene/menu.jpg", pos = (1,0,0), scale = (0.4,0.4,0.4))
I have added:
from direct.gui.OnscreenImage import OnscreenImage
However the error I receive is as under:
TypeError: NodePath::set_texture() argument 1 must be Texture, not NoneType
I have tried using both .png and .jpg files.
Please suggest what might be the problem.
If you print MYDIR just before creating the OnscreenImage, what does it produce? I’m wondering whether something hasn’t gone wrong there somewhere along the line, despite it having been set at some point…