ZBrushCentral

Import into Subtool from last visited IMPORT folder - script help please

Hello,
I am importing frequently OBJ’s and have each time to navigate to the nested folder again and again.

But once you (Marcus Civis) provided me kindly a script, that remembers the last “export” folder.
I have attached it here below. Unfortunately I’m not able to understand how to write something like this.
Would it be possible to create a similar script, that remembers the last IMPORT folder, too? :smiley:

I hope it’s possible, thanks for any help!

The Export folder script, which is one of my most important scripts in zBrush:

//ZBRUSH MACRO - Recorded in ZBrush version 4.8

[IButton,???,“Export current mesh as OBJ using Maya settings”,
[IShowActions,0]
[IConfig,4.8]
[If,[IsEnabled,Tool:Export],
[VarDef,filepath,“ZBRUSH_ZExportImport”]
[If,[FileExists,“LastFolder.dat”],
[MemCreateFromFile,ExpLastFolderMem,“LastFolder.dat”]
[MemReadString,ExpLastFolderMem,filepath,0]
]
[IUnPress,Tool:Export:Grp]
//[IUnPress,Tool:Export:Mrg]
[VarSet,zF,0]
[If,[IGet,Preferences:Misc:Use ZFolders],
[VarSet,zF,1]
[IPress,Preferences:Misc:Use ZFolders]
]
[VarSet,toolName,[IGetTitle,Tool:Item Info]]
[VarSet,filePath,[StrMerge,filePath,toolName,“obj”]]
[VarSet,fileName,[FileNameAsk,“OBJ ( .obj)| .obj||”,[FileNameResolvePath,filepath],“Export as OBJ”]]
[If,[StrLength,fileName],
[MemDelete,ExpLastFolderMem]
[MemCreate,ExpLastFolderMem,256]
[VarSet,folderStr,fileName]
[VarSet,bwritten,[MemWriteString,ExpLastFolderMem,[FileNameExtract,folderStr,1],0]]
[MemResize,ExpLastFolderMem,bwritten]
[MemSaveToFile,ExpLastFolderMem,“LastFolder.dat”,1]
[FileNameSetNext,fileName]
[IPress,Tool:Export]
]
[If,zF,
[IUnPress,Preferences:Misc:Use ZFolders]
]
]
,0.25]

hmm that’s odd that this functionality isn’t already working for you by default in Zbrush 2021.1.1

Can you explain your workflow in more detail? If I use Subtool Master in zbrush 2021.1.1 to multi append obj’s, it does remember my last used import folder…

Thanks for reply, I will try this…
I‘m always using just the import button at the tool palette for single mesh import.
But this sounds good, if subtool master remembers