Created
April 12, 2015 10:29
-
-
Save petfactory/4b2970fcf56371c30e06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lattice = pm.lattice( dv=(2, 2, 2), oc=True) | |
#pm.select('{0}.pt[4:7]'.format(lattice[1]),r=True) | |
def move_lattice(lattice, pos_id_dict): | |
for id, pos in pos_id_dict.iteritems(): | |
x, y, z = id | |
pm.select('{0}.pt[{1}][{2}][{3}]'.format(lattice, x, y, z),r=True) | |
pm.move(pos, a=True) | |
#print(x, y, x, pos) | |
pos_id_dict = { | |
(0,0,0):(-.2,-.3,-.5), | |
(0,0,1):(-.2,-.3,.5) | |
} | |
move_lattice(lattice[1], pos_id_dict) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment