Hi I am trying to use the set method for a property. Thats how I try to use it:

def set_coa_sprite_frame(self,value):
    self.coa_sprite_frame = value

bpy.types.Object.coa_sprite_frame = IntProperty(
        default=0, min=0, max=10,

But I get a maximum recursion depth error. Whats the problem? Do I use it incorrectly?


1 Answer 1


The property set callback is intended to be used when you need to store the value in some alternate location (a set callback could write to multiple other properties for example - store the data on disk... a JSON, XML data... whatever you like).

Using both the get/set callback, you can expose access to settings stored outside of Blender.

Assigning the value within the set callback, causes infinite recursion.

So, either:

  • use the set callback to write to a different location.
  • use the update callback instead, to perform some change after the value is set.

Or, if you really want, you can write to the underlying property store directly, however this relies on an implementation detail on how properties work. While we don't intend to change this part of the API (which would break scripts)... its better to avoid this.


def set_coa_sprite_frame(self, value):
    self["coa_sprite_frame"] = value

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .