mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
gave ability to pop value
This commit is contained in:
parent
3ba089382d
commit
90d51629af
1 changed files with 10 additions and 0 deletions
|
|
@ -73,6 +73,16 @@ class FamilyAttributeValues(dict):
|
|||
for key in self._attr_defs_by_key.keys():
|
||||
yield key, self._data.get(key)
|
||||
|
||||
def pop(self, key, default=None):
|
||||
if key not in self._data:
|
||||
return default
|
||||
|
||||
result = self._data.pop(key)
|
||||
self._propagate_changes({
|
||||
key: (result, None)
|
||||
})
|
||||
return result
|
||||
|
||||
@property
|
||||
def attr_defs(self):
|
||||
return self._attr_defs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue