I am trying to populate a mesh dataType attribute to hold a temporary mesh.
Initially I have set an attribute using:
cmds.addAttr( item.name, longName='tempMesh', dataType='mesh' )
Using the format here under the type -mesh I have come up with the following code:
cmds.setAttr(OS+'.tempMesh', type='mesh', [ ("v" [3 ( (0, 0, 0) (0, 1, 0) (0, 0, 1) )] ),\
("vn" [3 ( (1, 0, 0) (1, 0, 0) (1, 0, 0) )] ),\
("e" [3 ((0, 1, "hard") (1, 2, "hard") (2, 0, "hard") )] )] )
however I am getting an error: SyntaxError: non-keyword arg after keyword arg
I am guessing this is due to the formatting not being correct?
I am then piping this data into a blank poly surface (Mesh) and nothing seems to happen.
My end goal is to run the code via the pyExpression node from SOup.
SOup code:
import maya.cmds as cmds
#cmds.addAttr( OS, longName='tempMesh', dataType='mesh' )
cmds.setAttr(OS+'.tempMesh', type='mesh', [ ("v" [3 ( (0, 0, 0) (0, 1, 0) (0, 0, 1) )] ),\
("vn" [3 ( (1, 0, 0) (1, 0, 0) (1, 0, 0) )] ),\
("e" [3 ((0, 1, "hard") (1, 2, "hard") (2, 0, "hard") )] )] )
I have run this via mel and it returned no errors but also no mesh:
setAttr "itemName1.tempMesh" -type mesh "v" 3 0 0 0 0 1 0 0 0 1 "vn" 3 1 0 0 1 0 0 1 0 0 "e" 3 0 1 "hard" 1 2 "hard" 2 0 "hard";