but it not easy to share, the toolset is using two plugins data directory,
the code of that toolset contains more than 230 routinesdef , and even more buttons/sliders and switches, well i don’t think you have time for that.
i gonna try few tweak again and keep you posted, if i just isolated some part of the code to recreate another plugin to share with you it’s going to be hard.
i also a a lot of icon that are scattered from the main ZgametoolsData directory, and the Ztexturerdata directory.
Yes i gonna keep a shared plugin data, because i just want to keep all toolsets optimal and prevent from loading the common icons two or three time depending of the toolsets installed
from this common plugindata directory i share the zfileutils lib and dll, curl for licensing, common icons, the common plugin data has a toolset for those who want the connect zbrush to the app of their choice for 2D and 3D editing.
The ZCore which is a toolset i wanted to remove a week ago, but when i had tried recently to integrate the full licensing process in Ztexturer, i run in issue with the max def variable limitation so i revert my mind.
i tried from the test plugin to run from the the zfile utils from a different plugin directory, it worked well, so it not a problem to load the dll from zgametoolsdata/zfileutils.dll, or ZtexturerData/zfileutils.dll.
the
I can share the header in case you spot anything , i let the checksystem after the initzfileutils
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ZFileUtils Globals VARIABLES
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[VarDef,isMac,0]//do we have a Mac or PC
[VarDef,Zvers,0]//ZBrush version
[VarDef,dllPath,""]//plugin DLL path
[VarDef,dllVersion,0]//plugin DLL version
[VarDef,err,0]//standard error
[VarDef,folderName,""]//folder path/name
[VarDef,fileName,""]//file path/name
[VarDef,copyFileName, “”]// Name of file to copy to
[VarSet,index,0] //seems unused
/* Unused Global Variables :
[VarDef,fileCount, 0]// Number of files loaded – unused
//[VarDef,gSharedPath,""] //path to shared/public MyPluginData folder
*/
// Get current language
// @returns the current language index2
[RoutineDef, ZFU_GetCurrentLanguage,[VarSet, lang, [FileExecute, [Var, dllPath], GetCurrentLanguage]]
, lang]
// Register localization files for the plugin
// @enFilePath: path to the english xml localization file, must be formated “[name]en.xml”
// other languages are deduced as being “[name]fr.xml”, “[name]jp.xml”, etc…
[RoutineDef, ZFU_RegisterLocalizationFile,[FileExecute, [Var, dllPath], RegisterLocalizationFile, enFilePath]
, enFilePath]
[RoutineDef, ZFU_LocalizeText,[If, [MemGetSize, ZFU_Mem_Temp], [MemCreate, ZFU_Mem_Temp, 256]]
[If, [FileExecute, [Var, dllPath], GetLocalizedText, text, ZFU_Mem_Temp],
[MemReadString, ZFU_Mem_Temp, text]
]
[MemDelete, ZFU_Mem_Temp]
, text]
[RoutineDef, ZFU_LocalizeTitle,[If, [MemGetSize, ZFU_Mem_Temp], [MemCreate, ZFU_Mem_Temp, 256]]
[If, [FileExecute, [Var, dllPath], GetLocalizedTitle, text, ZFU_Mem_Temp],
[MemReadString, ZFU_Mem_Temp, text]
]
[MemDelete, ZFU_Mem_Temp]
, text]
[RoutineDef, ZFU_LocalizeInfo,[If, [MemGetSize, ZFU_Mem_Temp], [MemCreate, ZFU_Mem_Temp, 256]]
[If, [FileExecute, [Var, dllPath], GetLocalizedInfo, text, ZFU_Mem_Temp],
[MemReadString, ZFU_Mem_Temp, text]
]
[MemDelete, ZFU_Mem_Temp]
, text]
[RoutineDef, ZFU_LocalizeDescr,[If, [MemGetSize, ZFU_Mem_Temp], [MemCreate, ZFU_Mem_Temp, 256]]
[If, [FileExecute, [Var, dllPath], GetLocalizedDescr, text, ZFU_Mem_Temp],
[MemReadString, ZFU_Mem_Temp, text]
]
[MemDelete, ZFU_Mem_Temp]
, text]
[RoutineDef, ZFU_StrReplaceArg,[If, [MemGetSize, ZFU_Mem_Temp], [MemCreate, ZFU_Mem_Temp, 256]]
[MemWriteString, ZFU_Mem_Temp, text]
[If, [FileExecute, [Var, dllPath], StrReplaceArg, argText, argIndex, ZFU_Mem_Temp],
[MemReadString, ZFU_Mem_Temp, text]
]
[MemDelete, ZFU_Mem_Temp]
, text, argIndex, argText]
[RoutineDef, CheckSystem,//check ZBrush version
[VarSet,Zvers,[ZBrushInfo,0]]
[If,[Val,Zvers] >= 4.8,
[Note,"\Cff9923This zscript\Cffffff is not designed for this version of \Cff9923ZBrush\Cffffff.",3,4737096,300]
[Exit]
]
[VarSet,isMac, [ZBrushInfo,6]] //check Mac or PC
// Make sure we have the dll and set its path
[If,[ZBrushInfo,16]==64,//64 bit
[If,isMac,
//use the path below for testing only
//[VarSet,dllPath,“zgametoolsData/ZFileUtils.lib”]
//use the path below for installed plugins
//[VarSet,dllPath,“ZBRUSH_ZSTARTUP/ZPlugs64/zgametoolsData/ZFileUtils.lib”]
[VarSet,dllPath,“ztexturerdata/ZFileUtils.lib”]
,
//use the path below for testing only
//[VarSet,dllPath,“zgametoolsData\ZFileUtils64.dll”]
//use the path below for installed plugins
//[VarSet,dllPath,“ZBRUSH_ZSTARTUP\ZPlugs64\zgametoolsData\ZFileUtils64.dll”]
[VarSet,dllPath,“ztexturerdata\ZFileUtils64.dll”]
]
,//else 32 bit - no longer supported
[Note,"\Cff9923This zscript\Cffffff is not designed for this version of \Cff9923ZBrush\Cffffff.",3,4737096,300]
[Exit]
]
[If, [FileExists, [Var,dllPath]],
//check that correct version
[VarSet, dllVersion, [FileExecute, [Var,dllPath], Version]]
[If, [Val,dllVersion] >= 4.8,//dll version
//OK
,//else earlier version
[Note,"\Cff9923Note :\Cc0c0c0 The \Cff9923 ZFileUtils plugin \CffffffDLL\Cc0c0c0 is an earlier version which does not support this plugin. Please install correct version."]
[Exit]
]
, // else no DLL.
[Note,"\Cff9923Note :\Cc0c0c0 The \Cff9923 ZFileUtils plugin \CffffffDLL\Cc0c0c0 could not be found at the correct location. Please re-install the plugin, making sure the relevant files and folders are in the \CffffffZStartup/ZPlugs\Cc0c0c0 folder."]
[Exit]
]
]//end routine
//Routine to Initialize ZFUtilsTests, set up a language file
[RoutineDef, InitZFUtilsTests,// Initialize localization
[RoutineCall, ZFU_RegisterLocalizationFile, [FileNameResolvePath, “zTexturerData/lang/ztexturer_en.xml”]]
]
[RoutineCall, InitZFUtilsTests]
[RoutineCall, CheckSystem]