Need help opening a *.duf file, rendering it a couple of times, then closing it.
Hi,
I could use some help.
I like to do is the following and I have gotten most the way there:
1. Present the user with a folder dialog and have them select one.
2. The script then opens the first *.duf file in that folder.
3. The script sets the render settings.
4. Renders the scene, manipulates a node and renders the scene again (this happens a few times).
5. I'd then like to close the *.duf file without saving and open the next file in the folder.
6. The script sets the render settings back to how they were.
I have been able to get all of the items working except 2 and 5, I can't find anywhere how you open and close the *.duf files. I can manipulate text files without issue.
My other questions is this the best way to do this. Can you script Daz do step 4 without actually opening the *.duf file?
Thanks in advance,
james
UPDATED
So I found this, which looked promising, but it gives me an error. Immediately after running the script I am able to manually open the 002.duf file.
var path = '/Users/james/Documents/002.duf';
var err = Scene.loadScene(path,Scene.OpenNew);
print(getErrorMessage(err));
console
File Format Invalid
I tried using the options bleow as well with no luck:
Scene.DefaultMethod
Scene.MergeFile
Comments
If you want to load each as a separate scene then this should, I think, work:
That worked great thanks!