ZBrushCentral

More notes on FileNameAsk

Just thought to try something, and found out some more interesting things.

This is my previous script, slightly modified to specify saving a file as one of two types (.ZBR or .foo). In addition, the default filename now has a .zbr at the end:

[If, 1,
[VarDef, file, [FileNameAsk, “.ZBR.foo”, “OrthoProj.zbr”]]
[Note, file]
]

On a Mac, the behaviour is that the filename shows up as “OrthoProj.ZBR.”, the two file types appear in a popup list, and the chosen type is appended to the filename when “Save” is pressed, i.e. the result is “OrthoProj.zbr…ZBR” or “OrthoProj.zbr…FOO”.

On a PC, only one possible extension is shown, being “.ZBR.foo”. The default filename shows up “OrthoProj.zbr”, and when “Save” is chosen, the path is accepted but the “.ZBR.foo” extension is not appended to it. In my previous version of this little script, the lack of an extension on the default file name caused a path error to be reported when attempting to save under the default filename.

Is there a way to tell if ZBrush is running on a Mac or PC?

Cheers,
K

A quick look at the Zscript Reference will answer your question

[ZBrushInfo, The info type]
Output: a numeric value indicating the type of info queried
Returns information about ZBrush and the filesystem.
The info type can be:

0: The ZBrush version number 1: Demo/Beta/Commercial version (returns 0 for demo, 1 for beta, 2 for commercial) 2: Runtime in seconds (including millisecond fractions) 3: Memory usage 4: VMemory usage 5: Free Memory 6: Operating system (0=PC, 1=Mac, 2=MacOSX) 7: Unique session ID (useful for determining if the user has restarted ZBrush) 8: Total RAM

Actually I just read this after posting to your other questions. Sorry for any repeats. It is kind of confusing when you have 3 questions on the same subject though. I don’t know if this is wrong, but just confusing to me…

Sorry for any confusion.

Chris Reid