Not applicable
05-12-2021
08:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
We are using 'ArnoldMaterialXBake' in a pipeline as a publishing tool to export materialX files from Katana.
(using ktoa-3.2.# / arnold-6.2.#)
https://docs.arnoldrenderer.com/display/A5KTN/ArnoldMaterialXBake
We are using node's 'bake()' method in order to automate the export process.
We are having an issue where it seems impossible (or we just don't know how) to know when the 'bake' process ends, while it seems to process in a different thread then the current one.
Here's a snippet as an example of what we are doing...
node = NodegraphAPI.GetNode('ArnoldMaterialXBake') filepath = '/tmp/tmpT4ev0n/test.mtlx' node.getParameter('saveTo').setValue(filepath, 0) node.bake() print 'BAKE PROCESS START---' i = 0 while not os.path.isfile(filepath): i += 1 time.sleep(0.5) print 'File exists, elapsed seconds: ', i/2
Would result in;
BAKE PROCESS START--- File exists, elapsed seconds: 4.0
Is there anything we could do in order to access when the `bake()` process ends?
ie; Other then fetching if the file exists in a while loop.
Thanks
Solved! Go to Solution.
Link copied