importing a map in Paint BlendShape WeightsTools using python


How can import an attribute map using code???
skipping any ui dialog, just showing the absolute file path to the map in my computer.


The “import” button fetches the fileDialog pop up. So you should try out with textField stuff or something and get the path there in.


I’m having this exact issue. I was using the importDialogue to manually input the file but since I’m having to do this on hundreds of meshes this is less than ideal.

This is a snippet of what I’ve come up with that I think is very close…

ctx = cmds.currentCtx()
print cmds.currentCtx()
cmds.artAttrPaintVertexCtx(ctx, e=True, ifl=“C:/Users/Brandon/Desktop/TEST/NeckFixer_WeightsMap.iff”, ifm=“luminance”)

ctx is returned as artAttrBlendShapeContext

but gives this error:

line 33: artAttrPaintVertexCtx: Object ‘artAttrBlendShapeContext’ not found.

Does anyone know what object should be passed to cmds.artAttrPaintVertexCtx or why this doesn’t work?
(I’ve already checked that the path is correct using os.path.isfile)

Your help is greatly appreciated.