ZBrushCentral

Alpha filename from current alpha

Is it possible to get the filename from the current alpha?

ie current alpha: c:\alphas\concrete_027.jpg

I’m actually only after the filename, rather than the fullpath

[VarDef, alphaStr, “”]
[VarSet, alphaStr, [IGet,Alpha:~BrushAlpha]]

http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/command-reference/#FileNameExtract

You can get the name (but not the extension) like this:

[VarSet,alphaName,[IGetTitle,Alpha:Item Info]]
[Note, alphaName]

Note that this way the name has a period at the end. You can trim it off like this ,if you want:

[VarSet,alphaName,[StrExtract,alphaName,0,[StrLength,alphaName]-2]]

I don’t think there’s any way to get the path or extension, other than using something like [FileNameGetLastUsed].

HTH,