RSS FEED

KeyHydra WheelControl Customization

With the latest KeyHydra update comes the possibility to use scroll wheel in conjunction with modifier keys to control properties of primitives at creation time, as well as various editable/edit poly tool properties. There's a pretty straightforward UI configuration when you want to tweak the values and an .xml configuration file if you want to go beyond that and add your own presets.

You can find the keyhydraWheelEvents.xml config file in the %USERPROFILE%\AppData\Local\Autodesk\3dsMax\%3DSMAXVER%\ENU\en-US\plugcfg folder. The root element contains the active state which controls whether or not the events are loaded. All its contained children match the classes of objects whose properties you wish to control, with the exception of the epoly node that applies both to editable poly object and edit poly modifier. Let's have a look at the structure of the file:

For example, the first ngon node binds ctrl+wheel rotation to changing the number of NGon sides:

<ngon category='Splines'>
    <action id='Create' subcategory='Standard'>
        <ctrl>
            <attrib>nsides</attrib>
            <lowerLimit>3</lowerLimit>
            <upperLimit>100</upperLimit>
            <increment>1</increment>
        </ctrl>
    </action>
</ngon>
Here's how you would create it from scratch:
  • To find the class name, call classOf $ in the Listener with you primitive object selected (can be any primitive, geometry, ligh, helper, shape etc.). The category description determines what tab the action will appear under in the UI.
  • Next line, the action id 'Create', means the action applies on creation time (for primitives, there are no other actions, there are more for editable poly), and the subcategory is once again the name of the UI specific section for the item.
  • Inside the action node you assign the ctrl, alt or shift modifier keys to the desired properties.
  • To get the attrib name, list properties of you selected object by running show $ in the listener and picking the one you want, or by activating macrorecorder, changing the value and noting the recorded property. Only numerical properties are supported. The increment value controls the amount by which the value will change with each wheel up/down event, lowerLimit and upperLimit set the bounds for the value.

For editable poly and edit poly properties, there are predefined actions that you can configure and remove but you cannot add more of them. They are applied depending on which command is currently active or was active right before turning the mousewheel.

You might have noticed that in some cases, there are more property names with + sign inbetween. This way, you can change multiple properties at once:

You can also use screen units instead of fixed increment/limits where it makes sense, using the px suffix. That way, the values will be different depending on current viewport zoom level:

As usual, before editing the file, make a backup copy in case something goes wrong. Have fun!

DISCLAIMER: All scripts and snippets are provided as is under Creative Commons Zero (public domain, no restrictions) license. The author and this blog cannot be held liable for any loss caused as a result of inaccuracy or error within these web pages. Use at your own risk.

This Post needs Your Comment!

Return to top