ZBrushCentral

FileName functions question

I’m trying to figure out how to call whatever the displacement map has been named after being generated, I tried using FileNameGetLastUsed, but i just not sure on the syntax to place it in the select function. the goal is to select the alpha for an export script, regardless of the initial mesh name.

thnx for any help.

Hola. :slight_smile:

I know the film is done and you are probably taking a much need break but here is an answer for ya. I am just learning ZScripting myself.

Run this zscript to get see how it works:

[IButton,Play,“Press to play this ZScript. ZScript can be aborted at anytime by pressing the ‘esc’ key.”,
[IPress,Tool: Displacement:Create DispMap] //Create map
[ISet,Alpha:Item Info,999] // Set to very high number so it selects the last item in the alpha menu
[VarSet,DispName,[IGet,Alpha:Item Info]] // select the displacement map
[Note, DispName] // print out its number in the alpha palette

]

Cheers,

Ryan

Ryan,

For the name you could use a slightly different solution:


[ISet,Alpha:Item Info,[IGetMax,Alpha:Item Info]]//set to last alpha
[VarSet,DispName,[IGetTitle,Alpha:Item Info]] //gets name of last alpha

Very cool. :slight_smile: Thanks Marcus.

Thx This Script Good Idea