Hello everyone! New to this group and glad to have found it :)

I'm currently developing a rig tool and have created an option to open the 
Paint Weight Tool more simply, depending on the deformer selected.

I've managed to make it work for all deformers except the Paint BlendShape 
Weight Tool.

My aim is to open this context, open the tool window AND directly select 
the correct targetShape in the menue provided. But even when I make sure 
that the “artAttrBlendShapeContext” ctx is loaded, Maya tells me that it 
“cannot find procedure ‘artBlendShapeSelectTarget’ ”. 
And this only happens when Maya is opened or I haven't used any tool yet, 
otherwise it works fine.
Here's my code:

#import correct context if not loaded
if not cmds.artAttrCtx(“artAttrBlendShapeContext”, q=True, exists=True):
    cmds.artAttrCtx(“artAttrBlendShapeContext”, i1=“paintBlendshape.png”, 
whichTool=“blendShapeWeights”)
cmds.setToolTo(“artAttrBlendShapeContext”)

cmds.select(mesh)
cmds.ArtPaintBlendShapeWeightsTool()
cmds.toolPropertyWindow()

#select the right target
mel.eval('artBlendShapeSelectTarget artAttrCtx “{}”;'.format(targetShape ) 
  

Thanks for reading!
cya

Yann :)

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/python_inside_maya/d0f757a7-69cd-46b9-865c-656965a5515cn%40googlegroups.com.

Reply via email to