FIX Selecting between Paint and Select modes
FIX
For those having an issue with selecting between Paint and Select modes, here’s the fix for that.
Error Description: ‘ART_artAttrSkinPaint could not be found’ when switching between Paint and Select modes in ART.
Issues Caused: Prevents “Select” and “Paint” modes from being displayed.
File Affected (Windows): C:\Program Files\Unreal Engine\4.1\Engine\Extras\Maya_AnimationRiggingTools\MayaTools\General\Scripts*ART_skeletonBuilder_UI.py*
File Version: Latest from 's DropBox at the time of this posting.
Maya Version(s) Affected: Autodesk Maya 2013, Autodesk Maya 2015
Solution
Replace Line 10221 - 10224:
def paintWeightsPaintMode(self, *args):
cmds.artAttrSkinPaintCtx('ART_artAttrSkinPaint', edit = True, spm = 1)
cmds.selectMode( object=True )
With:
def paintWeightsPaintMode(self, *args):
#start fix 1
#if our Paint Mode tool does not exist, create it. Else, switch to it
if cmds.artAttrSkinPaintCtx("ART_artAttrSkinPaint", exists = True) == False:
self.paintWeightsPaintMode = cmds.artAttrSkinPaintCtx("ART_artAttrSkinPaint", ch = True )
#end fix 1
cmds.artAttrSkinPaintCtx('ART_artAttrSkinPaint', edit = True, spm = 1)
cmds.selectMode( object=True )
Replace Line 10241-10243:
def paintWeightsSelectMode(self, *args):
cmds.artAttrSkinPaintCtx('ART_artAttrSkinPaint', edit = True, spm = 0)
cmds.selectMode( component=True )
With:
def paintWeightsSelectMode(self, *args):
#start fix 2
#if our Select Mode tool does not exist, create it. Else, switch to it
if cmds.artAttrSkinPaintCtx("ART_artAttrSkinPaint", exists = True) == False:
self.paintWeightsSelectMode = cmds.artAttrSkinPaintCtx("ART_artAttrSkinPaint", ch = True )
#end fix 2
cmds.artAttrSkinPaintCtx('ART_artAttrSkinPaint', edit = True, spm = 0)
cmds.selectMode( component=True )
I hope this helps…even though Paint mode is selected by default and the Paint tools are available when menu loads, I added the script to prevent the error and properly create/display the tools if they don’t already exist when switching between them.
Man, what a learning curve. I just started using Maya, MEL and ART last night - I’m a seasoned programmer, but wanted to learn rigging and animation to get an unrigged/skinned character into UE4, so had to learn all this overnight and get this portion fixed to get access to the tools I wanted to check out
Thanks for all your hard work, man…I’m really impressed with all you’re doing and it’s greatly appreciated. If Epic ever needs an additional programmer…hint hint
EDIT
Switching between menus twice in a row causes a new error to spike up if you implement fixes I provided above…I’ll be looking into it a bit later if one of you don’t get to it first.
Error: TypeError: file C:/Program Files/Unreal Engine/4.1/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts\ART_skeletonBuilder_UI.py line 10273: ‘unicode’ object is not callable
The error is caught when self.paintWeightsSelectMode() is called in this section of code:
if value == "Paint":
self.paintWeightsPaintMode()
if value == "Select":
self.paintWeightsSelectMode()