SDK 1.10.4 Release

UPDATE: A critical regression has already been found in the new 1.10.4 release, and a new 1.10.4.1 release has been brought out to fix it. If you had already downloaded 1.10.4, please update to 1.10.4.1.

Today, I’m happy to announce that the newest and stablest release of Panda3D is now available. It took a little longer than expected due to unforeseen issues with our buildbots.

This is a highly recommended upgrade, particularly because it solves a regression in 1.10.3 that rendered the DirectOptionMenu class unusable. It also fixes a range of other bugs and even introduces a few interesting new features, some of which will be explored further in this post.

This release is partly made possible by generous contributions by community members, in the form of both code and funding. We wish to extend a special thank-you to Panda3D enthusiast tcdude, whose great contributions have earned him the status of Gold Sponsor.

Python 3.8 support

In anticipation of the upcoming 3.8 release of Python, we’ve already gone ahead and added support for it. As soon as pip 19.2.3 is released, it will be possible to pip install Panda3D into an existing Python 3.8 installation. Because the final release is not out yet, however, this should still be considered an experimental feature.

Icon support in deployed binaries

By popular request, we’ve added support for icons in the deployment system. This makes it possible to provide the compiled executables with a custom icon, to replace the default icon provided by the operating system. At the moment, this is only supported on Windows and macOS, but Linux support is in the works.

To use this feature, modify your setup.py file to look something like this:

    "gui_apps": {
        "asteroids": "src/main.py",
    },
    "icons": {
        "asteroids": ["icon-256.png", "icon-128.png", "icon-48.png", "icon-32.png", "icon-16.png"],
    },

You can provide a single image file of at least 256×256 and Panda3D will scale it down to smaller sizes as needed, but because automatic scaling can make the icon look illegible at smaller sizes, we highly recommend providing custom-scaled versions at resolutions 16, 32, 48, 128, and 256. For best results, it also doesn’t hurt to provide icons in additional resolutions, such as 24, 64, 96, 512, and 1024.

Python loader plug-ins

The loader system has had a plug-in system for custom model formats for a very long time. However, it required such plug-ins to be written in C++. The new release extends the functionality further by making it possible to write loader plug-ins completely in Python. By registering them as an entry point via Python’s setuptools system, Panda3D can automatically find such plug-ins and leverage them to load models with a file extension recognized by the plug-in.

The aim of this feature is to enable the community to develop third-party plug-ins in Python that further extend Panda3D’s support for additional model formats. For example, installing Moguri’s glTF plug-in using pip install panda3d-gltf will make it possible to load .gltf files by simply typing loader.loadModel("model.gltf").

This feature is enabled by default, but if you wish to disable the automatic loading of third-party plug-ins, you can disable the loader-support-entry-points configuration variable. If you wish to learn how to write your own loader plug-ins, refer to this code sample.

Replacing textures

A new convenience method has been created to replace a known texture object in a model tree with a different one. One of the situations in which this is useful is when building a character customization system, wherein a texture needs to be swapped out for a different one on a specific part of the model. By replacing a known existing texture with a different one, the need to identify the parts to replace the texture on is eliminated.

This is analogous to the replaceMaterial method that was added in 1.10.0, which offers a similar feature but for Material objects. Usage is very straightforward:

model.replaceTexture(oldTexture, newTexture)

Redirecting Notify output

It was previously already possible to redirect the output of the notification system to a file by using the notify-output output.log Config.prc variable. However, because Panda3D would only read this setting at the moment that the library is first imported, it was impossible to set this programmatically, since Panda3D would have already initialized the output stream by the time the first import to the library was made.

Not so in 1.10.4: Panda3D will now respect the setting even when it is set after the initial Panda3D import. However, the value can still only be changed from the default setting once; further changes, such as to redirect the output to a different file, will not be respected. Also, please note that lines that have already been output before the setting is changed will not be reflected in the output file. These limitations may be relaxed further in a future version.

Other changes

The full list of changes can be found on the download page, along with pre-compiled binary builds for several supported platforms. If you happen upon any issues, please let us know on the issue tracker!

2 thoughts on “SDK 1.10.4 Release

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.