Querying WorkingUnitLinear

Here’s something simple I’m working around atm… Wondering what others are experiencing.

In 2019.2 (haven’t tried other versions yet) Maya doesn’t update its internal optionVar for the workingUnitLinear until after you open the Menu in the UI.

Is there another way to get the workingUnit from the file through Maya, (not by skimming an ascii via python)

pm.optionVar(q='workingUnitLinear') # (is the culprit command I'm using)


  • Open scene authored in cm
    ** (not always required, workingUnitLinearDefault is cm)
  • Open a scene authored in meters
  • run command once: It will return cm
    ** have to put command in a print to see
  • Open Window | Settings/Preferences | Settings
  • run command again: It will return m

Answered it myself through a bunch of “whatIs” commands.

Preferences are referenced and passed through currentUnit command.

1 Like