add support for all strip level modes to observers

is_updated now returns a bool (if that channel is updated (dirty))

observer example updated.

minor ver bump
This commit is contained in:
onyx-and-iris
2022-07-06 13:14:23 +01:00
parent 1b75d53cfb
commit 9af2fc98aa
5 changed files with 62 additions and 57 deletions

View File

@@ -6,7 +6,20 @@ class Observer:
self.vm = vm
def on_update(self, subject):
print(subject)
if subject == "pdirty":
print("pdirty!")
if subject == "mdirty":
print("mdirty!")
if subject == "ldirty":
info = (
"levels changed:",
f"[strip 0 {self.vm.strip[0].levels.is_updated}]",
f"[strip 1 {self.vm.strip[1].levels.is_updated}]",
f"[strip 2 {self.vm.strip[2].levels.is_updated}]",
f"[strip 3 {self.vm.strip[3].levels.is_updated}]",
f"[strip 4 {self.vm.strip[4].levels.is_updated}]",
)
print(" ".join(info))
def main():