Center objects in Viewport Shortcut?

Hey folks,

I have been using CATIA (a very popular 3D CAD program) lately for university stuff and although it’s buggy as hell, I have found to love the shortcut to center an object in the viewport. In CATIA I simply “mouse-wheel”-click on an object and its center is centred on all three axis :eyebrowlift2:. Now I can rotate around this chosen object.
I have been using Blender for a long time, but the only similar thing I’ve found is to use “Shift” or “Ctrl” + “mouse-wheel” to move the point of rotation, which is really unconveniant :mad:.

I am sure there’s a shortcut in Blender as well and I would love to know it :D.

View / Align View / View Selected menu entry from the 3d view header (shortcut Numpad.)

Perfect I was looking for that :cool:. However I tried mapping this command to my mouse wheel (User Preferences, Input, searched for “view selected”) but it didn’t work :mad:. In the menu the shortcut changed to mousewheel, but nothing happens when I click my mousewheel in the 3D Viewport.

Also to get even more complicated, is it possible to map two actions to one key? Like selecting the object (aka right click) and then centering it afterwards?

By default you will have a shortcut conflict if you change it to MMB
MMB is also used for Rotate View. You would have to disable or change that shortcut for the view selected to work

I have mapped the ‘.’ and ‘Home’ keys to the side buttons of my Logitech mouse using a custom mouse profile in the Logitech Gaming Software. It allows ‘zoom selected’ and ‘zoom all’ with a mouse button click. Unfortunately, to make it work, I have to set the ‘persistent’ option in the mouse profile which means those buttons no longer control ‘forward’ and ‘back’ in the web browser. So I have to unset the ‘persistent’ option in the Blender mouse profile to restore normal function of the side buttons. But it works great in Blender, because I use those two keys a lot.