- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello friends, I am trying to do a simple script for listing scene lights that have an include or exclude, and also print a list of the included/excluded items.
I have this for a start (filtering out the light targets):
for i in lights where (classof i != Targetobject) do if (i.includelist != undefined) then ( print (i.name + " Includes these items:") print i.includelist )
...and it gives me this result:
"VRayLight001 Includes these items:"
$Box:Box001 @ [-35.890526,34.681732,0.000000]
$Box:Box002 @ [5.210434,31.309677,0.000000]
$Box:Box003 @ [5.210434,-8.237305,0.000000]
OK
I want to format the items in the includelist array so that only the names will be printed. If I try this:
for i in lights where (classof i != Targetobject) do if (i.includelist != undefined) then ( print (i.name + " Includes these items:") for item in (i.includelist) to (i.includelist.count) do ( print item.name ) )
....it throws an error, saying it's unable to convert the items in the array to integer. The problem seems to be with me not knowing how to format the result as object names.
I could use a gentle push in the right direction. Any help or advice is most welcome. Thanks for your time.
Solved! Go to Solution.
