2.7. Touch Bar support

Macintosh computers featuring a Touch Bar may customize access to certain functionality via the control strip starting with MeVisLab 3.2. You can add new buttons for particular features that suit your workflow or take others away. The customization panel can be displayed via the View menu in the menu bar (Figure 2.7, “Display the customization panel for the Touch Bar control strip”).

Figure 2.7. Display the customization panel for the Touch Bar control strip

Display the customization panel for the Touch Bar control strip

By default, only a limited set of functions are available for customization (Figure 2.8, “Add buttons to the Touch Bar control strip from the customization panel”). However, you may extend this set via MeVisLab Definition Language (MDL) scripts, e.g. User Scripts. Please refer to the MenuItem and TouchBarItem control descriptions in the MDL Reference for further information.

Figure 2.8. Add buttons to the Touch Bar control strip from the customization panel

Add buttons to the Touch Bar control strip from the customization panel

In the following, a snippet from the definition file of the Replace Inventor Group User Script is shown:

UserIDEActions {
  Action "Replace Inventor Group" {
    name       = replaceInventorGroup
    userScript = $(LOCAL)/UserScripts/ReplaceInventorGroup.py
    statusTip  = "Replaces the selected Inventor node while keeping all connections."
    TouchBarItem {
      imageName = TouchBarReplaceModuleTemplate
    }
  }
}

UserIDEMenus {
  SubMenu "Example Scripts" {
    ActionReference = replaceInventorGroup
  }
}

The available control strip items are also displayed in the Shortcuts panel of the MeVisLab Preferences dialog (Figure 2.9, “Display available Touch Bar control strip items”) in addition to the Touch Bar customization panel. Customization, however, is only possible in the customization panel itself.

Figure 2.9. Display available Touch Bar control strip items

Display available Touch Bar control strip items