Forum: Poser 12


Subject: dson after uninstal giving errors

firecircle opened this issue on Dec 10, 2020 ยท 26 posts


Thalek posted Tue, 03 May 2022 at 4:56 AM

I do believe that you've hit upon  my problem:  Notepad2 apparently defaults to Tabs as Spaces.  I'll check that out in a little while.

And at least part of the problem has been solved with the print statements:  Nope, they weren't in brackets or parentheses.  Of course, now, it doesn't like how I handled printing variables.

You offer to assist with the code is most gracious, and I humbly and desperately accept:  I learned just barely enough Python to write the tools (Shadow Cam lister, and Shadow Cam renamer), and then promptly forgot everything I learned.

# script to set all Shadow Cam names to the
# same name as the light it works with.

import poser
scene = poser.Scene()

def main():
  for actor in scene.Actors() :
      if actor.IsLight() :
          kid = actor.Children()
          for cam in kid:
            if cam.IsCamera():
              vu = cam.Name()
              cam.SetName(actor.Name())
              print ('%s renamed to %s.') % (vu, actor.Name())
              break
          
main()
print ('\n Renaming completed.')