It sounds like you want to automatically switch between Orbit Selected (centering on the selected object) and Orbit Point of Interest (orbiting around a specific point when nothing is selected) in 3DS Max. Unfortunately, there isn't a built-in feature that automatically switches between these two types of orbit modes based on whether an object is selected or not.
However, you can achieve a similar workflow by customizing how you switch between the two modes. Here are a couple of solutions and workarounds:
1. Custom Shortcut or MacroScript
One way to make this workflow smoother is by creating a MacroScript that toggles between these two orbit modes based on selection status.
Here's how you can create a script:
Step 1: Open the MaxScript Listener by pressing F11.
Step 2: Write a simple script that checks if an object is selected. If there is a selection, it sets the orbit to Orbit Selected, otherwise, it defaults to Orbit Point of Interest.
Here is an example of what the script could look like:
maxscript
if selection.count > 0 then ( actionMan.executeAction 0 "40024" -- "Orbit Selected" command ) else ( actionMan.executeAction 0 "40025" -- "Orbit Point of Interest" command )
Step 3: Assign the script to a hotkey or toolbar button for easy access.
This way, when you run the script, it will automatically switch between Orbit Selected and Orbit Point of Interest based on whether an object is selected.
2. Manual Shortcut Toggle
You can manually toggle between these two orbit modes with keyboard shortcuts:
Orbit Selected: You can use the Z key or the Zoom Extents Selected function, which zooms and centers on the selected object. If this behavior isn't precise enough for orbiting, you can assign a specific shortcut to Orbit Selected (use the Customize User Interface panel).
Orbit Point of Interest: Set a shortcut for this mode if it isn’t already available, and you can switch between the two manually depending on your needs.
3. Viewport Navigation Settings
In the Viewport Navigation Controls, under Customize > Preferences > Viewports, you can find some settings for controlling how Orbit behaves. While this won’t allow automatic switching between modes, adjusting these settings may help optimize your workflow, especially if you fine-tune how the viewport interacts with selected objects.
4. Using Focus or Frame Selected
In combination with Orbit, you can use Shift + Z or Ctrl + Shift + Z to undo viewport movements and help bring you back if you're accidentally moved far from your working area.