context sensitive hotkeys?


#1

Is it possible to bind context-sensitive keys in XSI? I tried searching for something like this, but I don’t know if I’m using the right terminology.

Essentially I want to do something like the following scenario-
If an object is not selected, the 1-4 keys work as default (change the left-hand menu to whatever you pressed), but if an object is selected, 1-4 would work like the Max subobject-mode hotkeys, where 1 is vertex, 2 is edge, 3 is face, 4 is element (polygon island).

if anybody has any insight on this that would be awesome!

edit: I should clarify by saying I’m looking to bind additional context-sensitive keys. I already know that XSI can bind the same key to different things based on a default list of situations (from the keyboard mapping interface), but I’m looking for something that is more macro-level than that. Again, not even sure if it’s possible- thats why I’m asking :slight_smile:


#2

Sorry in advance JaCo, I didn’t intend for this to turn into a scripting thread but it seems that my mind gravitates toward it… feel free to move my post and give me a good lashing :slight_smile:

So, after thinking about it for a bit I got the idea that I could write a script that handles the context logic and then takes the appropriate action. However, I can’t seem to find any information on how a script would change the active toolbar in XSI. There’s no mention that I could find in the SDK docs, and a google search always takes me to the keyboard mapping guide. Is it impossible to ‘Switch to Model Toolbar’, et al, via script? On that note, is it impossible to maximize/minimize a viewport via script? XSI is really good about telling you everything it’s doing, but there are a lot of things I’ve noticed that just don’t show up in the log… I’m hoping they’re exposed to developers, I’m really enjoying the flexibility XSI gives me in terms of customization.


#3

If anybody was wondering (or winds up here via search), the function that handles the main toolbar interaction is SwitchToolbar(index), where index is the toolbar you want to open. Also, you can change the view switch on a tabbed view in any layout using OpenView(viewName) where viewName is a string


#4

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.