System

April 13, 2026 · View on GitHub

Source: src/mpfb/ui/system/dirresources/

Parent panel: MPFB_PT_System_Panel ("System and resources")

Overview

The "Directories" panel provides four buttons that each open an important MPFB file-system directory in the operating system's file manager. This is useful when locating configuration files, installed asset libraries, bundled data files, or log output without having to navigate the file system manually.

Each button is rendered by the _path() helper method, which instantiates the mpfb.dir_resource operator and sets its path property before the button is drawn. The paths are resolved at draw time by calling LocationService methods, so they always reflect the current installation layout. Clicking a button invokes the operator, which delegates to SystemService.open_file_browser().

No character or scene object needs to be present for the panel to be usable.

Panel

MPFB_PT_Dir_Resources_Panel ("Directories")

AttributeValue
bl_label"Directories"
bl_categoryDEVELOPERCATEGORY
bl_parent_idMPFB_PT_System_Panel
bl_options{'DEFAULT_CLOSED'}
Base classAbstract_Panel
Pollnone (always visible when the parent panel is present)

The panel draws four buttons in order:

Button labelPath sourceDescription
"User files"LocationService.get_user_home()The user's MPFB home directory; stores per-user configuration and custom assets
"Library files"LocationService.get_user_data()The user data directory; stores installed asset packs and downloaded content
"System data"LocationService.get_mpfb_data()The addon's bundled data directory; contains the base mesh, default rigs, and other static assets
"Log files"LocationService.get_user_home("logs")The logs/ subdirectory inside the user home directory; contains MPFB log output files

Operators

MPFB_OT_Dir_Resource_Operator

AttributeValue
bl_idnamempfb.dir_resource
bl_label"Open"
bl_options{'REGISTER'}
Base classMpfbOperator
Pollnone

Opens a file-system directory in the OS file manager. Steps:

  1. Reads the path property (set by the panel when the button is drawn).
  2. Calls SystemService.open_file_browser(self.path).
  3. Returns {'FINISHED'}.

Properties

Operator properties

PropertyTypeDefaultDescription
pathStringProperty""The file-system path to open. Set by the panel's _path() helper before the button is drawn; not directly editable by the user.

There are no scene properties or object properties for this sub-section.