Val
Val

Reputation: 11

Add object to an existing lattice deformer Maya

I’m currently stuck with as silly problem.

I’m writing a re-build script for one of the characters and I need to write a command in python Maya to add a model to already existing lattice deformer. Is there a way to do this? I know that if I were to do it manually, I could add new object via deformer set, are there any other ways or simpler even ways.

Thank you in advance for any advice

Upvotes: 0

Views: 2865

Answers (1)

DrWeeny
DrWeeny

Reputation: 2512

here you go :

mySel = ['objectName']
deformer = 'latticeName'
myLatticeSet = cmds.listConnections( deformer, type="objectSet" )
cmds.sets( mySel, add= myLatticeSet[0] )

Upvotes: 1

Related Questions