I'm having problems with a script to batch render scenes in Iray.
TL;DR
The script will open a scene (or scenes) from files and render each camera in the scene to a file, but clothing items are showing poke-through which does not show when the same scene is opened manually and then rendered manually. The same poke-through is evident if I disable mesh smoothing on the clothing items after manually opening the scene file.
More info.
The script uses the openFile method of App.getContentMgr() to open the scene file. Then, for each camera in the scene, it renders to a named file. It has no effect on the poke-through issue whether it renders using a Dz3DViewRenderHandler object or a DzImageRenderHandler - have tried both, same problem.
I have added code after the scene file has been opened and before the rendering begins to identify all the nodes in the scene with an 'Enable Smoothing' property, and to display its value. It's a boolean property, and the values for all items showing poke-through are 'true'. I expect this to represent 'enabled', but then why the poke-through. Even aside from the poke-through, it's obvious the items are not smoothed in the rendered image.
Once the scene has been opened by the script and the scripted render has finished, there is no poke-through in the viewport (unless I disable mesh smoothing) and it doesn't show if I start a render manually. It only seems to be a problem when the render is done by the script.
Has anyone else come across this issue before? Any ideas on how to diagnose/work around/ fix this much appreciated, as it is pretty much a show stopper and I am stuck!