Actually, on second thought, before you spend anymore time thinking on this, I've decided to shift gears to tackle this tool - I was having a lot of problems using the artisan context stuff, so instead, I'm going to try a more "handmade" solution using the python api. Basically at this point, I'm storing the positions of the points on a mesh, then splitting one blendshape into a right and left version. So my new question is this (sorry to waste time on the earlier disaster!): Is there a way to mask verts using a texture so that I can move verts that have a texture value of white, while locking in place those that have a texture value of black? Basically this would hopefully allow me to use a grayscale mask texture to mask off certain sections of a mesh (such as right and left, but probably others as well).
I was checking out this post http://mayastation.typepad.com/maya-station/2011/03/how-to-sample-a-3d-texture.html and the sampleShadingNetwork function. However, I can't seem to find that function in the current api docs. Wonder if it got moved or renamed? On Tuesday, September 12, 2017 at 4:59:20 PM UTC-5, Aren Voorhees wrote: > > Hello all, > > I'm trying to import a blendshape attribute map from a texture file. I > expect I must be going about it the wrong way though as I can't seem to get > it to work no matter how I try it. Here is what I'm doing currently: > > import maya.cmds as cmds > > cmds.artAttrPaintVertexCtx('artAttrBlendShapeContext') > ctx = pm.currentCtx() > cmds.setToolTo(ctx) > cmds.artAttrPaintVertexCtx(ctx, ifl='P:\BsMaps\half_l.tif', > importfilemode='luminance') > > I'm getting this: > > // Error: > > # Traceback (most recent call last): > > # File "<maya console>", line 2, in <module> > > # RuntimeError: // > > FWIW, the page I'm trying to use for reference - > http://download.autodesk.com/us/maya/2011help/CommandsPython/artAttrPaintVertexCtx.html > > If anyone has done this before, or knows what I'm doing wrong, a hint > would be amazing! > > Thanks > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b041d046-df8f-405e-85a2-ac5420de82b0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
