mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge develop into main
This commit is contained in:
commit
228ba50e29
6 changed files with 53 additions and 26 deletions
2
.github/workflows/nightly_merge.yml
vendored
2
.github/workflows/nightly_merge.yml
vendored
|
|
@ -20,4 +20,4 @@ jobs:
|
||||||
type: now
|
type: now
|
||||||
from_branch: develop
|
from_branch: develop
|
||||||
target_branch: main
|
target_branch: main
|
||||||
github_token: ${{ secrets.TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -590,16 +590,21 @@ class MongoSettingsHandler(SettingsHandler):
|
||||||
attributes[key] = value
|
attributes[key] = value
|
||||||
|
|
||||||
project_doc_config = project_doc.get("config") or {}
|
project_doc_config = project_doc.get("config") or {}
|
||||||
|
|
||||||
app_names = set()
|
app_names = set()
|
||||||
if "apps" in project_doc_config:
|
if not project_doc_config or "apps" not in project_doc_config:
|
||||||
for app_item in project_doc_config.pop("apps"):
|
set_applications = False
|
||||||
|
else:
|
||||||
|
set_applications = True
|
||||||
|
for app_item in project_doc_config["apps"]:
|
||||||
if not app_item:
|
if not app_item:
|
||||||
continue
|
continue
|
||||||
app_name = app_item.get("name")
|
app_name = app_item.get("name")
|
||||||
if app_name:
|
if app_name:
|
||||||
app_names.add(app_name)
|
app_names.add(app_name)
|
||||||
|
|
||||||
attributes["applications"] = list(app_names)
|
if set_applications:
|
||||||
|
attributes["applications"] = list(app_names)
|
||||||
|
|
||||||
output = {"attributes": attributes}
|
output = {"attributes": attributes}
|
||||||
for key in self.anatomy_keys:
|
for key in self.anatomy_keys:
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,8 @@ QAbstractItemView {
|
||||||
border-radius: 0.2em;
|
border-radius: 0.2em;
|
||||||
background: {color:bg-view};
|
background: {color:bg-view};
|
||||||
alternate-background-color: {color:bg-view-alternate};
|
alternate-background-color: {color:bg-view-alternate};
|
||||||
|
/* Mac shows selection color on branches. */
|
||||||
|
selection-background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
QAbstractItemView:disabled{
|
QAbstractItemView:disabled{
|
||||||
|
|
@ -344,30 +346,35 @@ QAbstractItemView::item:selected:hover {
|
||||||
background: {color:bg-view-selection-hover};
|
background: {color:bg-view-selection-hover};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Row colors (alternate colors) are from left - right */
|
||||||
|
QAbstractItemView:branch {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
QAbstractItemView::branch:open:has-children:!has-siblings,
|
QAbstractItemView::branch:open:has-children:!has-siblings,
|
||||||
QAbstractItemView::branch:open:has-children:has-siblings {
|
QAbstractItemView::branch:open:has-children:has-siblings {
|
||||||
border-image: none;
|
border-image: none;
|
||||||
image: url(:/openpype/images/branch_open.png);
|
image: url(:/openpype/images/branch_open.png);
|
||||||
background: {color:bg-view};
|
background: transparent;
|
||||||
}
|
}
|
||||||
QAbstractItemView::branch:open:has-children:!has-siblings:hover,
|
QAbstractItemView::branch:open:has-children:!has-siblings:hover,
|
||||||
QAbstractItemView::branch:open:has-children:has-siblings:hover {
|
QAbstractItemView::branch:open:has-children:has-siblings:hover {
|
||||||
border-image: none;
|
border-image: none;
|
||||||
image: url(:/openpype/images//branch_open_on.png);
|
image: url(:/openpype/images//branch_open_on.png);
|
||||||
/* background: {color:bg-view-hover}; */
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
QAbstractItemView::branch:has-children:!has-siblings:closed,
|
QAbstractItemView::branch:has-children:!has-siblings:closed,
|
||||||
QAbstractItemView::branch:closed:has-children:has-siblings {
|
QAbstractItemView::branch:closed:has-children:has-siblings {
|
||||||
border-image: none;
|
border-image: none;
|
||||||
image: url(:/openpype/images//branch_closed.png);
|
image: url(:/openpype/images//branch_closed.png);
|
||||||
background: {color:bg-view};
|
background: transparent;
|
||||||
}
|
}
|
||||||
QAbstractItemView::branch:has-children:!has-siblings:closed:hover,
|
QAbstractItemView::branch:has-children:!has-siblings:closed:hover,
|
||||||
QAbstractItemView::branch:closed:has-children:has-siblings:hover {
|
QAbstractItemView::branch:closed:has-children:has-siblings:hover {
|
||||||
border-image: none;
|
border-image: none;
|
||||||
image: url(:/openpype/images//branch_closed_on.png);
|
image: url(:/openpype/images//branch_closed_on.png);
|
||||||
/* background: {color:bg-view-hover}; */
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Progress bar */
|
/* Progress bar */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import collections
|
import collections
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
from queue import Queue
|
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
from .constants import (
|
from .constants import (
|
||||||
|
|
@ -160,6 +159,10 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
if self._current_project == project_name and not force:
|
if self._current_project == project_name and not force:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Reset attributes
|
||||||
|
self._items_by_id.clear()
|
||||||
|
self._asset_items_by_name.clear()
|
||||||
|
|
||||||
self.clear()
|
self.clear()
|
||||||
|
|
||||||
self._current_project = project_name
|
self._current_project = project_name
|
||||||
|
|
@ -219,13 +222,13 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
parent_id = asset_doc["data"].get("visualParent")
|
parent_id = asset_doc["data"].get("visualParent")
|
||||||
asset_docs_by_parent_id[parent_id].append(asset_doc)
|
asset_docs_by_parent_id[parent_id].append(asset_doc)
|
||||||
|
|
||||||
appending_queue = Queue()
|
appending_queue = collections.deque()
|
||||||
appending_queue.put((None, project_item))
|
appending_queue.append((None, project_item))
|
||||||
|
|
||||||
asset_items_by_id = {}
|
asset_items_by_id = {}
|
||||||
non_modifiable_items = set()
|
non_modifiable_items = set()
|
||||||
while not appending_queue.empty():
|
while appending_queue:
|
||||||
parent_id, parent_item = appending_queue.get()
|
parent_id, parent_item = appending_queue.popleft()
|
||||||
asset_docs = asset_docs_by_parent_id.get(parent_id) or []
|
asset_docs = asset_docs_by_parent_id.get(parent_id) or []
|
||||||
|
|
||||||
new_items = []
|
new_items = []
|
||||||
|
|
@ -242,19 +245,19 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
|
|
||||||
asset_items_by_id[asset_id] = new_item
|
asset_items_by_id[asset_id] = new_item
|
||||||
# Add item to appending queue
|
# Add item to appending queue
|
||||||
appending_queue.put((asset_id, new_item))
|
appending_queue.append((asset_id, new_item))
|
||||||
|
|
||||||
if new_items:
|
if new_items:
|
||||||
self.add_items(new_items, parent_item)
|
self.add_items(new_items, parent_item)
|
||||||
|
|
||||||
# Handle Asset's that are not modifiable
|
# Handle Asset's that are not modifiable
|
||||||
# - pass the information to all it's parents
|
# - pass the information to all it's parents
|
||||||
non_modifiable_queue = Queue()
|
non_modifiable_queue = collections.deque()
|
||||||
for item_id in non_modifiable_items:
|
for item_id in non_modifiable_items:
|
||||||
non_modifiable_queue.put(item_id)
|
non_modifiable_queue.append(item_id)
|
||||||
|
|
||||||
while not non_modifiable_queue.empty():
|
while non_modifiable_queue:
|
||||||
item_id = non_modifiable_queue.get()
|
item_id = non_modifiable_queue.popleft()
|
||||||
item = self._items_by_id[item_id]
|
item = self._items_by_id[item_id]
|
||||||
item.setData(False, HIERARCHY_CHANGE_ABLE_ROLE)
|
item.setData(False, HIERARCHY_CHANGE_ABLE_ROLE)
|
||||||
|
|
||||||
|
|
@ -264,7 +267,7 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
and parent.id not in non_modifiable_items
|
and parent.id not in non_modifiable_items
|
||||||
):
|
):
|
||||||
non_modifiable_items.add(parent.id)
|
non_modifiable_items.add(parent.id)
|
||||||
non_modifiable_queue.put(parent.id)
|
non_modifiable_queue.append(parent.id)
|
||||||
|
|
||||||
# Add task items
|
# Add task items
|
||||||
for asset_id, asset_item in asset_items_by_id.items():
|
for asset_id, asset_item in asset_items_by_id.items():
|
||||||
|
|
@ -380,6 +383,9 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
item_id = source_index.data(IDENTIFIER_ROLE)
|
item_id = source_index.data(IDENTIFIER_ROLE)
|
||||||
item = self.items_by_id[item_id]
|
item = self.items_by_id[item_id]
|
||||||
|
|
||||||
|
if isinstance(item, TaskItem):
|
||||||
|
item = item.parent()
|
||||||
|
|
||||||
if isinstance(item, (RootItem, ProjectItem)):
|
if isinstance(item, (RootItem, ProjectItem)):
|
||||||
name = "ep"
|
name = "ep"
|
||||||
new_row = None
|
new_row = None
|
||||||
|
|
@ -1127,18 +1133,18 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
project_name = project_item.name
|
project_name = project_item.name
|
||||||
project_col = self.dbcon.database[project_name]
|
project_col = self.dbcon.database[project_name]
|
||||||
|
|
||||||
to_process = Queue()
|
to_process = collections.deque()
|
||||||
to_process.put(project_item)
|
to_process.append(project_item)
|
||||||
|
|
||||||
bulk_writes = []
|
bulk_writes = []
|
||||||
while not to_process.empty():
|
while to_process:
|
||||||
parent = to_process.get()
|
parent = to_process.popleft()
|
||||||
insert_list = []
|
insert_list = []
|
||||||
for item in parent.children():
|
for item in parent.children():
|
||||||
if not isinstance(item, AssetItem):
|
if not isinstance(item, AssetItem):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
to_process.put(item)
|
to_process.append(item)
|
||||||
|
|
||||||
if item.is_new:
|
if item.is_new:
|
||||||
insert_list.append(item)
|
insert_list.append(item)
|
||||||
|
|
|
||||||
|
|
@ -234,16 +234,19 @@ class Window(QtWidgets.QDialog):
|
||||||
footer_button_stop = QtWidgets.QPushButton(
|
footer_button_stop = QtWidgets.QPushButton(
|
||||||
awesome["stop"], footer_widget
|
awesome["stop"], footer_widget
|
||||||
)
|
)
|
||||||
|
footer_button_stop.setToolTip("Stop publishing")
|
||||||
footer_button_reset = QtWidgets.QPushButton(
|
footer_button_reset = QtWidgets.QPushButton(
|
||||||
awesome["refresh"], footer_widget
|
awesome["refresh"], footer_widget
|
||||||
)
|
)
|
||||||
|
footer_button_reset.setToolTip("Restart publishing")
|
||||||
footer_button_validate = QtWidgets.QPushButton(
|
footer_button_validate = QtWidgets.QPushButton(
|
||||||
awesome["flask"], footer_widget
|
awesome["flask"], footer_widget
|
||||||
)
|
)
|
||||||
|
footer_button_validate.setToolTip("Run validations")
|
||||||
footer_button_play = QtWidgets.QPushButton(
|
footer_button_play = QtWidgets.QPushButton(
|
||||||
awesome["play"], footer_widget
|
awesome["play"], footer_widget
|
||||||
)
|
)
|
||||||
|
footer_button_play.setToolTip("Publish")
|
||||||
layout = QtWidgets.QHBoxLayout()
|
layout = QtWidgets.QHBoxLayout()
|
||||||
layout.setContentsMargins(5, 5, 5, 5)
|
layout.setContentsMargins(5, 5, 5, 5)
|
||||||
layout.addWidget(footer_info, 0)
|
layout.addWidget(footer_info, 0)
|
||||||
|
|
|
||||||
8
setup.py
8
setup.py
|
|
@ -46,10 +46,16 @@ install_requires = [
|
||||||
"httplib2",
|
"httplib2",
|
||||||
# Harmony implementation
|
# Harmony implementation
|
||||||
"filecmp",
|
"filecmp",
|
||||||
"dns"
|
"dns",
|
||||||
|
# Python defaults (cx_Freeze skip them by default)
|
||||||
|
"dbm"
|
||||||
]
|
]
|
||||||
|
|
||||||
includes = []
|
includes = []
|
||||||
|
# WARNING: As of cx_freeze there is a bug?
|
||||||
|
# when this is empty, its hooks will not kick in
|
||||||
|
# and won't clean platform irrelevant modules
|
||||||
|
# like dbm mentioned above.
|
||||||
excludes = [
|
excludes = [
|
||||||
"openpype"
|
"openpype"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue