How to use - Events

Property value change event

You can listen the value change event from any property in the vcPropertyContainer

When the OnChanged event happens, an event-handler function is called.

Use "+=" operator when assigning the event-handler function.

import vcCore as vc

def my_prop_changed(prop):    
  print(f"Property: {prop.Name}, new value: {prop.Value}")

comp = vc.getComponent()
prop_container = comp.Properties
my_prop = prop_container["MyStringProperty"]
my_prop.OnChanged += my_prop_changed