ZBrushCentral

export OBJs with automatic increments

I need to export lots of incremental progress OBJs throughout my working process, and I would like to find a way to set this up so that I only need to press one button to automatically export the OBJ with a new file name increment (like save_002.obj). I need all of the subtools to be included in the single OBJ, so I have been using the Export All SubTools function in the Decimation Master plugin.

Is there any way to do this with a Zscript?

Although it’s straightforward to set up a script to increment a file name unfortunately you can’t use it with the Decimation Master Export All SubTools button. The reason is that there can only be one zscript or plugin active at a time, so your script can’t pass the file name to Decimation Master.

thanks for the response! hm… Is it possible to create a script that exports each of the subtools into a single OBJ file without using decimation master?

Don’t know if this would help you or not.
http://www.zbrushcentral.com/showthread.php?182111-how-do-i-output-obj-sequence-file-on-timeline

that technique could definitely be useful. I suppose ideally the script would merge all the subtools, export as an OBJ with an incremental name, and then unmerge the subtools. Unmerging isn’t possible though so they would probably have to be all duplicated and appended to a different Tool before merging.

AlexanderLee1
Is it possible to create a script that exports each of the subtools into a single OBJ file without using decimation master?

Yes, it’s possible. Do you need to include UVs? If not then I might be able to reuse some code and write an exporter for you. But I shan’t be able to do it until next week.

No, I don’t need to include UVs. That would be amazing if you wrote an exporter, but I hope I’m not imposing on your schedule.

OK, here’s a plugin for you.

Installation:

  1. Download the zip file to your Desktop.
  2. Extract the file and then copy the ExportOBJ.zsc file and the ExportOBJData folder to your ZBrush 4R6\ZStartup\ZPlugs folder.
  3. Restart ZBrush. There should be a new All SubTools OBJ sub-palette in the Zplugin palette.

Instructions:

  • To save an OBJ press the All SubTools OBJ>Export OBJ button. The first time it is pressed you will be given a Save As dialog.
  • Choose a suitable file name and add up to four digits to the end, for example DemoSoldier_000.obj. If you don’t add any digits then the plugin will automatically add three zeros.
  • Subsequent presses of the button will increment the file name. If you wish to save with a new file name then turn on the Reset File switch. The file name memory will then be cleared and you’ll get the Save As dialog when next pressing the button.
  • Each subtool is added to the OBJ as a separate group. If two subtools have the same name then the second will have _Copy1 added to its name.

This is Windows only. If you’re on a Mac let me know.

I hope it’s useful.

works great, thanks so much. Really speeds up my work.