1. #1
    Senior Member User Gallery
    Join Date
    Feb 2007
    Location
    Wellington, NZ
    Posts
    157

    Default Working with Sliders

    Hi, again (sorry for bombarding the forum)
    more of a general question. What is the efficient way to work with sliders that have to get evaluated when a script is executed via a button ?
    Do I have to put them in Zplugin Form into the Inerface so they have an Interface Path - then call them from my WIP Scripts ?
    I even tried putting them in Macro Form - anything to get them out of the Zscripting Window into a more permanent location.
    Jens Kafitz
    Sr. Texture Artist, Weta Digital


  2. #2
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,577

    Default

    If a slider is in a simple zscript (displayed in the ZScript Window) then the path is of the form zscript:slidername, so for a slider called 'Width' you would use [IGet,zscript:Width] to get its value.

    When writing a plugin it is often easier to keep it as a simple zscript until the basic functionality is there. This is because once a plugin is loaded it becomes part of the interface and does not update if you reload the text file, meaning you have to restart ZBrush to test any changes.

    There are ways around this. If you 'close' the plugin interface then it is no longer part of the interface and reloading will update the whole plugin.

    If you have a sub-palette with a path ZPlugin:Test Stuff then using the command
    [CODE]
    [IClose,"ZPlugin:Test Stuff"][/CODE]

    will remove the sub-palette and all its buttons from the interface. Use with care though. Closing a sub-palette from within a plugin that resides in that sub-palette will crash ZBrush. Also closing and reloading mean that the plugin interface is assigned new numerical IDs each time. Restart ZBrush every so often so that the limit (whatever that might be) is not reached.

  3. #3
    Senior Member User Gallery
    Join Date
    Feb 2007
    Location
    Wellington, NZ
    Posts
    157

    Default

    Cool thanks. The IClose is great ! I was already getting annoyed that I can't just initalize Zbrush to reload Plugins.
    Works like a treat. Thanks a lot Marcus for all your help.
    Last edited by campi; 08-26-12 at 05:42 AM.
    Jens Kafitz
    Sr. Texture Artist, Weta Digital


Posting Permissions

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