I’m just starting to get my feet wet writing Python for Maya. My current project is a script to prepare layout scenes for our modelers and animators. They’ve requested that I switch the Display attribute to “looking through camera” instead of “in all views”. I can set most parameters easily enough, but that one has me stymied. When I tried to set it using the same method as everything else I’ve done, the console reported:
Error: RuntimeError: file line 1: setAttr: The attribute ‘RenderCamPlane.lookThroughCamera’ is locked or connected and cannot be modified.
So I turned on Echo All Commands and toggled it through the UI. The console gave me 93 lines of MEL, not counting comments. While I can probably go through that line by line and try to parse out what it’s doing at each step, I suspect getting some guidance would be more efficient and instructive!
For the sake of letting you know where my skills are at: I’ve been writing Lua for Blackmagic Fusion for several years, but although I’ve written a few minor scripts for PFTrack, Maya and Houdini, I’m still very much a beginner in Python.