ZBrushCentral

Automate Document Export Without Dialogue

Hi I was wondering if there is a way to automate a document export without having to press OK on the next Zbrush Window, at first i tied to use the [IKeyPress,13] after [IPress,Document:Export], but it didnt work for some reason, I have to keep on OK in the Zbrush Export Image Window for the rest of the scripts to work.

Example

[FileNameSetNext,“C:\Master Image.jpg”][IPress,Document:Export]//At this point i would have to press OK on the next Export Image Window execute the rest of the script
[FileNameSetNext,“C:\Master BPR_Depth.psd”][IPress,Render:BPR RenderPass:Dep]

any help would be appreciated
thanks in advance

Hi,

Welcome to ZBC!

Unfortunately there’s not really anyway to export a jpg file using zscript because of the dialog that pops up - at least, I’ve not found a way that works.

For the render passes, you can use the interface item ID, that you can find by examining the Preferences>Utilities>View Window Id slider while the cursor is over the item. For the Depth pass it is 2208:

[If,([StrFind,"Width=",[IGetInfo,2208]]>-1),	
	[FileNameSetNext,"C:\Users\Marcus\Desktop\depth_image_out.psd"]
	[IPress,2208]
]

I’m using the check for the word “Width” so as to avoid an error if there has not been a BPR render and so no image to export.

FYI the full passes IDs are:
Composite = 2206
Shaded Image = 2207
Depth = 2208
Shadow = 2209
Am Oc = 2210
Mask = 2211
SSS = 2315
Floor = 2316

HTH,
Marcus

Thanks for the reply Marcus