mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
ayon conversion fixes
This commit is contained in:
parent
b7bd293892
commit
ac4e3157bc
2 changed files with 9 additions and 14 deletions
|
|
@ -35,14 +35,6 @@ def csvpublish(
|
|||
# setting host context into project
|
||||
host.set_project_name(project_name)
|
||||
|
||||
# add asset context to environment
|
||||
# TODO: perhaps this can be done in a better way?
|
||||
os.environ.update({
|
||||
"AVALON_PROJECT": project_name,
|
||||
"AVALON_ASSET": asset_name,
|
||||
"AVALON_TASK": task_name or ""
|
||||
})
|
||||
|
||||
# form precreate data with field values
|
||||
file_field = FileDefItem.from_paths([csv_filepath], False).pop().to_dict()
|
||||
precreate_data = {
|
||||
|
|
@ -57,7 +49,7 @@ def csvpublish(
|
|||
)
|
||||
|
||||
create_context.create(
|
||||
"io.openpype.creators.traypublisher.csv_ingest",
|
||||
"io.ayon_core.creators.traypublisher.csv_ingest",
|
||||
"Main",
|
||||
asset_doc=asset_doc,
|
||||
task_name=task_name,
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ configuration in project settings.
|
|||
)
|
||||
|
||||
csv_instance = CreatedInstance(
|
||||
self.family, subset_name, instance_data, self
|
||||
self.product_type, subset_name, instance_data, self
|
||||
)
|
||||
self._store_new_instance(csv_instance)
|
||||
|
||||
|
|
@ -106,6 +106,7 @@ configuration in project settings.
|
|||
"""Create instances from csv data"""
|
||||
|
||||
for asset_name, _data in csv_data_for_instances.items():
|
||||
project_name = self.create_context.get_current_project_name()
|
||||
asset_doc = _data["asset_doc"]
|
||||
products = _data["products"]
|
||||
|
||||
|
|
@ -118,10 +119,12 @@ configuration in project settings.
|
|||
|
||||
# create subset/product name
|
||||
product_name = get_product_name(
|
||||
product_type,
|
||||
variant,
|
||||
task_name,
|
||||
project_name,
|
||||
asset_doc,
|
||||
task_name,
|
||||
self.host_name,
|
||||
product_type,
|
||||
variant
|
||||
)
|
||||
|
||||
# make sure frame start/end is inherited from csv columns
|
||||
|
|
@ -419,7 +422,7 @@ configuration in project settings.
|
|||
# make sure csv file contains columns from following list
|
||||
required_columns = [
|
||||
column["name"] for column in self.columns_config["columns"]
|
||||
if column["required"]
|
||||
if column["required_column"]
|
||||
]
|
||||
# get data from csv file
|
||||
with open(csv_file_path, "r") as csv_file:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue