53 lines
1.6 KiB
Python
53 lines
1.6 KiB
Python
# avatar pipeline
|
|
|
|
import os
|
|
import subprocess
|
|
|
|
result = subprocess.check_output([r'E:\Program Files\Wrap-X\WrapX.exe',
|
|
r'C:\Users\elisa\Documents\pg_project\R3DS\WrapX\PythonScripts\SimpleWrappingBust.py'])
|
|
|
|
print("Initial output: ")
|
|
resultString = result.decode("utf-8")
|
|
print(result)
|
|
|
|
output = resultString.split("Files to load: ")
|
|
files = output[1].split(",")
|
|
fileName = files[0]
|
|
textureFileName = files[1]
|
|
|
|
print("Files for Maya: \n" + fileName + "\n" + textureFileName)
|
|
|
|
subprocess.call([r"E:\Program Files\Autodesk\Maya2016\bin\maya.exe"])
|
|
|
|
|
|
|
|
input("Press enter to exit")
|
|
|
|
###### useless code ######
|
|
|
|
#fileName, textureFileName = subprocess.call('return (fileName, textureFileName)')
|
|
|
|
# print("Files saved at: \n" + fileName + "\n" + textureFileName)
|
|
|
|
#print(proc.returncode)
|
|
|
|
|
|
#os.startfile('E:\Program Files\Wrap-X\WrapX.exe')
|
|
|
|
#os.startfile("E:\Program Files\Autodesk\Maya2016\Bin\maya.exe")
|
|
|
|
# subprocess.call([r'E:\Program Files\Wrap-X\WrapX.exe',
|
|
# r'C:\Users\elisa\Documents\pg_project\R3DS\WrapX\PythonScripts\SimpleWrappingBust.py'])
|
|
|
|
# process = subprocess.Popen([r'E:\Program Files\Wrap-X\WrapX.exe',
|
|
# r'C:\Users\elisa\Documents\pg_project\R3DS\WrapX\PythonScripts\SimpleWrappingBust.py'])
|
|
|
|
# subprocess.run([r'E:\Program Files\Wrap-X\WrapX.exe',
|
|
# r'C:\Users\elisa\Documents\pg_project\R3DS\WrapX\PythonScripts\SimpleWrappingBust.py'],
|
|
# stdout=subprocess.PIPE, universal_newlines=True)
|
|
|
|
#(fileName, textureFileName) = process.communicate()
|
|
#exit_code = process.wait()
|
|
|
|
#if (process.poll()):
|
|
# (fileName, textureFileName) = process.stdout
|