I’m making a Mari / Maya bridge that is working nicely but I need to start thinking about stable ways of tracking objects to receive updates that will work across work sessions (ie: I can’t use global variables or easy stuff like object names, which is how I have it set up now). So I have external text files and Python is reading values from there, which is half the battle but now I need to think about the most effective way to add locked attribute tags to objects to track them within Maya. I am wary of doing this wrong since I don’t like the idea of putting things in people’s scenes. Does someone have a good tutorial or tips on how to best handle this stuff? It’s safe to assume that people aren’t going to go completely crazy changing grouping, topology and things since, at that point, they are basically making it too different from what they sent to Mari from Maya to paint, so I can keep this pretty simple, I think
So basically I think I’m looking to:
- add a numerical/time-based index to an object.
- that index is written to our external index file
- mesh is sent to Mari at the same time
- painting done
- Mari script sends baked paint textures back to Maya, consulting our index and project directory (I’ll have to find a way to embed similar index data in Mari scenes)
- Maya applies or updates textures on our indexed object.
I’m good for all of that except how to add attributes and select objects with those attributes.