Blender For Dummies. Jason van Gumster

Читать онлайн книгу.

Blender For Dummies - Jason van Gumster


Скачать книгу
editor next to the hamburger menu.

      Using custom event maps

      Blender has one of the most customizable event systems of any application I’ve worked with. An event system is required for a complex program to interact with you and me, the users. Each time you press a button or move your mouse, it registers with the program as an event. The program then handles the event by performing an action of some sort. As an example, moving your mouse registers as an event, which then triggers your computer to perform the action of updating the location of the mouse cursor on your monitor.

      Blender provides you the ability to customize the event system to suit your needs, mapping events to a wide variety of possible Blender operations. Don’t like using a particular hotkey in Blender’s default configuration? You’re free to change it. And that’s just the start!

      The majority of the Keymap section in Preferences (Edit ⇒ Preferences) is devoted to modifying how events are handled within Blender. This list of events is particularly daunting to look at, and you can easily get lost among all those expanding and collapsing categories of events. Fortunately, you can modify how events are handled in a much easier way, and you don’t even have to use the Preferences editor if you don’t want to. Instead, you can follow these steps:

      1 Find the operator you want to bind in Blender’s menu system.As mentioned earlier in this chapter, an operator is a thing that Blender does; it’s the thing that happens when you click a menu item in Blender’s interface. As an example, say that you want to change the hotkey for saving a project from Ctrl+S (the current hotkey) to Ctrl+W, the hotkey used in older versions of Blender. You can find this operator by going to the menus at the top of your Blender window and choosing File ⇒ Save. Go to that menu item, but don’t click it yet. Just hover your mouse cursor over it and proceed to the next step.

      2 Right-click the menu item for the operator and choose Change Shortcut from the menu that appears.In this example, choose File ⇒ Save, right-click it, and choose Change Shortcut. Blender prompts you for a new hotkey.

      3 When prompted, use the new hotkey that you want to assign to the operation.In this case, you press Ctrl+W.Congratulations! Your new hotkey is assigned!

Flow diagram depicting three screenshots of Save selected in File menu, Change Shortcut selected in Save, and Press a key option.

      FIGURE 2-14: Customizing a hotkey sequence directly from Blender’s menus.

      

As of this writing, Blender doesn’t warn you if you attempt to assign a hotkey that has already been bound to another operator. Blender simply double-binds the hotkey, favoring default behaviors over custom ones. Blender’s interface will still say your custom hotkey is assigned to the desired action, but it just won’t work as expected. Currently, the only way to get around this problem is to make sure that your desired hotkey isn’t already assigned.

      1  In the search filter field, type all or part of the operator you want to customize and press Enter.The listing below updates with Blender’s best guesses for the operator you’re looking for. Alternatively, you can just drill down through the categories until you find the event you want. Using the previous example, you might type “save” in this field to find the Save Blender File operator. If you don’t know the name of the operator, you can search by the hotkey it uses. Left-click the drop-down menu to the left of the search filter field. You can choose between Name (the default) to search by operator name or Key-Binding to search by hotkey.

      2 Modify the event you want to change.Changing an actual event is much like the process used to add hotkeys to menu items. It works like so:Use the Type of Event Mapping drop-down menu displayed to the right or the operation name to stipulate whether the event is coming from a keyboard, mouse, text input, or some other source. For example, if you’re adjusting a hotkey, make sure that you’ve set it to Keyboard.Left-click the Type of Event field that comes after the Type of Event Mapping menu. It will either be blank or already have an event in it. Upon doing so, Blender prompts you for your new custom event (hotkey, mouse click, and so on).Set the event with the action you want assigned to it. For example, if you’re changing a hotkey, simply enter the key combination you want to use. If you decide that you don’t want to change the event, just click anywhere outside of the Event Type field.

      

While you’re editing your events, you might notice that a Restore button appears at the top of the section you’re working on. At any time, if you decide that you want to revert to the system defaults, click the Restore button. Everything goes back to the way it initially was.

      You can also use this interface to activate and deactivate events, delete events, and restore them to their initial values. Furthermore, if you expand the event’s details by left-clicking the triangle to the left of the operation name, you have even more advanced controls.

      After you have your events customized, you can save them to an external file that you can share with other users or simply carry with you on a USB drive so that your customized version of Blender is available wherever you go. To do so, click the Export button at the top right of the Preferences editor. A File Browser opens, and you can pick where you want to save your configuration file. The configuration is saved as a Python script. To load your custom configuration, it’s possible to load your script in Blender and just run it. However, simply using the Import button at the top of the Preferences editor is much easier.

      Speeding up your workflow with Quick Favorites

      As you work more and more with Blender, you may find that there are certain operators that you use frequently. However, perhaps you don’t want to go through the hassle of finding a free hotkey to use as a custom event. Well, dear artist, Blender has a special feature just for you: the Quick Favorites menu. The Quick Favorites menu is your own custom menu that you can populate with the tasks you perform most frequently in Blender.

      To access the Quick Favorites menu, press Q. By default, you get an empty menu that tells you that there are no menu items found. Of course, you’re certainly going to want to start adding things to this menu. The process for adding menu items to Quick Favorites is much like creating a custom keymap:

      1 Use Blender’s menus to navigate to the operator you want to add to the Quick Favorites menu.

      2 Right-click the menu item you want to add and choose Add to Quick Favorites.

      And there you go! In just two steps, you’ve just added an operator to your Quick Favorites menu. If you ever want to remove an item from your Quick Favorites menu, just call up Quick Favorites (Q), right-click the menu item in question, and choose Remove from Quick Favorites.

The Quick Favorites menu is context sensitive, so you can effectively have different Quick Favorites available in each editor. For example,
Скачать книгу