mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
added method to calculate changes
This commit is contained in:
parent
5f64741b6d
commit
21ea868db3
1 changed files with 8 additions and 0 deletions
|
|
@ -40,6 +40,14 @@ class FamilyAttributeValues(dict):
|
|||
def attr_defs(self):
|
||||
return self._attr_defs
|
||||
|
||||
def changes(self):
|
||||
changes = {}
|
||||
for key, new_value in self._data.items():
|
||||
old_value = self._last_data.get(key)
|
||||
if old_value != new_value:
|
||||
changes[key] = (old_value, new_value)
|
||||
return changes
|
||||
|
||||
|
||||
class AvalonInstance:
|
||||
"""Instance entity with data that will be stored to workfile.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue