mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
more data are passet to create method
This commit is contained in:
parent
d02dfc3e34
commit
a7123e3cc1
2 changed files with 15 additions and 4 deletions
|
|
@ -95,5 +95,6 @@ class PublisherController:
|
|||
|
||||
self.instances = instances
|
||||
|
||||
def create(self, family, variant=None, options=None):
|
||||
print("TODO implement create")
|
||||
def create(self, family, subset_name, instance_data, options):
|
||||
creator = self.creators[family]
|
||||
return creator.create(subset_name, instance_data, options)
|
||||
|
|
|
|||
|
|
@ -414,12 +414,22 @@ class CreateDialog(QtWidgets.QDialog):
|
|||
|
||||
index = indexes[0]
|
||||
family = index.data(QtCore.Qt.DisplayRole)
|
||||
subset_name = self.subset_name_input.text()
|
||||
variant = self.variant_input.text()
|
||||
asset_name = self._asset_doc["name"]
|
||||
task_name = self.dbcon.Session.get("AVALON_TASK")
|
||||
options = {
|
||||
"useSelection": self.use_selection_checkbox.isChecked()
|
||||
}
|
||||
|
||||
self.controller.create(family, variant, options)
|
||||
# Where to define these data?
|
||||
# - what data show be stored?
|
||||
instance_data = {
|
||||
"asset": asset_name,
|
||||
"task": task_name,
|
||||
"variant": variant,
|
||||
"family": family
|
||||
}
|
||||
self.controller.create(family, subset_name, instance_data, options)
|
||||
|
||||
if self.auto_close_checkbox.isChecked():
|
||||
self.hide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue