Forum: Poser Python Scripting


Subject: set a figure not visible to the camera

maur_2005 opened this issue on Mar 16, 2022 ยท 5 posts


maur_2005 posted Wed, 16 March 2022 at 8:26 PM

Hi folks, is it possible to set a figure not visible to the camera from a python script?


structure posted Thu, 17 March 2022 at 12:09 AM Forum Coordinator

the only way I know of is to set all of the figure's actors invisible to the camera : 

the following script works fine - you may want to specify which figure though. 

import poser
scene = poser.Scene()
figure = scene.CurrentFigure()
for actor in figure.Actors():
    actor.SetVisibleInCamera(0)
scene.DrawAll()

of course you could always just use
figure.SetVisible(0)
Which would hide the figure in both the render and preview.


Locked Out


maur_2005 posted Thu, 17 March 2022 at 12:57 PM

Thanks Structure, that was useful


EVargas posted Sun, 20 March 2022 at 9:49 PM

Is there a way to set a keyframe for visibility via python? In the GUI we can click the "key" icon on the parameters tab to set a key for it.

I mean something like this (just wondering):

actor.SetVisibleInCamera(0).AddKeyFrame()


EVargas.Art


structure posted Mon, 21 March 2022 at 8:22 AM Forum Coordinator

There likely is a way, I am not sure at this time but I will look into it when I get a chance.


**Edit:

I have thus far been unable to find out how to do this. 

Locked Out