1. #1

    Default Assigning a hotkey to a script?

    Hi

    I have written a small script. At the moment I am loading it from the Zscript menu. I would like to assign a shortcut for it. What is the best way to do it?


    thanks

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

    Default

    Hi,

    It depends a bit on what your script is like.

    1. If it's a single button then you could save it as a macro. To do this, change the button name to ??? and then save the text file to the ZStartup/Macros/Misc folder. The macro button name will be the same as the file name. Press Macro>Reload All Macros to make your new macro button appear. You can then assign a hotkey to the button by Ctrl+Alt+clicking it.

    2. If your script has more than one button, or has sliders or switches then you will need to make it into a plugin. You can learn about that here: http://www.pixologic.com/docs/index....gin_Interfaces Once the plugin is part of the interface you can assign a hotkey to any of the buttons.

    If neither suggestion solves your problem let me know.

  3. #3

    Default

    Quote Originally Posted by marcus_civis View Post
    Hi,

    It depends a bit on what you script is like.

    1. If it's a single button then you could save it as a macro. To do this, change the button name to ??? and then save the text file to the ZStartup/Macros/Misc folder. The macro button name will be the same as the file name. Press Macro>Reload All Macros to make your new macro button appear. You can then assign a hotkey to the button by Ctrl+Alt+clicking it.

    2. If your script has more than one button, or has sliders or switches then you will need to make it into a plugin. You can learn about that here: http://www.pixologic.com/docs/index....gin_Interfaces Once the plugin is part of the interface you can assign a hotkey to any of the buttons.

    If neither suggestion solves your problem let me know.

    Hi Marcus

    Thanks for detailed answer. However I was wondering if there is a way to assign a hotkey without making a macro button first. If buttoning is the only to go then no problem, at least there is a solution for it.


    thanks

  4. #4
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,671

    Default

    In order for the hotkey to be available every time you start ZBrush the zscript must be part of the interface. The only way to do that is for the zscript to either be a macro or a plugin.

    The only alternative is to create a macro that loads your zscript. If your zscript runs immediately it is loaded (i.e. it has no buttons, etc.) then this would work. You would then assign a hotkey to the macro button. However, this is really no different to making your zscript into a macro.

  5. #5

    Default

    Quote Originally Posted by marcus_civis View Post
    In order for the hotkey to be available every time you start ZBrush the zscript must be part of the interface. The only way to do that is for the zscript to either be a macro or a plugin.

    The only alternative is to create a macro that loads your zscript. If your zscript runs immediately it is loaded (i.e. it has no buttons, etc.) then this would work. You would then assign a hotkey to the macro button. However, this is really no different to making your zscript into a macro.

    marcus_civis, thanks for explaining patiently. The macro method is fine, and reasonable.

Posting Permissions

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