Forum: Poser Python Scripting


Subject: Any idea how enable Animation Toggle option via script ?

andygraph opened this issue on Feb 10, 2014 · 55 posts


structure posted Sun, 30 March 2014 at 8:20 AM Forum Coordinator

after looking at your code it seems you want to make an actor invisible in certain frames and visible in others so there are 3 ways to accomplish this :

as markschum said you can use

setvisibleinrender

or you can use

SetVisible

SetVisibleInCamera

import poser
scn=poser.Scene()
def ActVisible(act,toggle,frame):
    scene.SetFrame(frame)
    act.SetVisible(act,toggle,frame)

act = scn.CurrentActor()
act.SetName(myfile[:-4])
ActVisible(act,1,0)
frame = frame + 1
scn.SetFrame(frame)
ActVisible(act,1,frame)
if frame > 2:
    scn.SetFrame(frame - 2)
    ActVisible(act,0,frame)
scn.SetFrame(frame)

both setvisibleinrender and setvisibleincamera will not appear to do anything until you actually render

Locked Out