Forum: Poser - OFFICIAL


Subject: Help with Python scripting

whoopy2k opened this issue on Jan 08, 2008 · 6 posts


PhilC posted Tue, 08 January 2008 at 5:52 PM

Make similarly named actors invisible.

import poser
scene = poser.Scene()

if actors are named hair1,hair2,hair3 etc then text = "hair"

text = "hair"

the number of letters that need to match eg 4 for "hair"

letters = 4

1 = vizible 0 = invizible.

viz = 0

for actor in scene.Actors():
 if actor.Name()[:letters] == text:
  actor.SetOnOff(viz)

You can pretty this up by using Poser dialog text input but the above bear bones will work.