Returning nullptr from Ufe::CameraHandler::camera crashes Maya
Describe the bug According to the UFE 4.2 documentation for Ufe::CameraHandler::camera
Returns Camera interface of given SceneItem. Returns a null pointer if no Camera interface can be created for the item.
However it appears that returning nullptr from a CameraHandler will crash Maya, starting with 2024/UFE4.
We were able to work around this issue by instead putting a conditional in the find functions for cameras we did not want to appear in the Panels > Perspective menu. This seemed to do the trick and avoid the crash. So, we are not blocked on this issue, but I wanted to file it and suggest that either returning nullptr from camera should be handled gracefully in UFE, or that the documentation (and the current code) should be updated
I've brought discussion up with devs. We'll get an official answer soon.
Team is looking into this but it does appear to be a defect on our side.