Vizard 7 » Introduction » Vizard 7 Upgrade Guide
7.7

Vizard 7 Upgrade Guide

This guide describes major changes between Vizard 6 and 7 that could potentially break the behavior of some scripts

Python 3.8

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.

Visual Studio 2019

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.

Pywin32 modules no longer included

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.

Vizard commands that return bytes instead of string

Texture image data format

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:

# Get image data
data = texture.getImageData()

# Read value
int_value = ord(data[0])

# Write value
data[0] = chr(255)

would be changed to:

# Get image data
data = texture.getImageData()

# Read value
int_value = data[0]

# Write value
data[0] = 255

Removed commands

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()