It seems that passing Filename() to setCursorFilename() results in Panda3D looking for a file that has the empty string as its name, since the error message in the console reads as follows:
:display:windisplay(warning): windows cursor filename 'C:\Projects\myproject' could not be loaded!!
:display:windisplay(fatal): System error msg: Access is denied.
where ‘C:\Projects\myproject’ is the current working directory and not a file, hence the error message.
It’s not that I expected anything else from Filename() than an empty path, but when passing that empty path to setCursorFilename(), I hoped that the following would work:
And it does, but only after the system error occurring. The error message in the console can be ignored, but the real problem is that it also pops up in a window (caption: “Panda3D Error”, message: “Access is denied.”), blocking the application.
Even though it only happens the first time setCursorFilename(Filename()) is called, it’s still annoying.