Forum: Poser Python Scripting


Subject: Is this the best way to select a prop with an unknown name?

HartyBart opened this issue on Aug 10, 2021 ยท 9 posts


HartyBart posted Tue, 10 August 2021 at 11:11 PM

One prop has been loaded into a Poser scene, but the scene has "No Actor" selected. This can happen when the user loads a prop alongside a figure, then deletes the figure.

Running this script will then usefully select the one prop present in such a scene (whatever the prop's name might be).

import poser
scene = poser.Scene()

actor = scene.Actors()
for prop in scene.Actors():
    if prop.IsProp():
        scene.SelectActor(prop)

Is this the best way to do the script?



Learn the Secrets of Poser 11 and Line-art Filters.