mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
added static method calculate changes
This commit is contained in:
parent
333e7c37ae
commit
9cf725d4d9
1 changed files with 7 additions and 3 deletions
|
|
@ -96,14 +96,18 @@ class FamilyAttributeValues:
|
|||
def attr_defs(self):
|
||||
return self._attr_defs
|
||||
|
||||
def changes(self):
|
||||
@staticmethod
|
||||
def calculate_changes(new_data, old_data):
|
||||
changes = {}
|
||||
for key, new_value in self._data.items():
|
||||
old_value = self._last_data.get(key)
|
||||
for key, new_value in new_data.items():
|
||||
old_value = old_data.get(key)
|
||||
if old_value != new_value:
|
||||
changes[key] = (old_value, new_value)
|
||||
return changes
|
||||
|
||||
def changes(self):
|
||||
return self.calculate_changes(self._data, self._last_data)
|
||||
|
||||
def _propagate_changes(self, changes=None):
|
||||
if self._chunk_value > 0:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue