Any way to ignore locked attributes when applying render setup?

craig_kane
Participant

Any way to ignore locked attributes when applying render setup?

craig_kane
Participant
Participant

Hi

 

I am using the apply_render_setup module to assign render settings information in my scene from an external json file. However, there are some attributes I do not want to change - for example, I have created some layer overrides that also get affected when I apply the settings that I wish to remain unchanged.

 

Ideally I would like to either be able to check what attributes have overrides and ignore them, or alternatively simply be able to lock those attributes to ensure they are unaffected. When I try to lock them, the apply module give an unexpected internal failure error, presumably because it cannot access the attribute. 

 

Would anyone have any recommendations as to how I might achieve this?

 

Thanks

 

Craig

0 Likes
Reply
Accepted solutions (1)
273 Views
2 Replies
Replies (2)

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

Both ways will require you to introduce an IF statement inside the loop you are using to change your attributes.

 

Finding out if it has overrides would require you to know their default value, then use a getAttr command to get the current value and use the if statement to overwrite only if the two values are the same.

 

Locking the values is probably an easier solution, since it only requires you to use the getAttr command to query the attributes locked status, which you can do using the "l" flag. Then you use and if statement to only overwrite if "l" querried ad False.

 

I hope this helps!

0 Likes

craig_kane
Participant
Participant

Thanks for the help Kahylan!