mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
resolve: creating clips with folder path
also converting dict() to {}
This commit is contained in:
parent
db8e8b162c
commit
0b8dde2687
1 changed files with 18 additions and 11 deletions
|
|
@ -19,7 +19,7 @@ from .menu import load_stylesheet
|
|||
class CreatorWidget(QtWidgets.QDialog):
|
||||
|
||||
# output items
|
||||
items = dict()
|
||||
items = {}
|
||||
|
||||
def __init__(self, name, info, ui_inputs, parent=None):
|
||||
super(CreatorWidget, self).__init__(parent)
|
||||
|
|
@ -101,7 +101,7 @@ class CreatorWidget(QtWidgets.QDialog):
|
|||
self.close()
|
||||
|
||||
def value(self, data, new_data=None):
|
||||
new_data = new_data or dict()
|
||||
new_data = new_data or {}
|
||||
for k, v in data.items():
|
||||
new_data[k] = {
|
||||
"target": None,
|
||||
|
|
@ -290,7 +290,7 @@ class Spacer(QtWidgets.QWidget):
|
|||
class ClipLoader:
|
||||
|
||||
active_bin = None
|
||||
data = dict()
|
||||
data = {}
|
||||
|
||||
def __init__(self, loader_obj, context, **options):
|
||||
""" Initialize object
|
||||
|
|
@ -588,8 +588,8 @@ class PublishClip:
|
|||
Returns:
|
||||
hiero.core.TrackItem: hiero track item object with openpype tag
|
||||
"""
|
||||
vertical_clip_match = dict()
|
||||
tag_data = dict()
|
||||
vertical_clip_match = {}
|
||||
tag_data = {}
|
||||
types = {
|
||||
"shot": "shot",
|
||||
"folder": "folder",
|
||||
|
|
@ -665,15 +665,23 @@ class PublishClip:
|
|||
new_name = self.tag_data.pop("newClipName")
|
||||
|
||||
if self.rename:
|
||||
self.tag_data["asset"] = new_name
|
||||
self.tag_data["asset_name"] = new_name
|
||||
else:
|
||||
self.tag_data["asset"] = self.ti_name
|
||||
self.tag_data["asset_name"] = self.ti_name
|
||||
|
||||
# AYON unique identifier
|
||||
folder_path = "/{}/{}".format(
|
||||
self.tag_data["hierarchy"],
|
||||
self.tag_data["asset_name"]
|
||||
)
|
||||
self.tag_data["folder_path"] = folder_path
|
||||
|
||||
# create new name for track item
|
||||
if not lib.pype_marker_workflow:
|
||||
# create compound clip workflow
|
||||
lib.create_compound_clip(
|
||||
self.timeline_item_data,
|
||||
self.tag_data["asset"],
|
||||
self.tag_data["asset_name"],
|
||||
self.mp_folder
|
||||
)
|
||||
|
||||
|
|
@ -765,7 +773,7 @@ class PublishClip:
|
|||
# increasing steps by index of rename iteration
|
||||
self.count_steps *= self.rename_index
|
||||
|
||||
hierarchy_formatting_data = dict()
|
||||
hierarchy_formatting_data = {}
|
||||
_data = self.timeline_item_default_data.copy()
|
||||
if self.ui_inputs:
|
||||
# adding tag metadata from ui
|
||||
|
|
@ -854,8 +862,7 @@ class PublishClip:
|
|||
"parents": self.parents,
|
||||
"hierarchyData": hierarchy_formatting_data,
|
||||
"subset": self.subset,
|
||||
"family": self.subset_family,
|
||||
"families": ["clip"]
|
||||
"family": self.subset_family
|
||||
}
|
||||
|
||||
def _convert_to_entity(self, key):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue