Home Website Youtube GitHub

Drive letters on Windows must be Upper case

Hi. I think I stumbled across a bug on windows which causes the custom steps to fail when trying to run them.

The thing is that using lower case drive letters on windows when setting the MGEAR_SHIFTER_CUSTOMSTEP_PATH variable breaks the paths. I attach a couple of images to show the error. First one uses “e:/sample_project/build” and you can see in the tooltip that the path is malformed and the entry in the Pre custom steps list is not relative to the variable MGEAR_SHIFTER_CUSTOMSTEP_PATH.

If I use “E:/sample_project/build” with the drive letter in upper case the path is correctly formed.

.

But It might be some config error on my end though this tests are run with new prefs setting the MAYA_APP_DIR to a new location by a windows batch file. This is replicating Miquel’s batch file from his Facial Data Centric Rigging series.

start_Maya_2018.cmd contents below.

@ECHO OFF

set PYTHONDONTWRITEBYTECODE=1
set MAYA_APP_DIR=E:\sample_project\Maya
set MAYA_MODULE_PATH=c:\Users\cw\Documents\maya\modules\mGear
set MGEAR_SHIFTER_CUSTOMSTEP_PATH=E:\sample_project\build
@REM set MGEAR_SHIFTER_COMPONENT_PATH=
set MAYA_NO_CONSOLE_WINDOW=1
set MAYA_DISABLE_CLIC_IPM=1
set MAYA_DISABLE_CIP=1
set MAYA_DISABLE_CER=1
set MAYA_NO_WARNING_FOR_MISSING_DEFAULT_RENDERER=1
start “” “C:\Program Files\Autodesk\Maya2018\bin\maya.exe”

end of start_Maya_2018.cmd contents.

Cheers.

1 Like

thanks for the feedback and sharing this :slight_smile:

So, I made a fix for this modifiying:

scripts\mgear\shifter\guide.py

Basically forces the first letter of the value from MGEAR_SHIFTER_CUSTOMSTEP_PATH enviroment value upper case. I think the paths in other OS always start with a forward slash so I think this won’t cause any issue. In case this somewhat helps I can upload the code but it is an easy fix though I don’t know if it follows the style of the project.

So the culprit of the error was that I always use Total Commander for my file exploring needs and it has lower case drive letters by default while Windows explorer always shows upper case drive letters that’s why this error never show up I guess.

I fixed Total Commander drive letters as well, in case you want to change the drive letter to upper case in Total Commander add this to the [Configuration] section of your wincmd.ini file:

[Configuration]
DrivesExportUpcase=1
DrivesShowUpcase=1