Skip to content

Instantly share code, notes, and snippets.

@AndrewHazelden
Last active December 9, 2015 11:37
Show Gist options
  • Save AndrewHazelden/8e7e66689ccd7c9e13ea to your computer and use it in GitHub Desktop.
Save AndrewHazelden/8e7e66689ccd7c9e13ea to your computer and use it in GitHub Desktop.
Use Maxwell Render's PyMaxwell tool to check the active camera's name and resolution settings
from pymaxwell import *
# Maxwell .mxs scene file
mxsFilePath = 'C:/Program Files/Next Limit/Maxwell 3/scripts/stereo/CubeX.mxs'
# Load the mxs scene
scene = Cmaxwell(mwcallback)
scene.readMXS(mxsFilePath)
# Read the active camera's name and resolution settings
camera = scene.getActiveCamera()
cameraName = camera.getName()
res = camera.getResolution()
width = res[0]
height = res[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment