Reputation: 11
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
Reputation: 2512
here you go :
mySel = ['objectName']
deformer = 'latticeName'
myLatticeSet = cmds.listConnections( deformer, type="objectSet" )
cmds.sets( mySel, add= myLatticeSet[0] )
Upvotes: 1