-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyms.py
More file actions
26 lines (19 loc) · 779 Bytes
/
pyms.py
File metadata and controls
26 lines (19 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import sys
import click
import pyexr
import vray_depth_PyEXR
@click.command()
@click.argument("what_to_do")
@click.option("-o1", "--option1")
@click.option("-o2", "--option2")
def cli(what_to_do: str, option1, option2):
click.echo(f">>> PyMs.exe {what_to_do} -{option1} -{option2}")
if what_to_do == "vray_depth":
vray_depth_PyEXR.write_to_file(option1, option2)
if getattr(sys, 'frozen', False):
cli(sys.argv[1:])
else:
# this code executes only if not run from frozen EXE
vray_depth_PyEXR.write_to_file("C:/Users/pawelgrze/AppData/Local/Autodesk/3dsMax/2017 - 64bit/ENU/temp/vray_depth.exr", "PyMs.ini")
# exr = pyexr.open("C:/Users/pawelgrze/AppData/Local/Autodesk/3dsMax/2017 - 64bit/ENU/temp/vray_depth.exr")
# print(exr.channels)