import Blender
from Blender import Object,Draw
try:
O=Object.GetSelected()
if len(O)==2:
name = "OK?%%t| COPY Ipo+Mat from %s to %s
"%(O[1].getName(),O[0].getName())
result = Draw.PupMenu(name)
if result:
O[0].setIpo(O[1].getIpo())
me=O[0].getData()
me.addMaterial(O[1].getData().materials[0])
me.update()
except:
name = "l'objet %s n'a pas d'ipo ou de material "%O[1].getName()
Draw.PupMenu(name) |