I was running it from python with subprocess.Popen()
when I found it only prints to stdout.
And I may be onto something. I can get the same result as through deadline if I run the following script.
import subprocess
args = r'"C:\Users\daniel.asztalos\AppData\Local\limes_da_sites\studio1\pkgs\0-dev-package\mtoadeploy\4.0.4.2\maya-2019\bin\maketx.exe" -invalidargument'
CREATE_NO_WINDOW = 0x08000000
CREATE_NEW_PROCESS_GROUP = 0x00000200
DETACHED_PROCESS = 0x00000008
creationflags = CREATE_NO_WINDOW | CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, creationflags=creationflags)
stdout, stderr = p.communicate()
print p.returncode
print "----------------stdout----------------"
print stdout
print "----------------stderr----------------"
print stderr
output:
1
----------------stdout----------------
----------------stderr----------------
But if I remove the DETACHED_PROCESS
from the flags, runs as expected:
1
----------------stdout----------------
ERROR: Invalid option "-invalidargument"
WARNING: node "color_manager_syncolor" is already installed
maketx -- convert images to tiled, MIP-mapped textures
OpenImageIO-Arnold 2.2.1 http://www.openimageio.org
Usage: maketx [options] file...
--help -v -o --threads -u --format --nchannels --chnames -d --tile --separate --compression --fovcot --wrap --swrap --twrap --resize --noresize --filter --hicomp --sharpen --nomipmap --checknan --fixnan --fullpixels --Mcamera --Mscreen --prman-metadata --attrib --sattrib --sansattrib --constant-color-detect --monochrome-detect --opaque-detect --no-compute-average --ignore-unassoc --runstats --mipimage
Basic modes (default is plain texture):
--shadow --envlatl --lightprobe --bumpslopes --bumpformat
Color Management Options (OpenColorIO DISABLED)
--colorconfig --colorconvert --unpremult
Configuration Presets
--prman --oiio
For detailed help: maketx --help
Arnold Extensions
--colorengine Select the color processor engine to use: ocio or syncolor
(default: ocio, available: ocio, syncolor)
--colorconfig For OCIO, set the OCIO config (leave empty to use OCIO
environment variable).
For synColor, use this flag twice to set the native and
the custom catalog paths.
----------------stderr----------------
I’m not sure what to do with this information yet… Is there a way, to remove the DETACHED_PROCESS
flag when running through DL?