Hi, I had been having troubles using, lightlinks in Maya 2013, Linux, with 
Arnold Renderer.


I am trying to make a export lightlinks tool, I found some examples online, but 
the problem starts when I have too many objects to link too, (over 4000), this 
is a synthesis of the script I'm using:

##For export I simple make a Python Dictionary, with the links of each light:

lightRig = {}
lightSelection = cmds.ls( selection=True )
for light in lightSelection:
        lightRig[light] = cmds.lightlink(query=True, light=light)

##Then for import (asides from importing the lights, without links), I just 
step over that dictionary and link each python list of objects for each light:

for light in lightRig:
        cmds.lightlink(make=1, light=light, object=lightRig[light])


The scripts works fine with not so many objects but when the python list for 
each light, gets  bigger more than 4000 objects in it, Maya brings an error 
(and it lasts very long time on trying it):

# Error: No objects were specified in invocation of lightlink and there is 
nothing currently selected. #

Or sometimes it just not say anything, but dont work.

With so many objects I couldn't even copy and paste the list string out from 
the script editor, to another IDE, or even inside the same script editor takes 
forever (just ctrl+c the print line of one list of one light).

So I have some question regarding Maya 2013 and Lightlink.

1- About the Lightlink bug I had read on older versions of Maya, does it still 
exists in Maya 2013??

2- Whats the difference in linking with cmds.lightlink or cmds.relationship, 
How can I query on the second one?

3- How people is resolving this? I try to link sets instead of objects but I 
couldn't in Arnold.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to