I have been banging my head against the wall a bit on this one…
The Problem
So I have bunch of Cameras that I import into maya I then compare their transforms to see if their world space transforms are a match. I then create lists of all the matches with in a Master list The output for the code looking for the matches is something like this…
A list containing lists… for example
MasterItemContainer = []
Code Runs which imports the Cameras runs comparisons between all the Cameras and loads up
MasterItemContainer now contains Lists of matches so…
for items in MasterItemContainer:
print items
output looks like this
MasterItemContainer[0] Looks like [camera_010,Camera_040,Camera,90]
MasterItemContainer[1] Looks like [camera_020,camera_080,camera_110]
etc…
So I suppose I am creating a mutli dimensional array or a list containing lists to store all the matches.
The issue I am having is that because I have to compare all the cameras to each other and store the out comes I get duplicate data for instance say I have 40 cameras to check and camera 010 and camera 080 share the same info now I have two lists with duplicate data
MasterItemContainer[0][Camera_010, Camera_030,Camera_010]
MasterItemContainer[6][Camera_080, Camera_030, Camera_010]
Bad out come if your running a check on 80 or so cameras… I feel like the real issue is the logic that I am using to load up the lists… I have to check each camera against the other cameras but once I run a check on one camera it should get removed the next time I run through the loop, but I am not sure how to do it. Any thoughts would be great