uiConfigurationScriptNode - Getting last active camera

Hello,

I am trying to get the last active camera from the Maya ascii file in batch/standalone mode. Right now, I believe this info is saved in the uiConfigurationScriptNode, but the way that the Maya ascii saves this data is very dirty. It’s generally a block of MEL commands that are not at all consistent with newlines/tabs. I don’t see any easy way to reorder this info and grab the info.

Does anyone know how I can possibly achieve this? Maybe I am missing something.

Processing: Screen Shot 2021-12-14 at 10.35.34 AM.png…