1. #1

    Default FileNameAsk appears to behave differently on PCs and Macs

    Here's a small script:

    [If, 1,
    [VarDef, file, [FileNameAsk, ".ZBR", "OrthoProj"]]
    [Note, file]
    ]

    When run, it asks for the name of a file (in a save dialog), and then notes the file onscreen.

    If, on a Mac, I accept the given filename and choose to save in folder /F, the shown path is "/F/Ortho..ZBR". This is because ZBrush puts a trailing "." at the end of the default file name in the save dialog.

    If I do the same thing on a PC, i.e. save with the default filename to C:\F, the displayed path is "C:FOrtho.proj", i.e. with no backslash separators shown.

    Does anyone know if the \ separators are actually there in the path shown on the PC? \ is often used to escape special chars, so Note may simply be ignoring them.

    However, I am getting errors when attempting to actually write to the chosen file when using a PC, while the write works correctly on a Mac.

    Has anyone seen this behavior before?


    Many thanks,
    Ken

  2. #2
    Senior Member Follow User Gallery
    Join Date
    May 2004
    Location
    CA
    Posts
    140

    Default

    yes the "\" are there. I have noticed that the notes ignore them.

    as far as your errors. Make sure that if you are hardCoding the path that you use quotes around the string, especially if you have any spaces. Also the only "\"escape is for the \C (color moreInfo ). Make sure that the path does not have a "\C..." in it like "...\Copy of FileName...". Maybe try using the other slash "/". I believe it will read it either way.

    If you DO find different ways around mac or pc you can just make different code for each. you can test which OS is bing used with scripting.

    [CODE][ZBrushInfo, The info type]
    Output: a numeric value indicating the type of info queriedReturns 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
    [/CODE]

    Good Luck,

    Chris Reid

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •