Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

mayaDpiSetting [-mode uint] [-realScaleValue] [-scaleValue float] [-systemDpi]

mayaDpiSetting is NOT undoable, queryable, and NOT editable.

Provide Maya interface scaling based on system DPI or custom scale setting or no scaling. Please note that the change will only take effect after relaunching Maya.

The mayaDpiSetting command is not available on macOS. System scaling should be used to change Maya UI scaling.

Return value

intScale mode or system DPI value, as queried
floatDefined scale or real scale, as queried

In query mode, return type is based on queried flag.

Keywords

mayaDpiSetting, dpi

Flags

mode, realScaleValue, scaleValue, systemDpi
Long name (short name) Argument types Properties
-mode(-m) uint createquery
Specifies the interface scaling mode:
  • 0 - System Dpi Based Scaling
  • 1 - Custom Scaling (Must provide the custom scale value with flag "-scaleValue")
  • 2 - No Scaling
-realScaleValue(-rsv) query
This is a query mode only flag which returns the real scale value depending on current scaling mode and defined scale value:
  • mode 0 - Return the current real scale value which is the ratio of current system dpi to default system dpi
  • mode 1 - Return the current real scale value which is the product of the defined scale value and the ratio of current system dpi to default system dpi
  • mode 2 - Always return 1.0 which indicates real scale is 100% when the scaling mode is no scaling.
-scaleValue(-sv) float createquery
Specifies the custom scale of the interface if scaling mode is 1. The allowed values are [1.0, 1.25, 1.5, 2.0]. In query mode, return the scale value depend on current scaling mode:
  • mode 0 - Always return 1.0 which indicates 100% scaling
  • mode 1 - Return the custom scale value used
  • mode 2 - Always return 1.0 which indicates no custom scaling
-systemDpi(-sd) query
This is a query mode only flag which returns the current system dpi value.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples


// Set the scale mode to system dpi based scaling.
mayaDpiSetting -mode 0;

// Set the interface scaling to 150% custom scaling.
mayaDpiSetting -mode 1 -scaleValue 1.5;

// Disable the interface scaling.
mayaDpiSetting -mode 2;

// Query the current scaling mode.
mayaDpiSetting -q -mode;

// Query the current defined scale value.
mayaDpiSetting -q -scaleValue;

// Query the system dpi value.
mayaDpiSetting -q -systemDpi;

// Query the current real scale value.
mayaDpiSetting -q -realScaleValue;