ZBrushCentral

Help _Z import to differrent directories

Does anyone no how to or have a script that can have Zbrush open to different directory asspecified in scripts when loading Objs.

Thanks

How you script this depends on what exactly you are trying to achieve but you will need to use the ZFileUtils. Then it is possible to store the last used folder or always specify the same one.

i would like the make buttons in my Zscript so it points to the specified
directory when clicked. I created it sucessfully in Z2 awhile back like this.

>>>
[IButton,Plants,
[RoutineCall, OpenMyZtlDialog]
[IUnPress,Tool:Texture:Colorize]
//place when you need it

//[IUnPress,Preferences:Misc:Use ZFolders]
//[FileNameSetNext,“ZBRUSH_ZScripts/BGroundMaker/Plants/”]
//[IPress,TOOL:Load Tool]
//[FileExecute,“ZBRUSH_Default\ZUtility_CR_v04.dll”]
//,OpenZTL.TXT"]
]

What you’ve got there is a snippet of code that doesn’t show the routine that is called. In the commented out code there’s a dll that presumably was provided to you privately because it’s not a Pixologic dll (and I don’t remember it ever being posted at ZBC). And [FileNameSetNext] has only ever worked with a full filename, not a path. So there’s nothing I can say as to why the code worked in ZBrush 2.

As I have said before, the ZFileUtils.dll, which is mentioned in a sticky thread at the top of this forum, will most likely enable you to do what you want.

Here’s a script that may help you. This simply saves out the last used folder for importing an OBJ, so next time the dialog opens in that folder. You have to have a new button - it won’t work with the standard ‘Import’ button - but I’ve put it in the Tool palette.

HTH,