Tested :
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.')
Output:
Shadow Cam Lite 1 renamed to Light 1.
Shadow Cam Lite 2 renamed to Light 2.
Shadow Cam Lite 3 renamed to Light 3.
Shadow Cam Lite 4 renamed to Light 4.
Shadow Cam Lite 5 renamed to Light 5.
Renaming completed.
under Py2
under py3 - I get a typeerror ( nonetype ) but no syntax errors.
Locked Out