I'm trying to write a script for maya to replace a set of objects that are already in a hierarchy with a new set of geometry that have the same names. The goal is to take several .obj files which have been edited outside maya and place them back into their original groups in the Maya scene and retain the original names and pivots, I've done some scripting but I'm a little lost on where to begin on this one as it requires way to store an array of object names, match those names against another set of objects that are the same and then parent them back under the group of the original.
Would you guys suggest solving the duplicate name issue with a namespace or by adding a suffix to the names of the newly imported pieces before running the script? I know how to do the very basics like write the for loop and cycle through each piece but I'm definitely fuzzy on how to store a list of two sets of names and then check them against each other in maya. I'm an artist with what I consider somewhat limited scripting experience so forgive me if this seems like a n00b question!