Get all lights used by a ROP - abs paths, bundles, instanced

   1317   1   1
User Avatar
Member
14 posts
Joined: Oct. 2015
Offline
Hi Guys,

Is there a way to get a list of all lights being used by a rop?

If a user has specified absolute paths to the lights, then I can get them through evalAsNodes()
but if they are in bundles, I will need to expand these bundles.

Above that, at least for renderman, instanced lights are specified in Force Objects parm and not in the lights section.
Do I need to scrape both Objects & Lights parms on a ROP?

I can hack my way to get the data I want but thought there must be a way a ROP collect and expands this data?

Thanks,
Amit
User Avatar
Member
14 posts
Joined: Oct. 2015
Offline
Hey guys,

So I wasn't able to find exactly what I was looking for but made it work using node.evalAsNodes().
I had to process the instanced lights by checking where the instance source is specified at /obj parm level or at geometry level.

Cheers,
ak
  • Quick Links