How to check if Blender object property/attribute is read-only

To check is an attribute/property of any Blender object (mesh, node, modifier, etc.) read-only:

  1. With the is_property_readonly function, execute the following command:

<object> .is_property_readonly (‘<property name>’)

  1. Through the rna structure, execute the following command:

<object> .bl_rna.properties [‘<property name>’]. is_readonly

For example, for the “is_editmode” mesh property (is the mesh in edit mode or not):

5 1 vote
Article Rating
Subscribe
Notify of
guest

3 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Rombout Versluijs
Rombout
1 day ago

wish i could read custom props as well
i tried on a BoolProp assigned to scen. But it cant find it

Rombout Versluijs
Rombout
2 hours ago
Reply to  Nikita

You mean they are i think
I tried so many variations, also get/set or update, Keep getting read-only error or it even transformed the boolprop to an integerprop?! super weird.

For that single prop i now made a propertygroup and a pointerproperty
I guess i move everything inside just to make it all more clean