1. #16
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You're welcome!

  2. #17
    New Member Follow User Gallery
    Join Date
    Oct 2015
    Posts
    4

    Default I need to load a ui config file from a custom button

    using this script can you specify the path to a ui.cfg file that loads when you click the button automatically
    so that you can refresh your ui with out having look through folders to find the ui.cfg file. I tried adding the path at the end of the varSet Line but it didn't work hopefully someone can help me with this.


    [VarDef,buttonPath,""]


    [ISubPalette,"ZPlugin:My Buttons"]


    [IButton,"ZPlugin:My Buttons:i","Initialize ZBrush",
    [VarSet,buttonPath,"Preferences:Config:Load Ui:F:\Program Files\ZBrush 4R7_P3\ui.cfg"]
    [If,[IExists,buttonPath],
    [IPress,buttonPath]
    ]
    ,,15 /*width*/,, /*image*/, /*height*/]
    //end button

  3. #18
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You're nearly there. You need to use the FileNameSetNext command to specify the file you want to use, then simply use IPress with the load button:

    [VarDef,filePath,""]

    [ISubPalette,"ZPlugin:My Buttons"]

    [IButton,"ZPlugin:My Buttons:i","Initialize ZBrush",
    [VarSet,filePath,"F:\Program Files\ZBrush 4R7_P3\ui.cfg"]
    [If,[FileExists,filePath],
    [FileNameSetNext, filePath]
    [IPress,Preferences:Config:Load Ui]
    ]
    ,,15 /*width*/,, /*image*/, /*height*/]
    //end button

Page 2 of 2 FirstFirst 12

Posting Permissions

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