mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
change imports of 'get_workfile_template_key', 'get_workfile_template_key_from_context' and 'get_workdir_with_workdir_data' and 'get_workdir' in code
This commit is contained in:
parent
c64578684d
commit
b89e99e890
5 changed files with 35 additions and 18 deletions
|
|
@ -3,9 +3,9 @@ import copy
|
|||
from collections import OrderedDict
|
||||
from pprint import pformat
|
||||
import pyblish
|
||||
from openpype.lib import get_workdir
|
||||
import openpype.hosts.flame.api as opfapi
|
||||
import openpype.pipeline as op_pipeline
|
||||
from openpype.pipeline.workfile import get_workdir
|
||||
|
||||
|
||||
class IntegrateBatchGroup(pyblish.api.InstancePlugin):
|
||||
|
|
@ -324,7 +324,13 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
|
|||
project_doc = instance.data["projectEntity"]
|
||||
asset_entity = instance.data["assetEntity"]
|
||||
anatomy = instance.context.data["anatomy"]
|
||||
project_settings = instance.context.data["project_settings"]
|
||||
|
||||
return get_workdir(
|
||||
project_doc, asset_entity, task_data["name"], "flame", anatomy
|
||||
project_doc,
|
||||
asset_entity,
|
||||
task_data["name"],
|
||||
"flame",
|
||||
anatomy,
|
||||
project_settings=project_settings
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import os
|
|||
|
||||
from openpype.lib import (
|
||||
StringTemplate,
|
||||
get_workfile_template_key_from_context,
|
||||
get_last_workfile_with_version,
|
||||
)
|
||||
from openpype.pipeline import (
|
||||
|
|
@ -10,6 +9,9 @@ from openpype.pipeline import (
|
|||
legacy_io,
|
||||
Anatomy,
|
||||
)
|
||||
from openpype.pipeline.workfile import (
|
||||
get_workfile_template_key_from_context,
|
||||
)
|
||||
from openpype.pipeline.template_data import get_template_data_with_names
|
||||
from openpype.hosts.tvpaint.api import lib, pipeline, plugin
|
||||
|
||||
|
|
@ -57,8 +59,7 @@ class LoadWorkfile(plugin.Loader):
|
|||
asset_name,
|
||||
task_name,
|
||||
host_name,
|
||||
project_name=project_name,
|
||||
dbcon=legacy_io
|
||||
project_name=project_name
|
||||
)
|
||||
anatomy = Anatomy(project_name)
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,7 @@ from openpype.settings.constants import (
|
|||
from . import PypeLogger
|
||||
from .profiles_filtering import filter_profiles
|
||||
from .local_settings import get_openpype_username
|
||||
from .avalon_context import (
|
||||
get_workdir_with_workdir_data,
|
||||
get_workfile_template_key,
|
||||
get_last_workfile
|
||||
)
|
||||
from .avalon_context import get_last_workfile
|
||||
|
||||
from .python_module_tools import (
|
||||
modules_from_path,
|
||||
|
|
@ -1635,7 +1631,14 @@ def prepare_context_environments(data, env_group=None):
|
|||
data["task_type"] = task_type
|
||||
|
||||
try:
|
||||
workdir = get_workdir_with_workdir_data(workdir_data, anatomy)
|
||||
from openpype.pipeline.workfile import get_workdir_with_workdir_data
|
||||
|
||||
workdir = get_workdir_with_workdir_data(
|
||||
workdir_data,
|
||||
anatomy.project_name,
|
||||
anatomy,
|
||||
project_settings=project_settings
|
||||
)
|
||||
|
||||
except Exception as exc:
|
||||
raise ApplicationLaunchFailed(
|
||||
|
|
@ -1725,11 +1728,16 @@ def _prepare_last_workfile(data, workdir):
|
|||
if not last_workfile_path:
|
||||
extensions = HOST_WORKFILE_EXTENSIONS.get(app.host_name)
|
||||
if extensions:
|
||||
from openpype.pipeline import get_workfile_template_key
|
||||
|
||||
anatomy = data["anatomy"]
|
||||
project_settings = data["project_settings"]
|
||||
task_type = workdir_data["task"]["type"]
|
||||
template_key = get_workfile_template_key(
|
||||
task_type, app.host_name, project_settings=project_settings
|
||||
task_type,
|
||||
app.host_name,
|
||||
project_name,
|
||||
project_settings=project_settings
|
||||
)
|
||||
# Find last workfile
|
||||
file_template = str(anatomy.templates[template_key]["file"])
|
||||
|
|
|
|||
|
|
@ -12,12 +12,10 @@ from openpype.client import (
|
|||
get_assets,
|
||||
)
|
||||
from openpype.settings import get_project_settings, get_system_settings
|
||||
from openpype.lib import (
|
||||
get_workfile_template_key,
|
||||
StringTemplate,
|
||||
)
|
||||
from openpype.lib import StringTemplate
|
||||
from openpype.pipeline import Anatomy
|
||||
from openpype.pipeline.template_data import get_template_data
|
||||
from openpype.pipeline.workfile import get_workfile_template_key
|
||||
from openpype_modules.ftrack.lib import BaseAction, statics_icon
|
||||
from openpype_modules.ftrack.lib.avalon_sync import create_chunks
|
||||
|
||||
|
|
@ -299,7 +297,10 @@ class FillWorkfileAttributeAction(BaseAction):
|
|||
|
||||
task_type = workfile_data["task"]["type"]
|
||||
template_key = get_workfile_template_key(
|
||||
task_type, host_name, project_settings=project_settings
|
||||
task_type,
|
||||
host_name,
|
||||
project_name,
|
||||
project_settings=project_settings
|
||||
)
|
||||
if template_key in templates_by_key:
|
||||
template = templates_by_key[template_key]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ from openpype.tools.utils import PlaceholderLineEdit
|
|||
from openpype.tools.utils.delegates import PrettyTimeDelegate
|
||||
from openpype.lib import (
|
||||
emit_event,
|
||||
get_workfile_template_key,
|
||||
create_workdir_extra_folders,
|
||||
)
|
||||
from openpype.lib.avalon_context import (
|
||||
|
|
@ -24,6 +23,8 @@ from openpype.pipeline import (
|
|||
legacy_io,
|
||||
Anatomy,
|
||||
)
|
||||
from openpype.pipeline.workfile import get_workfile_template_key
|
||||
|
||||
from .model import (
|
||||
WorkAreaFilesModel,
|
||||
PublishFilesModel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue