I’ve started to dig into automating some of our pipeline with zBrush, and I am wondering if there is any documentation on the FBXExportDll? I can get the EXPORTS with Visual Studios Dumpbin app, but this doesnt give me the signatures of the exposed functions. I’m pretty new to zBrush land so maybe I am missing the simple help file?
Other folks must be automating export processes? Or is everyone just using GoZ which unfortunately doesn’t work for our requirements.
For posterity sake here are the exposed methods for the .dll. I can get Version to report back
[IButton, "Version Info", "Get the version info for the FBXExporter",
[Note, [FileExecute,[Var, fbx_dll_path],Version]]
]
However ‘ExportFBX’ with a passed in file path crashes zBrush.
The public interface of FileExecute is pretty limited (a couple of 255-char string buffers and a float, or something like that) so unless you got lucky it might not do what you need.
OTOH if you’re comfortable will C / C++ you can write your own dll that handles the work and is accessible from ZScript with that narrower interface --you can make a function with this signature and do anything you want inside:
float DLL_EXPORT ExternalCommand(char* CommandNameBuffer, double optValue, char* ArgBuffer, int ArgBufferSize,
char* ReturnBuffer, int ReturnBufferSize, char** zData)
{
/// your code here;
}
Then call that from ZScript. I don’t know however how to introspect that *zData pointer, I’ve never found documentation on what that looks like.
It might be easier to simple export OBJ and the reprocess that outside of Zbrush using the FBX SDK – that could be written in python using a filewatcher or maybe called explicitly using ZBrush - The World's Leading Digital Sculpting Solution
Yeah I found the discussion around the DLL hacking. I could go that route, but I may double back on what the specific requirements are with the team before I open up the custom dll rabbit hole.
Was hoping zBrush wasn’t the oddly ui’d black box it appeared to be on first glance
Was hoping zBrush wasn’t the oddly ui’d black box it appeared to be on first glance
That’s my opinion in a nutshell, alas. However an OBJ->FBX conversion in the background without user intervention, while not trivial, is totally doable; it’s what I do, in fact. There might be efficiencies or detail things I’m missing but it seems like a reasonable balance of expenditure and results for static meshes. Have not tried anything like snapshotted animations, however, that would change the equation