# Notify Operator when scene property update

I want to call a method of an operator when a scene property has changed.

I know there is an update callback:

bpy.types.Scene.h_dock = bpy.props.EnumProperty(
items = h_dock, name="Dock",
description="Dock to left or right side",
default="0", update=???)


But how to add a method of an operator here or any other class/instance in which I have to update member variables?

Thx

here is how i did it in my addon, i registerd my property's in directly in the register def and made a def at the top of my script that gets called when the value of the property changes

def Update_BoolProp(self, context):
pass
bpy.types.Object.BoolProp = bpy.props.BoolProperty(
name="BoolProp",
description="description",
default = True,
update = Update_BoolProp
)


i think that you can define the update function where ever you like as long as you can access where you define your property's.

• Cheers. Unfortunately now you have turned it into a recursion loop, by updating the property in its own update method. A good way to toggle bools is flag = not flag – batFINGER Mar 15 '19 at 10:22