ZBrushCentral

Export/import script

Hi

I hope this is the right place to post.

I’m looking for somebody who can write me two scripts.
one script for exporting the active tool to c: emp meshes\1.obj
and another script for importing the same mesh again.
the script should export/import the mesh directly without any dialoges etc.
it would be nice if the script would disable grouping, before exporting.

I have the same two scripts for 3ds max and this would speed up my workflow alot. You wouldn’t need to search for folders/files etc. anymore. just one click in max and one click in zbrush :slight_smile:

I attached the maxscripts.defaultFileImportExport.zip (311 Bytes)

Unzip the attached zipfile into your Startup\Zplugs folder and restart ZBrush. You will find two new buttons at the bottom of the Tools menu:

OBJ out and OBJ in

Yup… should do what you want. (use the included .txt script to further customize the source for your purposes.)

SvenObjOutIn.zip (2.38 KB)

works perfectly

thanks alot :smiley:

Very nice!

Also another ncie thing is that it does not complain about vertex order or number. Is this a feature or a bug? :slight_smile:

nice

It’s now work , thank Svengali :wink:

Hi guys

i tried to use it for Mac but the problem is, the “Obj out” ( Export ) is working fine but the “Obj in” ( Import ) is not working, saying the file is does not exist, and i made sure from the path and the file do exist, any idea why ?

thank you for your help

Ali

I posted a screen shot of the error message I get when I click import.

Can’t bring files between Maya and Zbrush.

To my knowledge my paths are all correct. Below is the script text, only thing I changed was the file name to read temp_01 and my location where I’d like the files to be stored temporarily.

// ObjOutIn.txt - Svengali July 08
// load and save Object File = temp_01
// Groups disabled on save
// buttons located in Zplugin:Misc Utilities submenu

[IConfig, 3.1 ]
[IShowActions, 0]

[VarDef, Object1, “E: emp meshes emp_01” ]

[IButton,“TOOL: OBJ out”,“Export model as temp_01”,

[If, [IGet, TRANSFORM:Edit] == 1, [ISet, TOOL:Export:Grp, 0 ] [FileNameSetNext, Object1 ] [IKeyPress, 13, [IPress, TOOL:Export:Export ] ] [Note, "Model Saved as temp_01...", , 2 ] , // else [Note, "No model in edit mode...", , 2 ] ]

]

[IButton,“TOOL: OBJ in”,“Import model temp_01”,

[If, [FileExists, Object1 ] == 1, [FileNameSetNext, Object1 ] [IKeyPress, 13, [IPress, TOOL:Import:Import ] ] [Note, "model temp_01 has been loaded...", , 2 ] , // else [Note, "Sorry, temp_01 does not exist...", , 2 ] ]

]errorMessage.png

Attachments

errorMessage.png

Did anyone solve problem with import on Mac OS?

I’m having the same problem on a Mac. I get an error message on import. I’m not a programmer but I’m reasonably sure it has something to do with how the path to the object is written, although I’m not smart enough to know what’s actually wrong. But it’s the only thing I’ve changed in the script.

On mac os x - keep obj file in zbrush script folder:

// ObjOutIn.txt - Svengali July 08
// load and save Object File = temp_01.obj
// Groups disabled on save
// buttons located in Zplugin:Misc Utilities submenu

[IConfig, 3.1 ]
[IShowActions, 0]

[VarDef, Object1, “temp_01.obj” ]

[IButton,“TOOL: OBJ out”,“Export model as temp_01.obj”,

[If, [IGet, TRANSFORM:Edit] == 1,
	[ISet, TOOL:Export:Grp, 0 ]
	[FileNameSetNext, Object1 ]
	[IKeyPress, 13, [IPress, TOOL:Export:Export ] ]
	[Note, "Model Saved as temp_01.obj...", , 2 ]
, // else
	[Note, "No model in edit mode...", , 2 ]
]

]

[IButton,“TOOL: OBJ in”,“Import model temp_01.obj”,

[If, [FileExists, Object1 ] == 1,
	[FileNameSetNext, Object1 ]
	[IKeyPress, 13, [IPress, TOOL:Import:Import ] ]
	[Note, "model temp_01.obj has been loaded...", , 2 ]
, // else
	[Note, "Sorry, temp_01.obj does not exist...", , 2 ]
]

]

In maya (max) choose export temp file to the ZBrush script folder

in my case:
/Applications/ZBrushOSX 2020.1.1/ZStartup/ZPlugs64