I have created a simple script to automate applying a texture map like so
[ISubpalette, Zscript:CustomScripts]
[IButton,Zscript:CustomScripts:LoadImage,"Press to run this cool macro. Macros can be aborted by pressing the esc key.",
[IPress,Texture:Import]
[ISet,Texture:Item Info,[IGetMax,Texture:Item Info]]
[VarDef, finalName, ""]
[VarSet,finalName,[IGetTitle,Texture:Item Info]]
[VarSet,finalName,[StrExtract,finalName,0,[StrLength,finalName]-2]]
[ISet,Texture:Item Info,[IGetMax,Texture:Item Info]]
[IPress,Texture:Flpv]
[IPress,Tool:Texture Map:TextureMap]
[IClick,[StrMerge,“PopUp:”,finalName]]
]
But the problem is after the import texture dialog box opens up in zbrush, if I press cancel and not import any texture the macro still runs and it’ll flip the already applied texture. So my question is, is there anyway to check if a texture file was imported or not?
I am hoping there is someway to detect if I press CANCEL in the import dialog box
Something like this -
If (FileImported == yes)
then Run the macro
Else
dont do anything
Please Help!