[workaround] How to get lightlinking working in RIB

   3836   2   1
User Avatar
Member
176 posts
Joined: May 2006
Offline
I've found that lightlinking doesn't work in prman.
After a bit of investigations, i found that after the following changes in RIBsettings.py it starts working again :
(Note this is a workaround, it may be quite slow for lots of lights, but it's working)

That piece of code:
# And, last but not least, output illumination statements
for light in obj.objectList(“objlist:unlightmask”, now):
handle = light.getData(“ri_handle0”)
if handle != None:
Ri.Illuminate(handle, 0)

has to be replaced with the following:
# And, last but not least, output illumination statements
unlightlist =
for light in obj.objectList(“objlist:light”, now):
found = False
for mlight in obj.objectList(“objlist:lightmask”, now):
if light.getName(True)==mlight.getName(True):
found = True
continue
if not found:
unlightlist.append(light)

for light in unlightlist:
handle = light.getData(“ri_handle”)
if handle != None:
Ri.Illuminate(handle, 0)


There is two things I've found:
1. obj.objectList(“objlist:unlightmask”, now) returns empty list all the times
2. probably mistyped “ri_handle0” instead of “ri_handle” in light.getData() call
User Avatar
Staff
2593 posts
Joined: July 2005
Offline
mlesin
There is two things I've found:
1. obj.objectList(“objlist:unlightmask”, now) returns empty list all the times
2. probably mistyped “ri_handle0” instead of “ri_handle” in light.getData() call

I'm fairly certain that this was fixed in H9.5 (though I can't check at the moment). However, it appears that the fix wasn't backported to H9.1 ops:
User Avatar
Member
58 posts
Joined:
Offline
version 11.0.755
still not fixed (
  • Quick Links