This was a hack used by installation methods that did not support
registering new commands correctly. The commands should now work
regardless of installation method (wheel, deb, NSIS installer, etc.).
Many thirdparty libraries rely on __file__ being set properly, for example to be able to locate data files, so it is easiest to just set this to something remotely sensible (like the executable path).
This is still not a perfect solution, since eg. the wrong version of a package may still be used if older versions are still in the __whl_cache__ directory. We may want to look into using pip to resolve the package versions, or do something clever such as automatically remove cached wheels if a newer version of the same package was downloaded.
This allows using a coroutine to build up a more complex sequence including transitions (eg. scripted cutscene), as well as provide a standard way to register callbacks upon completion of the transition.
We don't guarantee a specific order in this case, especially because they can be run in either order if there is more than one thread, but it is still useful to have a defined order for single-threaded task chains. To that end, tasks
are now run in the order in which they were added to taskMgr.add (in absence of any other ordering constraints).
Fixes#309
These were removed by 88dbb31daa02779405ef5326677eefb5cf93f3c8 under the assumption that they were not used, but it has recently come to my attention that there is still code out there that uses these.
PriorityCallbacks has been updated to be compatible with Python 3 by only comparing the priority, rather than the (priority, callback) tuple. This also has the side-effect of ditching the bisect dependency.
Also moves testing code from the source to the unit tests.
- Release the global lock during the user tick callback
and allow interactions with bullet world
- Acquire the lock again after the callback
Signed-off-by: deflected <deflected@users.noreply.github.com>