Find what was added and changed in the VRED Python API v2 for each release.
For information on the Python Sandbox and other security information, see Software Security.
What's New in API v2 2024.2
This page shows what was added to and changed in the Python API v2 in VRED 2024.2, compared to 2024.1.
The Python version was updated to 3.11.6.
Since the library responsible for automatically updating Python 2 scripts to Python 3 has been deprecated as of Python 3.11, we recommend you update these scripts to Python 3 to avoid any future problems.
Qt has been updated to 6.2.10.
These are the new environment variables in 2024.2:
VRED_CLUSTERSERVICE_CONFIG
VRED_CLUSTERSERVICE_DISABLE_ALL
VRED_CLUSTERSERVICE_ENABLE_ALL
We removed the environment variable, STARVR_SDK
.
This is a summary of the new functions, classes, and types.
bool
List[vrdGpuStateInfo]
These are the Python API V1 changes found in 2024.2:
vrMovieExport - added the parameters background_pass
and volume_pass
to setCombinedChannelsRenderPasses
, and added the following functions:
getDepthMode
getDepthRange
setDepthMode
setDepthRange
setOcclusionRange
getOcclusionRange
vrOSGWidget - added the following functions:
setActiveRenderPass
- added VOLUME_COLOR_LAYER
parameterssetDisplayMode
- removed VR_DISPLAY_VRHERO_XTAL
vrRenderSettings - changed the following functions:
setDenoiseAlpha
- changed the parameter to denoiseAlpha
setRenderPasses
- added volume_color
to the list of passesThese are the Python API V2 changes found in 2024.2:
vrCADFileTypes - made the following changes:
Maya
was removedSLP
was addedvrdAtfSettings - renamed Jt Open (Experimental)
to Jt Open
for getJtToolkit
vrdBaseLightNode - added the following:
getVolumeIlluminationMode
setVolumeIlluminationMode
vrdDeviceInteraction- made changes to the documentation for the following classes:
addSupportedInteractionGroup
createControllerAction
getControllerAction
removeControllerAction
removeSupportedInteractionGroup
setControllerActionMapping
(including the mapping
parameter that changed)setSupportedInteractionGroups
vrDeviceService - made changes to the documentation for the following classes:
addBlockedDeviceModelOrSerial
createInteraction
getBlockedDeviceModelsOrSerials
getLeftTrackedHand
getRightTrackedHand
getVRDeviceBySerialNumber
isBlockedDeviceModelOrSerial
removeBlockedDeviceModelOrSerial
setBlockedDeviceModelsOrSerials
setTrackingOrigin
deviceCollisionStarted
deviceCollisionStopped
deviceMoved
vrdFileExportSettings - added documentation to all SurfaceExportMode
enum entries
Renamed the parameter value
to enable
, with any exceptions noted below, for the following functions:
setExportAnimationClips
setExportAnimationCurves
setExportAnnotations
setExportCameras
setExportColors
setExportEnvironmentGeometries
setExportGeometrySwitches
setExportInvisibleData
setExportLightmaps
setExportLights
setExportMaterialSwitches
setExportMeshes
setExportMetadata
setExportSceneplates
setExportScripts
setExportSurfaces
- renamed the value
parameter to mode
setExportTouchSensors
setExportTransformVariants
setExportVariants
setExportVariantSets
setExportVertexColors
setFbxFormat
- renamed the value
parameter to format
setFbxVersionId
- renamed the value
parameter to id
setInlineTextures
setKeepEmptyGeometryNodes
- renamed the value
parameter to keep
setKeepEmptyGroupNodes
- renamed the value
parameter to keep
setKeepEmptyMaterialGroupNodes
- renamed the value
parameter to keep
setKeepEmptyShellNodes
- renamed the value
parameter to keep
setKeepUnusedMaterials
- renamed the value
parameter to keep
setRemoveBSides
setStlFormat
vrdVertexBakeSettings - updated the setIntensityThreshold
function documentation.
vrdVRDevice - made changes to the note, regarding the OpenXR mode, for the following:
addVirtualButton
disableRay
enableRay
getSerialNumber
getWristOrientationAngle
pick
removeVirtualButton
- for both overloaded methodssetButtonPressed
setButtonTouched
setTrackingMatrix
signal
vibrate
vrFileIOService - removed the following signals:
addedGeometry
addLoadedMaterial
preExportGeometry
changed the spelling of 'cad' to 'CAD' and 'vred'to 'VRED'
added documentation for project
updated the documentation for the following functions:
checkCadType
getImageReadFilter
getImageReadFilter
importFiles
vrGPUService - added gpuStateInfo
vrGUIService - added the OpenVDB
value to the DialogType
enum
vrHMDService - removed the following functions:
getStarVRRenderSettings
setStarVRRenderSettings
vrImmersiveInteractionService - changed the setViewpointMode
documentation
vrLightTypes - added the enum VolumeIlluminationMode
vrMaterialTypes - added the following values in MaterialType
:
VolumeScatter
OpenVDBVolume
We removed support for vrdStarVRRenderSettings
.
What's New in API v2 2024.1
We added new methods for exporting nodes. Look at vrFileIoService
, vrdFileExportSettings
, and vrdFileExportSettings::SurfaceExportMode
. Some basic examples have been added to vrFileIOService
showing how to import and export files, as well as how to change these settings. See vrdFileExportSettings and vrdFileExportSettings Example for additional information.
We fixed the following:
VRED_COLLABORATION_NO_UPLOAD
- fixed ("uupload")VRED_CURRENT_PROJECT_DIR
- removed the extra space before '_DIR"We added the following:
VRED_IMPORT_PERFORMANCE_LOG
VRED_SECURE_PYTHON
VRED_WORKSPACES_PATH
We added the following to vrCollision:
getCollidingNodes
getCollidingTriangleIndices
getCollidingTriangles
getCollisionInfo
getCollisionPoint
We added the following classes:
We changed these classes:
Changes to vrCADFileTypes:
CatiaV5
- Updated the comment to refer to V5C3MF
IFC
SLP
Changes to vrdAtfSettings:
getImportColors()
setImportColors()
Changes to vrdMaterialXProperties:
PySide2
-> PySide6
)Changes to vrdMDLProperties:
PySide2
-> PySide6
)Changes to vrFileIOService:
abortJobs()
exportNodes()
getExportSettings()
getExportSettingsFromPreferences()
setExportSettings()
addedGeometry
addLoadedMaterial
importedFile
preExportGeometry
sequences
Changes to vrGUIService:
openExportDialog()
openExportSceneDialog()
Changes to vrLightService:
copyLights()
getLightsClipboard()
isLightsClipboardEmpty()
pasteLights()
Changes to vrMaterialTypes:
MergeOptions
Default
, the documentation changedIgnoreName
, the documentation changedIncludeSwitchMaterials
, the documentation changedExcludeXRiteMaterials
Changes to vrQueryService:
What's New in API v2 2024
This page shows what was added to and changed in the Python API v2 in VRED 2024, compared to 2023.4.
The Python version was updated to 3.11.3.`
print(sys.version)
The Qt version was updated from Qt 5 to 6.2. This includes that the PySide module name changes from PySide2 to PySide6, and shiboken2 to shiboken6.
When option “Preferences > Script > Translate script to current Python version” is enabled, the names PySide2 and shiboken2 are automatically replaced by PySide6 and shiboken6 on the fly before executing Python scripts in VRED.
Porting Applications from PySide2 to PySide6 ` - `VRED’s Qt version can be printed from within VRED with:
print(PySide6.QtCore.qVersion())
These are the new functions and classes:
vrGUIService.getViewCubePosition() → vrGUIService.ViewCubePosition
vrdRoughnessTexture.getRoughnessMapType() → vrRoughnessTextureTypes.ValueMapping
In VRED 2024, the material roughness is changed to a perceptually linear behavior and a new value range between 0 and 1. In older VRED versions, the behavior was non-linear and the maximum value was 40. When importing older files into VRED, material roughness values are automatically adjusted to the new behavior.
In case you set specific roughness values explicitly via script, for example with vrdPlasticMaterial.setRoughness(roughness), you must adjust the value in the script.
See this snippet for the conversion: snippets/convertRoughness.py.