Changing attribute of a reference item

Hi all,

I was wondering if there is a way that I can change a particular attribute of a reference node, in my case - it is a camera, and the attribute I am trying to change is its Film Gate aka Film Back.

The moment when I tried to change it via coding, I got this error that states
[ul]
[li]setAttr: The attribute ‘camera:cameraShape.horizontalFilmAperture’ is locked or connected and cannot be modified.
[/li][li]setAttr: The attribute ‘camera:cameraShape.verticalFilmAperture’ is locked or connected and cannot be modified.
[/li][/ul]

Unless I did a manual change, by selecting the camera >> attribute editor and select a film back from the drop-down list, though it still displays the error, but the film gate was changed accordingly.

any ideas?

Is the attribute locked in the referenced file? Can you just unlock there?

It is not locked but it has connections to some other attributes… They are yellow in color.

The thing is, I have 2 filmbacks with the same aperture values etc except for its name. Eg. 35 mm default and 35 mm delivery

So, if it has incoming connections from another source, shouldn’t you be making modifications there?

yea it is… was attempting to change the film gate through hard coding but unfortunately it seems that there isn’t a way to code even for the normal cameras too…

Cause I had wanted to try attempt by modifying the referenced item if possible else through some other methods

Well, you should be able to break the connections as a reference edit to apply your values if you really want to slam them for testing etc.