I’m currently writing a tool for Maya 2022 which is intended to bake ambient occlusion data into vertices. So far, I have a managed to automate the process of creating a new packed UV Set, generating ambient occlusion data as a .EXR file, and assigning an empty vertex color set.
However, to complete the pipeline, I need to bake the .EXR file into the aforementioned vertex color set, using attribute maps. I’ve managed this manually (via Paint Vertex Color Tool > Attribute Maps > Import), but despite a thorough search of Maya’s Python API documentation and the internet, cannot figure out how to do this in Python. I’m aware of cmds.artAttrPaintVertexCtx, but unfortunately can’t quite work out how to relate it directly to what I need to do.
If anyone has any insight into what I should be doing, I’d really appreciate it!
(For reference, when my current code ends, I have a variable for the generated EXR file path, the current selection consists only of the main object, and the current context is “moveSuperContext.”)