Code: Select all
box1=App.ActiveDocument.Box
box2=App.ActiveDocument.Box001 # a copy of Box
p1=box.Placement
p2=box.Placement
p3=box.Placement
def animate(box1, box2, p1, p2, p3, steps=100):
for i in range(steps):
t=(i+1)/steps
p=p1.sclerp(p2, t)
box1.Placement=p
p=p1.slerp(p2, t)
box2.Placement=p
Gui.updateGui()
for i in range(steps):
t=(i+1)/steps
p=p2.sclerp(p3, t)
box1.Placement=p
p=p2.slerp(p3, t)
box2.Placement=p
Gui.updateGui()
animate(box1, box2, p1, p2, p3, 1000)