This guide describes major changes between Vizard 6 and 7 that could potentially break the behavior of some scripts
Vizard 7 has updated from Python 2.7 to 3.8. While Python 3.8 has many new features and improvements, it also contains backwards incompatible changes that might require modifications to existing scripts in order to run properly. Please see the Python 2 to 3 guide for a description of the notable changes. Vizard also includes a Python 2 to 3 tool that can automatically make most of the necessary changes.
Vizard 7 has updated to Visual Studio 2019 for compiling extensions. If you have your own custom Vizard/Python extensions, you will need to recompile them using Visual Studio 2019, which is offered as a free download by Microsoft.
Vizard 7 no longer includes the following Pywin32 modules:
Module |
win32api |
win32con |
win32event |
win32file |
win32gui |
win32process |
If you need access to these modules, you can install the full Pywin32 package. Alternatively, you can use the ctypes module that is included with Python to easily access Windows API functions from within your script.
The <texture>.saveToBuffer() command now returns a bytes object instead of a string.
The raw_data attribute of viz.RawNetworkEvent is now a bytes object instead of a string.
The buffer returned by <texture>.getImageData() now contains integer elements instead of string characters. In previous versions, the items in the image data buffer would be a Python str object with a single character, now the items will be a Python int object in the range [0,255].
For example, the following code to read/write from an image data buffer:
would be changed to:
The following table lists Vizard commands that gave deprecation warnings in Vizard 6 and have been removed in Vizard 7. If you have an old script that is broken due to one of these removed commands, use the replacement command to make it Vizard 7 compatible:
Removed Command |
Replacement Command |
viz.addVertexProgram() |
viz.addShader() |
viz.addFragmentProgram() | viz.addShader() |