mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 14:22:37 +01:00
Merge branch 'develop' into feature/1235-hiero-unify-otio-workflow-from-resolve
This commit is contained in:
commit
7d8457d7f9
16 changed files with 90 additions and 45 deletions
17
README.md
17
README.md
|
|
@ -166,14 +166,23 @@ sudo yum install qt5-qtbase-devel
|
|||
<details>
|
||||
<summary>Use pyenv to install Python version for OpenPype build</summary>
|
||||
|
||||
You will need **bzip2**, **readline** and **sqlite3** libraries.
|
||||
You will need **bzip2**, **readline**, **sqlite3** and other libraries.
|
||||
|
||||
**Ubuntu:**
|
||||
For more details about Python build environments see:
|
||||
|
||||
https://github.com/pyenv/pyenv/wiki#suggested-build-environment
|
||||
|
||||
**For Ubuntu:**
|
||||
```sh
|
||||
sudo apt install libbz2-dev libreadline-dev libsqlite3-dev
|
||||
sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
|
||||
```
|
||||
|
||||
1) install **pyenv**
|
||||
**For Centos:**
|
||||
```sh
|
||||
yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel
|
||||
```
|
||||
|
||||
**install pyenv**
|
||||
```sh
|
||||
curl https://pyenv.run | bash
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import subprocess
|
||||
from openpype.lib import PreLaunchHook
|
||||
|
||||
|
||||
|
|
@ -10,15 +11,32 @@ class LaunchWithWindowsShell(PreLaunchHook):
|
|||
instead.
|
||||
"""
|
||||
|
||||
order = 10
|
||||
app_groups = ["resolve", "nuke", "nukex", "hiero", "nukestudio"]
|
||||
# Should be as last hook becuase must change launch arguments to string
|
||||
order = 1000
|
||||
app_groups = ["nuke", "nukex", "hiero", "nukestudio"]
|
||||
platforms = ["windows"]
|
||||
|
||||
def execute(self):
|
||||
# Get comspec which is cmd.exe in most cases.
|
||||
comspec = os.environ.get("COMSPEC", "cmd.exe")
|
||||
# Add comspec to arguments list and add "/k"
|
||||
new_args = [comspec, "/c"]
|
||||
new_args.extend(self.launch_context.launch_args)
|
||||
new_args = [
|
||||
# Get comspec which is cmd.exe in most cases.
|
||||
os.environ.get("COMSPEC", "cmd.exe"),
|
||||
# NOTE change to "/k" if want to keep console opened
|
||||
"/c",
|
||||
# Convert arguments to command line arguments (as string)
|
||||
"\"{}\"".format(
|
||||
subprocess.list2cmdline(self.launch_context.launch_args)
|
||||
)
|
||||
]
|
||||
# Convert list to string
|
||||
# WARNING this only works if is used as string
|
||||
args_string = " ".join(new_args)
|
||||
self.log.info((
|
||||
"Modified launch arguments to be launched with shell \"{}\"."
|
||||
).format(args_string))
|
||||
|
||||
# Replace launch args with new one
|
||||
self.launch_context.launch_args = new_args
|
||||
self.launch_context.launch_args = args_string
|
||||
# Change `creationflags` to CREATE_NEW_CONSOLE
|
||||
self.launch_context.kwargs["creationflags"] = (
|
||||
subprocess.CREATE_NEW_CONSOLE
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import pyblish.api as pyblish
|
|||
import openpype.hosts.aftereffects
|
||||
|
||||
|
||||
log = logging.getLogger("pype.hosts.aftereffects")
|
||||
log = logging.getLogger("openpype.hosts.aftereffects")
|
||||
|
||||
|
||||
HOST_DIR = os.path.dirname(os.path.abspath(openpype.hosts.aftereffects.__file__))
|
||||
|
|
|
|||
|
|
@ -21,3 +21,4 @@ class RemovePublishHighlight(openpype.api.Extractor):
|
|||
item = instance.data
|
||||
comp_name = item["comp_name"].replace(stub.PUBLISH_ICON, '')
|
||||
stub.rename_item(item["comp_id"], comp_name)
|
||||
instance.data["comp_name"] = comp_name
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def install():
|
|||
avalon.data["familiesStateDefault"] = False
|
||||
avalon.data["familiesStateToggled"] = family_states
|
||||
|
||||
log.info("pype.hosts.fusion installed")
|
||||
log.info("openpype.hosts.fusion installed")
|
||||
|
||||
pyblish.register_host("fusion")
|
||||
pyblish.register_plugin_path(PUBLISH_PATH)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class CollectFusionRenderMode(pyblish.api.InstancePlugin):
|
|||
available tool does not visualize which render mode is set for the
|
||||
current comp, please run the following line in the console (Py2)
|
||||
|
||||
comp.GetData("pype.rendermode")
|
||||
comp.GetData("openpype.rendermode")
|
||||
|
||||
This will return the name of the current render mode as seen above under
|
||||
Options.
|
||||
|
|
@ -34,7 +34,7 @@ class CollectFusionRenderMode(pyblish.api.InstancePlugin):
|
|||
raise RuntimeError("No comp previously collected, unable to "
|
||||
"retrieve Fusion version.")
|
||||
|
||||
rendermode = comp.GetData("pype.rendermode") or "local"
|
||||
rendermode = comp.GetData("openpype.rendermode") or "local"
|
||||
assert rendermode in options, "Must be supported render mode"
|
||||
|
||||
self.log.info("Render mode: {0}".format(rendermode))
|
||||
|
|
|
|||
|
|
@ -96,11 +96,11 @@ class SetRenderMode(QtWidgets.QWidget):
|
|||
return self._comp.GetAttrs("COMPS_Name")
|
||||
|
||||
def _get_comp_rendermode(self):
|
||||
return self._comp.GetData("pype.rendermode") or "local"
|
||||
return self._comp.GetData("openpype.rendermode") or "local"
|
||||
|
||||
def _set_comp_rendermode(self):
|
||||
rendermode = self.mode_options.currentText()
|
||||
self._comp.SetData("pype.rendermode", rendermode)
|
||||
self._comp.SetData("openpype.rendermode", rendermode)
|
||||
|
||||
self._comp.Print("Updated render mode to '%s'\n" % rendermode)
|
||||
self.hide()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from openpype import lib
|
|||
from pyblish import api as pyblish
|
||||
import openpype.hosts.photoshop
|
||||
|
||||
log = logging.getLogger("pype.hosts.photoshop")
|
||||
log = logging.getLogger("openpype.hosts.photoshop")
|
||||
|
||||
HOST_DIR = os.path.dirname(os.path.abspath(openpype.hosts.photoshop.__file__))
|
||||
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins")
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ def install():
|
|||
avalon.data["familiesStateDefault"] = False
|
||||
avalon.data["familiesStateToggled"] = family_states
|
||||
|
||||
log.info("pype.hosts.resolve installed")
|
||||
log.info("openpype.hosts.resolve installed")
|
||||
|
||||
pyblish.register_host("resolve")
|
||||
pyblish.register_plugin_path(PUBLISH_PATH)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class ResolvePrelaunch(PreLaunchHook):
|
|||
self.launch_context.env["PRE_PYTHON_SCRIPT"] = pre_py_sc
|
||||
self.log.debug(f"-- pre_py_sc: `{pre_py_sc}`...")
|
||||
try:
|
||||
__import__("pype.hosts.resolve")
|
||||
__import__("openpype.hosts.resolve")
|
||||
__import__("pyblish")
|
||||
|
||||
except ImportError:
|
||||
|
|
|
|||
|
|
@ -836,10 +836,15 @@ class ApplicationLaunchContext:
|
|||
self.log.debug("All prelaunch hook executed. Starting new process.")
|
||||
|
||||
# Prepare subprocess args
|
||||
args = self.clear_launch_args(self.launch_args)
|
||||
self.log.debug(
|
||||
"Launching \"{}\" with args ({}): {}".format(
|
||||
self.app_name, len(args), args
|
||||
args_len_str = ""
|
||||
if isinstance(self.launch_args, str):
|
||||
args = self.launch_args
|
||||
else:
|
||||
args = self.clear_launch_args(self.launch_args)
|
||||
args_len_str = " ({})".format(len(args))
|
||||
self.log.info(
|
||||
"Launching \"{}\" with args{}: {}".format(
|
||||
self.app_name, args_len_str, args
|
||||
)
|
||||
)
|
||||
# Run process
|
||||
|
|
@ -885,7 +890,10 @@ class ApplicationLaunchContext:
|
|||
Return:
|
||||
list: Unpacked arguments.
|
||||
"""
|
||||
while True:
|
||||
if isinstance(args, str):
|
||||
return args
|
||||
all_cleared = False
|
||||
while not all_cleared:
|
||||
all_cleared = True
|
||||
new_args = []
|
||||
for arg in args:
|
||||
|
|
@ -897,8 +905,6 @@ class ApplicationLaunchContext:
|
|||
new_args.append(arg)
|
||||
args = new_args
|
||||
|
||||
if all_cleared:
|
||||
break
|
||||
return args
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import time
|
||||
import types
|
||||
import logging
|
||||
import traceback
|
||||
|
|
@ -10,7 +11,6 @@ from openpype.lib import (
|
|||
modules_from_path
|
||||
)
|
||||
|
||||
|
||||
log = PypeLogger.get_logger(__name__)
|
||||
|
||||
"""
|
||||
|
|
@ -120,6 +120,18 @@ class FtrackServer:
|
|||
if not session:
|
||||
session = ftrack_api.Session(auto_connect_event_hub=True)
|
||||
|
||||
# Wait until session has connected event hub
|
||||
if session._auto_connect_event_hub_thread:
|
||||
# Use timeout from session (since ftrack-api 2.1.0)
|
||||
timeout = getattr(session, "request_timeout", 60)
|
||||
started = time.time()
|
||||
while not session.event_hub.connected:
|
||||
if (time.time() - started) > timeout:
|
||||
raise RuntimeError((
|
||||
"Connection to Ftrack was not created in {} seconds"
|
||||
).format(timeout))
|
||||
time.sleep(0.1)
|
||||
|
||||
self.session = session
|
||||
if load_files:
|
||||
if not self.handler_paths:
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import sys
|
|||
import logging
|
||||
import getpass
|
||||
import atexit
|
||||
import tempfile
|
||||
import threading
|
||||
import datetime
|
||||
import time
|
||||
import queue
|
||||
import appdirs
|
||||
import pymongo
|
||||
|
||||
import requests
|
||||
|
|
@ -165,7 +165,6 @@ class ProcessEventHub(SocketBaseEventHub):
|
|||
|
||||
def wait(self, duration=None):
|
||||
"""Overriden wait
|
||||
|
||||
Event are loaded from Mongo DB when queue is empty. Handled event is
|
||||
set as processed in Mongo DB.
|
||||
"""
|
||||
|
|
@ -252,7 +251,7 @@ class CustomEventHubSession(ftrack_api.session.Session):
|
|||
self, server_url=None, api_key=None, api_user=None, auto_populate=True,
|
||||
plugin_paths=None, cache=None, cache_key_maker=None,
|
||||
auto_connect_event_hub=False, schema_cache_path=None,
|
||||
plugin_arguments=None, **kwargs
|
||||
plugin_arguments=None, timeout=60, **kwargs
|
||||
):
|
||||
self.kwargs = kwargs
|
||||
|
||||
|
|
@ -331,6 +330,7 @@ class CustomEventHubSession(ftrack_api.session.Session):
|
|||
self._request.auth = ftrack_api.session.SessionAuthentication(
|
||||
self._api_key, self._api_user
|
||||
)
|
||||
self.request_timeout = timeout
|
||||
|
||||
self.auto_populate = auto_populate
|
||||
|
||||
|
|
@ -368,8 +368,9 @@ class CustomEventHubSession(ftrack_api.session.Session):
|
|||
# rebuilding types)?
|
||||
if schema_cache_path is not False:
|
||||
if schema_cache_path is None:
|
||||
schema_cache_path = appdirs.user_cache_dir()
|
||||
schema_cache_path = os.environ.get(
|
||||
'FTRACK_API_SCHEMA_CACHE_PATH', tempfile.gettempdir()
|
||||
'FTRACK_API_SCHEMA_CACHE_PATH', schema_cache_path
|
||||
)
|
||||
|
||||
schema_cache_path = os.path.join(
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ def __main__():
|
|||
print("Got Pype location from environment: {}".format(
|
||||
os.environ.get('OPENPYPE_SETUP_PATH')))
|
||||
|
||||
pype_command = "pype.ps1"
|
||||
pype_command = "openpype.ps1"
|
||||
if platform.system().lower() == "linux":
|
||||
pype_command = "pype"
|
||||
elif platform.system().lower() == "windows":
|
||||
pype_command = "pype.bat"
|
||||
pype_command = "openpype.bat"
|
||||
|
||||
if kwargs.pype:
|
||||
pype_root = kwargs.pype
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ def apply_local_settings_on_system_settings(system_settings, local_settings):
|
|||
# TODO This is temporary fix until launch arguments will be stored
|
||||
# per platform and not per executable.
|
||||
# - local settings store only executable
|
||||
new_executables = [[executable, ""]]
|
||||
new_executables = [executable]
|
||||
new_executables.extend(platform_executables)
|
||||
variants[app_name]["executables"] = new_executables
|
||||
|
||||
|
|
|
|||
|
|
@ -65,23 +65,20 @@ To build pype on linux you wil need:
|
|||
|
||||
- **[curl](https://curl.se)** on systems that doesn't have one preinstalled.
|
||||
- Python header files installed (**python3-dev** on Ubuntu for example).
|
||||
- **[CMake](https://cmake.org/)**: to build some external openPype dependencies.
|
||||
- **bzip2**, **readline** and **sqlite3** libraries.
|
||||
- **bzip2**, **readline**, **sqlite3** and other libraries.
|
||||
|
||||
Because some Linux distros come with newer Python version pre-installed, you might
|
||||
need to install **3.7** version and make use of it explicitly.
|
||||
Your best bet is probably using [pyenv](https://github.com/pyenv/pyenv).
|
||||
|
||||
You can use your package manager to install **git** and **cmake**.
|
||||
You can use your package manager to install **git** and other packages to your build
|
||||
environment.
|
||||
Use curl for pyenv installation
|
||||
|
||||
:::note Install build requirements for **Ubuntu**
|
||||
|
||||
|
||||
```sh
|
||||
sudo apt install build-essential checkinstall
|
||||
sudo apt install git cmake curl
|
||||
sudo apt install libbz2-dev libreadline-dev libsqlite3-dev
|
||||
sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git
|
||||
```
|
||||
|
||||
In case you run in error about `xcb` when running Pype,
|
||||
|
|
@ -95,8 +92,7 @@ sudo apt install qt5-default
|
|||
:::note Install build requirements for **Centos**
|
||||
|
||||
```sh
|
||||
sudo yum install git cmake python3-devel python3-pip
|
||||
sudo yum install bzip2-devel readline-devel sqlite-devel
|
||||
yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel git
|
||||
```
|
||||
|
||||
In case you run in error about `xcb` when running Pype,
|
||||
|
|
@ -108,6 +104,8 @@ sudo yum install qt5-qtbase-devel
|
|||
|
||||
:::
|
||||
|
||||
For more information about setting your build environmet please refer to [pyenv suggested build environment](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
|
||||
|
||||
#### Common steps for all Distros
|
||||
|
||||
Use pyenv to prepare Python version for Pype build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue