How to write script to automate rendering several images for offline compositing?
whitefrozenturkey
Posts: 0
What SDK functions would you use to write a plugin that does this:
1.) Gets a list of the objects in the scene
2.) For each object, make it visible, make the others invisible
3.) Render the scene with just that object to a file named '<objectname>.png'. (Probably DzRenderer::render() used for this?)
The idea being that you can then composite the images together in gimp or whatever.
Are there any existing scripts that do something similar to this or can you suggest which SDK functions would be used for these steps?
Comments
Moved to the appropriate forum
Well, I am having trouble with the folder name for saving the renders - it keeps coming up blank when the script it run, even if I've defined it in in render options. I think the fix for this may have been to actually go in and address the values in render Settings, but I'm not sure. Anyway, if you render to a window (set your options first) this will do what you want I think, and if someone fixes the path issue it will even save to disc:
That's awesome, thanks a lot! Sorry for such a basic question but I can't find the help on how to install a script like this.
I named it "renderSeparate.dsa" and put it in a directory that had other dsa script in it at C:\Users\owner\Documents\DAZ 3D\Studio\My Library\Scripts\Utilities\MoveScripts but it doesn't seem to show up in the list in DAZ. I noticed that if I renamed one of the scripts that it becomes orphaned in DAZ but doesn't appear again with the new name. ("Previous Siblingx.dsa" becomes an orphan.)
Is there a page that shows how to load this script?
Thanks very much!
You need to "Scan Known Directories for Content" before it will show in categories.
Thanks, I tried that and it did some work but the script doesn't appear in DAZ. In experimenting with how it works I'd renamed "Previous Sibling.dsa" to "Previous Siblingx.dsa" which caused it to become orphaned, when I renamed it back to "Previous Sibling.dsa" and scanned for changes, Previous Sibling.dsa no longer appears in DAZ, nor does the new script.
The "Only New Items" checkbox didn't seem to make a difference. Is there documentation on how this works? I've been searching but can't find anything.
They'll show up under Unassigned.
Look under DAZ Studio Formats>My Library>Scripts>Utilities>MoveScripts, the scripts should all appear there.