mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
items have is_new properties
This commit is contained in:
parent
72508c738f
commit
0a764aca05
1 changed files with 12 additions and 0 deletions
|
|
@ -922,6 +922,10 @@ class BaseItem:
|
|||
def id(self):
|
||||
return self._id
|
||||
|
||||
@property
|
||||
def is_new(self):
|
||||
return False
|
||||
|
||||
def rowCount(self):
|
||||
return len(self._children)
|
||||
|
||||
|
|
@ -1142,6 +1146,10 @@ class AssetItem(BaseItem):
|
|||
def asset_id(self):
|
||||
return self.mongo_id
|
||||
|
||||
@property
|
||||
def is_new(self):
|
||||
return self.asset_id is None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._data["name"]
|
||||
|
|
@ -1293,6 +1301,10 @@ class TaskItem(BaseItem):
|
|||
data = {}
|
||||
super(TaskItem, self).__init__(data)
|
||||
|
||||
@property
|
||||
def is_new(self):
|
||||
return self._origin_data is None
|
||||
|
||||
@classmethod
|
||||
def name_icon(cls):
|
||||
if cls._name_icon is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue