This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# File to check | |
mxsFilePath = 'C:/Program Files/Next Limit/Maxwell 3/scripts/stereo/CubeX.mxs' | |
# See if the file exists | |
if os.path.exists(mxsFilePath): | |
print('[MXS File] ' + mxsFilePath) | |
else: | |
print('[MXS File Not Found] ' + mxsFilePath) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
# Get the current time | |
now = datetime.datetime.now() | |
# Make a note of the date and time in a string | |
# Example: 2015-12-05 12:34:24 PM | |
textDocument = '# Scene Generated: ' + now.strftime('%Y-%m-%d %H:%M:%S %p') + '\n' | |
print textDocument |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
mxsFilePath = 'C:/Program Files/Next Limit/Maxwell 3/scripts/stereo/CubeX.mxs' | |
# Find out the current scene file | |
dirName = os.path.dirname(mxsFilePath) | |
sceneName = os.path.basename(mxsFilePath) | |
scenePathNoExt = os.path.splitext(mxsFilePath)[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the Color Space | |
# Example: scene = Cmaxwell(mwcallback); colorSpace = mxa_getColorSpace(scene) | |
def mxa_getColorSpace(scene): | |
colorSpace = '' | |
colorSpaceValue = scene.getColorSpace() | |
if colorSpaceValue == COLOR_SPACE_SRGB: | |
colorSpace = 'sRGB IEC61966-2.1' | |
elif colorSpaceValue == COLOR_SPACE_ADOBE98: | |
colorSpace = 'Adobe RGB' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Return the lens type name as a string | |
# Example: it = CmaxwellCameraIterator(); camera = it.first(scene); cameraLens = cameraParams.getLensType(); lens = mxa_lensTypeName(cameraLens) | |
def mxa_lensTypeName(cameraLens): | |
lensTypeName = '' | |
if cameraLens[0] == TYPE_CYLINDRICAL_LENS: | |
lensTypeName = 'cylindrical' | |
elif cameraLens[0] == TYPE_EXTENSION_LENS: | |
lensTypeName = 'extension lens' | |
elif cameraLens[0] == TYPE_FISHEYE_LENS: | |
lensTypeName = 'fisheye' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymaxwell import * | |
from math import * | |
import os | |
import sys | |
import datetime | |
mxsFileExt = 'mxs' | |
mxsDirPath = '/Applications/Maxwell 3/scripts/stereo/' | |
mxsFileList = getFilesFromPath(mxsDirPath, mxsFileExt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check the operating system | |
# Example: mxPlatform = getPlatform() | |
def getPlatform(): | |
import platform | |
osPlatform = str(platform.system()) | |
mxPlatform = '' | |
if osPlatform == 'Windows': | |
mxPlatform = 'Windows' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Icon folders:\n"; | |
print `xbmLangPathList`; |
NewerOlder