Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

General: Reduce usage of legacy io #4723

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
39849a7
General: Connect to AYON server (base) (#3924)
iLLiCiTiT Mar 24, 2023
1316e3b
replace 'legacy_io' with context functions in load plugins
iLLiCiTiT Mar 27, 2023
01ae9f3
added 'get_global_context' to pipeline init
iLLiCiTiT Mar 27, 2023
4546f88
use context getters instead of legacy_io in publish plugins
iLLiCiTiT Mar 27, 2023
beee910
use data on context instead of 'legacy_io' in submit publish job
iLLiCiTiT Mar 27, 2023
77d32b7
skip query of asset docs in collect nuke reads
iLLiCiTiT Mar 27, 2023
b34875c
use context functions on other places
iLLiCiTiT Mar 27, 2023
cde736d
'list_looks' expects project name
iLLiCiTiT Mar 27, 2023
06bbff1
remove 'get_context_title'
iLLiCiTiT Mar 27, 2023
0410a51
don't pass AvalonMongoDB to prelaunch hooks
iLLiCiTiT Mar 27, 2023
a1c985b
change how context is calculated in hiero
iLLiCiTiT Mar 27, 2023
8289730
implemented function 'get_fps_for_current_context' for maya
iLLiCiTiT Mar 27, 2023
19cdffc
initialize '_image_dir' and '_image_prefixes' in init
iLLiCiTiT Mar 27, 2023
6681e78
legacy creator is using 'get_current_project_name'
iLLiCiTiT Mar 27, 2023
8079fd0
fill docstrings
iLLiCiTiT Mar 27, 2023
16e1f12
use context functions in workfile builders
iLLiCiTiT Mar 27, 2023
b028cd4
hound fixes
iLLiCiTiT Mar 27, 2023
3759412
'create_workspace_mel' can expect project settings
iLLiCiTiT Mar 28, 2023
8b9fa2c
swapped order of arguments
iLLiCiTiT Mar 28, 2023
057db1b
use information from instance/context data
iLLiCiTiT Mar 28, 2023
8a56fb1
Use self.project_name in workfiles tool
iLLiCiTiT Mar 28, 2023
17ea073
Remove outdated todo
iLLiCiTiT Mar 28, 2023
4ff2b71
don't query project document in nuke lib
iLLiCiTiT Mar 28, 2023
c036d76
Fix access to context data
iLLiCiTiT Mar 28, 2023
a0c409b
Use right function to get project name
iLLiCiTiT Mar 28, 2023
bc18caf
fix submit max deadline and swap order of arguments
iLLiCiTiT Mar 28, 2023
61a26d9
added 'get_context_label' to nuke
iLLiCiTiT Mar 28, 2023
8fa2bb7
fix import
iLLiCiTiT Mar 28, 2023
63bdf7b
fix typo 'curent_context' -> 'current_context'
iLLiCiTiT Mar 28, 2023
7b4113a
fix project_setting variable
iLLiCiTiT Mar 28, 2023
fc49d4a
fix submit publish job environments
iLLiCiTiT Mar 28, 2023
4fd2727
use task from context
iLLiCiTiT Mar 28, 2023
ae2c058
Removed unused import
iLLiCiTiT Mar 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't pass AvalonMongoDB to prelaunch hooks
  • Loading branch information
iLLiCiTiT committed Apr 3, 2023
commit 0410a51a2a167e9cda0fed11bb72b85b8718af9c
10 changes: 1 addition & 9 deletions openpype/hooks/pre_global_host_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
prepare_app_environments,
prepare_context_environments
)
from openpype.pipeline import AvalonMongoDB, Anatomy
from openpype.pipeline import Anatomy


class GlobalHostDataHook(PreLaunchHook):
Expand All @@ -26,7 +26,6 @@ def execute(self):

"app": app,

"dbcon": self.data["dbcon"],
"project_doc": self.data["project_doc"],
"asset_doc": self.data["asset_doc"],

Expand Down Expand Up @@ -62,13 +61,6 @@ def prepare_global_data(self):
# Anatomy
self.data["anatomy"] = Anatomy(project_name)

# Mongo connection
dbcon = AvalonMongoDB()
dbcon.Session["AVALON_PROJECT"] = project_name
dbcon.install()

self.data["dbcon"] = dbcon

# Project document
project_doc = get_project(project_name)
self.data["project_doc"] = project_doc
Expand Down
11 changes: 1 addition & 10 deletions openpype/lib/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,14 +1371,9 @@ def get_app_environments_for_context(
"""

from openpype.modules import ModulesManager
from openpype.pipeline import AvalonMongoDB, Anatomy
from openpype.pipeline import Anatomy
from openpype.lib.openpype_version import is_running_staging

# Avalon database connection
dbcon = AvalonMongoDB()
dbcon.Session["AVALON_PROJECT"] = project_name
dbcon.install()

# Project document
project_doc = get_project(project_name)
asset_doc = get_asset_by_name(project_name, asset_name)
Expand All @@ -1400,7 +1395,6 @@ def get_app_environments_for_context(

"app": app,

"dbcon": dbcon,
"project_doc": project_doc,
"asset_doc": asset_doc,

Expand All @@ -1415,9 +1409,6 @@ def get_app_environments_for_context(
prepare_app_environments(data, env_group, modules_manager)
prepare_context_environments(data, env_group, modules_manager)

# Discard avalon connection
dbcon.uninstall()

return data["env"]


Expand Down