mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Ingest Maya usersetup
This commit is contained in:
parent
ca1492c839
commit
31ffb5e826
2 changed files with 34 additions and 8 deletions
26
tests/integration/hosts/maya/input/startup/userSetup.py
Normal file
26
tests/integration/hosts/maya/input/startup/userSetup.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import logging
|
||||
import sys
|
||||
|
||||
from maya import cmds
|
||||
|
||||
|
||||
def setup_pyblish_logging():
|
||||
log = logging.getLogger("pyblish")
|
||||
hnd = logging.StreamHandler(sys.stdout)
|
||||
fmt = logging.Formatter(
|
||||
"pyblish (%(levelname)s) (line: %(lineno)d) %(name)s:"
|
||||
"\n%(message)s"
|
||||
)
|
||||
hnd.setFormatter(fmt)
|
||||
log.addHandler(hnd)
|
||||
|
||||
|
||||
def main():
|
||||
cmds.evalDeferred("setup_pyblish_logging()", evaluateNext=True)
|
||||
cmds.evalDeferred(
|
||||
"import pyblish.util;pyblish.util.publish()", lowestPriority=True
|
||||
)
|
||||
cmds.evalDeferred("cmds.quit(force=True)", lowestPriority=True)
|
||||
|
||||
|
||||
main()
|
||||
|
|
@ -33,16 +33,16 @@ class MayaHostFixtures(HostFixtures):
|
|||
yield dest_path
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def startup_scripts(self, monkeypatch_session, download_test_data):
|
||||
def startup_scripts(self, monkeypatch_session):
|
||||
"""Points Maya to userSetup file from input data"""
|
||||
startup_path = os.path.join(download_test_data,
|
||||
"input",
|
||||
"startup")
|
||||
startup_path = os.path.join(
|
||||
os.path.dirname(__file__), "input", "startup"
|
||||
)
|
||||
original_pythonpath = os.environ.get("PYTHONPATH")
|
||||
monkeypatch_session.setenv("PYTHONPATH",
|
||||
"{}{}{}".format(startup_path,
|
||||
os.pathsep,
|
||||
original_pythonpath))
|
||||
monkeypatch_session.setenv(
|
||||
"PYTHONPATH",
|
||||
"{}{}{}".format(startup_path, os.pathsep, original_pythonpath)
|
||||
)
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def skip_compare_folders(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue