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 9:46 AM Forum Coordinator

lol - ok - i missed an indent :)

for myfile in myfiles:
    if myfile.endswith('.obj'):
        cfile = os.path.join(sdir, myfile)
        try:
            ImportObj(cfile)
        
            act = scn.CurrentActor()
            act.SetName(myfile[:-4])
            ActVisible(act,1,0)

            frame += 1
            scn.SetFrame(frame)
            ActVisible(act,1,frame)
            if frame > 2:
                scn.SetFrame(frame - 2)
                ActVisible(act,0,frame)
            scn.SetFrame(frame)
        except:
            print 'error on ', myfile
print 'done'

Locked Out