1. #1
    Senior Member Follow User Gallery
    Join Date
    Feb 2011

    Default shorter text buttoms

    When customizing the interface some buttons have very long text and/or space. For example colorize or Dynamesh.
    It is possible to do a macro and use it as a shorter button. But it will not work with toggle buttons as colorize, activate symmetry or Dynamesh. It will act correctly but won't give visual feedback the mode is on with a red button.
    Is there any way to get these toggle buttons shorter/smaller but give visual red feedback as a normal toggle button?

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004


    It's possible with a plugin but one major drawback for something like DynaMesh is that plugins can't monitor the interface, so if the Dynamesh is already on in a project when you load it your plugin button wouldn't necessarily reflect that state. You'd have to press the plugin button to get it in synch.

    Here's some example code:

    [ISubPalette,"Zplugin:My Plugin"]//create a new sub-palette in the Zplugin menu

    [ISwitch,"Zplugin:My Plugin: DynaM",0,"Turn on DynaMesh",
    //when switch turned on
    [If,[IExists,Tool:Geometry:DynaMesh],//interface item must exist
    [If,[IsEnabled,Tool:Geometry:DynaMesh],//must be enabled
    [IPress,Tool:Geometry:DynaMesh]//turn it on
    ,//when switch turned off
    [If,[IExists,Tool:Geometry:DynaMesh],//interface item must exist
    [If,[IsEnabled,Tool:Geometry:DynaMesh],//must be enabled
    [IUnPress,Tool:Geometry:DynaMesh]//turn it off
    ,,.25]//.25 is button width - quarter of palette width

    //all switches must be enabled here
    [IEnable,"Zplugin:My Plugin:DynaM"]

    You add this code to NotePad and save as a TXT file. Then load the file into ZBrush using the Load button in the ZScript palette. If there are no mistakes in the code, you'll see the buttons appear in the Zplugin palette. ZBrush will also create a ZSC file which you can put in the ZStartup/ZPlugs64 so that the plugin loads each time you start ZBrush.

    Here's the code as a text file: MyPlug.txt


Posting Permissions

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