ZBrushCentral

ZSCRIPT export/import obj

I’m curious if it’s possible with zscript to export the selected subtool to a fixed path with a fixed name that will overwrite anything with that name currently in the folder

lets say export to C://3d/ with the name object.obj

If that is possible, is it also possible to have a button that copies the name of the selected subtool, imports that same obj from the directory and renames it to the subtools original name instead of obj

I tried making a button previously with fbximportexport instead to a fixed path and name however I couldn’t get that to run

Here is a simple script that creates two buttons. One to import and one to export.

[VarDef, path, "C:\3d\object.OBJ"]

[IButton, "Import","Imports object",
	[FileNameSetNext, path]
	[IPress,Tool:Import]
]

[IButton, "Export","Exports object",
	[FileNameSetNext, path]
	[IPress,Tool:Export]
]

Note that this will only work if the folder set at “path” already exists

1 Like

It works perfect thank you :slight_smile:

Just curious as this would be the final tweak, is there any way to have it get the current subtool name, and then after import rename it to that name? For export it isn’t relevant