DL - resolve conflict

This commit is contained in:
Petr Kalis 2021-04-01 18:22:58 +02:00
commit f911ce018e
87 changed files with 631 additions and 758 deletions

117
README.md
View file

@ -1,38 +1,49 @@
Pype
OpenPype
====
Introduction
------------
Multi-platform open-source pipeline built around the [Avalon](https://getavalon.github.io/) platform,
expanding it with extra features and integrations. Pype connects asset database, project management
and time tracking into a single modular system. It has tight integration
with [ftrack](https://www.ftrack.com/en/), but it can also run independently.
Open-source pipeline for visual effects and animation built on top of the [Avalon](https://getavalon.github.io/) framework, expanding it with extra features and integrations. OpenPype connects your DCCs, asset database, project management and time tracking into a single system. It has a tight integration with [ftrack](https://www.ftrack.com/en/), but can also run independently or be integrated into a different project management solution.
To get all the key information about the project, go to [PYPE.club](http://pype.club)
OpenPype provides a robust platform for your studio, without the worry of a vendor lock. You will always have full access to the source-code and your project database will run locally or in the cloud of your choice.
To get all the information about the project, go to [OpenPype.io](http://openpype.io)
Requirements
------------
Pype will run on most typical hardware configurations commonly found in studios around the world.
It is installed on artist computer and can take up 3Gb of space depending on number of versions
and other dependencies.
For well functioning [ftrack](https://www.ftrack.com/en/) event server, we recommend a
linux virtual server with [Ubuntu](https://ubuntu.com/) or [CentosOS](https://www.centos.org/).
CPU and RAM allocation need differ based on the studio size, but a 2GB of RAM, with a
dual core CPU and around 4GB of storage should suffice.
We aim to closely follow [**VFX Reference Platform**](https://vfxplatform.com/)
Pype needs running [mongodb](https://www.mongodb.com/) server with good connectivity as it is
heavily used by Pype. Depending on project size and number of artists working connection speed and
latency influence performance experienced by artists. If remote working is required, this mongodb
server must be accessible from Internet or cloud solution can be used. Reasonable backup plan
or high availability options are recommended.
OpenPype is written in Python 3 with specific elements still running in Python2 until all DCCs are fully updated. To see the list of those, that are not quite there yet, go to [VFX Python3 tracker](https://vfxpy.com/)
Building Pype
The main things you will need to run and build OpenPype are:
- **Terminal** in your OS
- PowerShell 5.0+ (Windows)
- Bash (Linux)
- [**Python 3.7.8**](#python) or higher
- [**MongoDB**](#database)
It can be built and ran on all common platforms. We develop and test on the following:
- **Windows** 10
- **Linux**
- **Ubuntu** 20.04 LTS
- **Centos** 7
- **Mac OSX**
- **10.15** Catalina
- **11.1** Big Sur (using Rosetta2)
For more details on requirements visit [requirements documentation](https://openpype.io/docs/dev_requirements)
Building OpenPype
-------------
To build Pype you currently need [Python 3.7](https://www.python.org/downloads/) as we are following
To build OpenPype you currently need [Python 3.7](https://www.python.org/downloads/) as we are following
[vfx platform](https://vfxplatform.com). Because of some Linux distros comes with newer Python version
already, you need to install **3.7** version and make use of it. You can use perhaps [pyenv](https://github.com/pyenv/pyenv) for this on Linux.
@ -44,27 +55,27 @@ development tools like [CMake](https://cmake.org/) and [Visual Studio](https://v
#### Clone repository:
```sh
git clone --recurse-submodules git@github.com:pypeclub/pype.git
git clone --recurse-submodules git@github.com:Pypeclub/OpenPype.git
```
#### To build Pype:
#### To build OpenPype:
1) Run `.\tools\create_env.ps1` to create virtual environment in `.\venv`
2) Run `.\tools\build.ps1` to build pype executables in `.\build\`
2) Run `.\tools\build.ps1` to build OpenPype executables in `.\build\`
To create distributable Pype versions, run `./tools/create_zip.ps1` - that will
create zip file with name `pype-vx.x.x.zip` parsed from current pype repository and
To create distributable OpenPype versions, run `./tools/create_zip.ps1` - that will
create zip file with name `openpype-vx.x.x.zip` parsed from current OpenPype repository and
copy it to user data dir, or you can specify `--path /path/to/zip` to force it there.
You can then point **Igniter** - Pype setup tool - to directory containing this zip and
You can then point **Igniter** - OpenPype setup tool - to directory containing this zip and
it will install it on current computer.
Pype is build using [CX_Freeze](https://cx-freeze.readthedocs.io/en/latest) to freeze itself and all dependencies.
OpenPype is build using [CX_Freeze](https://cx-freeze.readthedocs.io/en/latest) to freeze itself and all dependencies.
### macOS
You will need [Python 3.7](https://www.python.org/downloads/) and [git](https://git-scm.com/downloads). You'll need also other tools to build
some Pype dependencies like [CMake](https://cmake.org/) and **XCode Command Line Tools** (or some other build system).
some OpenPype dependencies like [CMake](https://cmake.org/) and **XCode Command Line Tools** (or some other build system).
Easy way of installing everything necessary is to use [Homebrew](https://brew.sh):
@ -81,7 +92,7 @@ brew install cmake
3) Install [pyenv](https://github.com/pyenv/pyenv):
```sh
brew install pyenv
echo 'eval "$(pypenv init -)"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
pyenv init
exec "$SHELL"
PATH=$(pyenv root)/shims:$PATH
@ -98,14 +109,14 @@ pyenv install 3.7.9
5) Set local Python version
```sh
# switch to Pype source directory
# switch to OpenPype source directory
pyenv local 3.7.9
```
#### To build Pype:
#### To build OpenPype:
1) Run `.\tools\create_env.sh` to create virtual environment in `.\venv`
2) Run `.\tools\build.sh` to build Pype executables in `.\build\`
2) Run `.\tools\build.sh` to build OpenPype executables in `.\build\`
### Linux
@ -115,7 +126,7 @@ You will need [Python 3.7](https://www.python.org/downloads/) and [git](https://
To build Python related stuff, you need Python header files installed (`python3-dev` on Ubuntu for example).
You'll need also other tools to build
some Pype dependencies like [CMake](https://cmake.org/). Python 3 should be part of all modern distributions. You can use your package manager to install **git** and **cmake**.
some OpenPype dependencies like [CMake](https://cmake.org/). Python 3 should be part of all modern distributions. You can use your package manager to install **git** and **cmake**.
<details>
@ -127,7 +138,7 @@ sudo apt install build-essential checkinstall
sudo apt install git cmake curl
```
#### Note:
In case you run in error about `xcb` when running Pype,
In case you run in error about `xcb` when running OpenPype,
you'll need also additional libraries for Qt5:
```sh
@ -144,7 +155,7 @@ sudo yum install qit cmake
```
#### Note:
In case you run in error about `xcb` when running Pype,
In case you run in error about `xcb` when running OpenPype,
you'll need also additional libraries for Qt5:
```sh
@ -153,7 +164,7 @@ sudo yum install qt5-qtbase-devel
</details>
<details>
<summary>Use pyenv to install Python version for Pype build</summary>
<summary>Use pyenv to install Python version for OpenPype build</summary>
You will need **bzip2**, **readline** and **sqlite3** libraries.
@ -177,8 +188,8 @@ exec $SHELL
# install Python 3.7.9
pyenv install -v 3.7.9
# change path to pype 3
cd /path/to/pype-3
# change path to OpenPype 3
cd /path/to/openpype-3
# set local python version
pyenv local 3.7.9
@ -186,42 +197,42 @@ pyenv local 3.7.9
```
</details>
#### To build Pype:
#### To build OpenPype:
1) Run `.\tools\create_env.sh` to create virtual environment in `.\venv`
2) Run `.\tools\build.sh` to build Pype executables in `.\build\`
2) Run `.\tools\build.sh` to build OpenPype executables in `.\build\`
Running Pype
Running OpenPype
------------
Pype can by executed either from live sources (this repository) or from
OpenPype can by executed either from live sources (this repository) or from
*"frozen code"* - executables that can be build using steps described above.
If Pype is executed from live sources, it will use Pype version included in them. If
it is executed from frozen code it will try to find latest Pype version installed locally
If OpenPype is executed from live sources, it will use OpenPype version included in them. If
it is executed from frozen code it will try to find latest OpenPype version installed locally
on current computer and if it is not found, it will ask for its location. On that location
pype can be either in directories or zip files. Pype will try to find latest version and
install it to user data directory (on Windows to `%LOCALAPPDATA%\pypeclub\pype`, on Linux
`~/.local/share/pype` and on macOS in `~/Library/Application Support/pype`).
OpenPype can be either in directories or zip files. OpenPype will try to find latest version and
install it to user data directory (on Windows to `%LOCALAPPDATA%\pypeclub\openpype`, on Linux
`~/.local/share/openpype` and on macOS in `~/Library/Application Support/openpype`).
### From sources
Pype can be run directly from sources by activating virtual environment:
OpenPype can be run directly from sources by activating virtual environment:
```sh
poetry run python start.py tray
```
This will use current Pype version with sources. You can override this with `--use-version=x.x.x` and
then Pype will try to find locally installed specified version (present in user data directory).
This will use current OpenPype version with sources. You can override this with `--use-version=x.x.x` and
then OpenPype will try to find locally installed specified version (present in user data directory).
### From frozen code
You need to build Pype first. This will produce two executables - `pype_gui(.exe)` and `pype_console(.exe)`.
You need to build OpenPype first. This will produce two executables - `openpype_gui(.exe)` and `openpype_console(.exe)`.
First one will act as GUI application and will not create console (useful in production environments).
The second one will create console and will write output there - useful for headless application and
debugging purposes. If you need pype version installed, just run `./tools/create_zip(.ps1|.sh)` without
arguments and it will create zip file that pype can use.
debugging purposes. If you need OpenPype version installed, just run `./tools/create_zip(.ps1|.sh)` without
arguments and it will create zip file that OpenPype can use.
Building documentation

View file

@ -625,7 +625,7 @@ class BootstrapRepos:
Resolution order for Pype is following:
1) First we test for ``PYPE_PATH`` environment variable
1) First we test for ``OPENPYPE_PATH`` environment variable
2) We try to find ``pypePath`` in registry setting
3) We use user data directory
@ -660,9 +660,9 @@ class BootstrapRepos:
if pype_path:
dir_to_search = pype_path
else:
if os.getenv("PYPE_PATH"):
if Path(os.getenv("PYPE_PATH")).exists():
dir_to_search = Path(os.getenv("PYPE_PATH"))
if os.getenv("OPENPYPE_PATH"):
if Path(os.getenv("OPENPYPE_PATH")).exists():
dir_to_search = Path(os.getenv("OPENPYPE_PATH"))
else:
try:
registry_dir = Path(
@ -688,7 +688,7 @@ class BootstrapRepos:
"""Process user entered location string.
It decides if location string is mongodb url or path.
If it is mongodb url, it will connect and load ``PYPE_PATH`` from
If it is mongodb url, it will connect and load ``OPENPYPE_PATH`` from
there and use it as path to Pype. In it is _not_ mongodb url, it
is assumed we have a path, this is tested and zip file is
produced and installed using :meth:`create_version_from_live_code`.
@ -706,7 +706,7 @@ class BootstrapRepos:
if location.startswith("mongodb"):
pype_path = get_pype_path_from_db(location)
if not pype_path:
self._print("cannot find PYPE_PATH in settings.")
self._print("cannot find OPENPYPE_PATH in settings.")
return None
# if not successful, consider location to be fs path.

View file

@ -46,7 +46,10 @@ class InstallDialog(QtWidgets.QDialog):
self.mongo_url = ""
try:
self.mongo_url = os.getenv("PYPE_MONGO", "") or self.registry.get_secure_item("pypeMongo") # noqa: E501
self.mongo_url = (
os.getenv("OPENPYPE_MONGO", "")
or self.registry.get_secure_item("pypeMongo")
)
except ValueError:
pass

View file

@ -68,7 +68,7 @@ class InstallThread(QThread):
# user did not entered url
if not self._mongo:
# it not set in environment
if not os.getenv("PYPE_MONGO"):
if not os.getenv("OPENPYPE_MONGO"):
# try to get it from settings registry
try:
self._mongo = bs.registry.get_secure_item("pypeMongo")
@ -78,12 +78,12 @@ class InstallThread(QThread):
self.finished.emit(InstallResult(-1))
return
else:
self._mongo = os.getenv("PYPE_MONGO")
self._mongo = os.getenv("OPENPYPE_MONGO")
else:
self.message.emit("Saving mongo connection string ...", False)
bs.registry.set_secure_item("pypeMongo", self._mongo)
os.environ["PYPE_MONGO"] = self._mongo
os.environ["OPENPYPE_MONGO"] = self._mongo
self.message.emit(
f"Detecting installed Pype versions in {bs.data_dir}", False)
@ -160,7 +160,7 @@ class InstallThread(QThread):
return
else:
# if we have mongo connection string, validate it, set it to
# user settings and get PYPE_PATH from there.
# user settings and get OPENPYPE_PATH from there.
if self._mongo:
if not validate_mongo_connection(self._mongo):
self.message.emit(
@ -168,7 +168,7 @@ class InstallThread(QThread):
self.finished.emit(InstallResult(-1))
return
bs.registry.set_secure_item("pypeMongo", self._mongo)
os.environ["PYPE_MONGO"] = self._mongo
os.environ["OPENPYPE_MONGO"] = self._mongo
self.message.emit(f"processing {self._path}", True)
repo_file = bs.process_entered_location(self._path)

View file

@ -211,7 +211,7 @@ class IniSettingRegistry(ASettingRegistry):
# type: (str, str) -> IniSettingRegistry
super(IniSettingRegistry, self).__init__(name)
# get registry file
version = os.getenv("PYPE_VERSION", "N/A")
version = os.getenv("OPENPYPE_VERSION", "N/A")
self._registry_file = os.path.join(path, "{}.ini".format(name))
if not os.path.exists(self._registry_file):
with open(self._registry_file, mode="w") as cfg:
@ -367,7 +367,7 @@ class JSONSettingRegistry(ASettingRegistry):
now = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
header = {
"__metadata__": {
"pype-version": os.getenv("PYPE_VERSION", "N/A"),
"pype-version": os.getenv("OPENPYPE_VERSION", "N/A"),
"generated": now
},
"registry": {}

View file

@ -24,7 +24,7 @@ from .lib import (
get_latest_version,
get_global_environments,
get_local_site_id,
change_pype_mongo_url
change_openpype_mongo_url
)
from .lib.mongo import (
@ -120,5 +120,5 @@ __all__ = [
"get_global_environments",
"get_local_site_id",
"change_pype_mongo_url"
"change_openpype_mongo_url"
]

View file

@ -93,7 +93,7 @@ def eventserver(debug,
provided credentials will be stored for later use.
"""
if debug:
os.environ['PYPE_DEBUG'] = "3"
os.environ['OPENPYPE_DEBUG'] = "3"
PypeCommands().launch_eventservercli(
ftrack_url,
@ -139,7 +139,7 @@ def publish(debug, paths):
More than one path is allowed.
"""
if debug:
os.environ['PYPE_DEBUG'] = '3'
os.environ['OPENPYPE_DEBUG'] = '3'
PypeCommands.publish(list(paths))
@ -164,7 +164,7 @@ def texturecopy(debug, project, asset, path):
Nothing is written to database.
"""
if debug:
os.environ['PYPE_DEBUG'] = '3'
os.environ['OPENPYPE_DEBUG'] = '3'
PypeCommands().texture_copy(project, asset, path)
@ -178,7 +178,7 @@ def texturecopy(debug, project, asset, path):
default=lambda: os.environ.get('AVALON_TASK', ''))
@click.option("--tools", help="List of tools to add")
@click.option("--user", help="Pype user name",
default=lambda: os.environ.get('PYPE_USERNAME', ''))
default=lambda: os.environ.get('OPENPYPE_USERNAME', ''))
@click.option("-fs",
"--ftrack-server",
help="Registered application name",
@ -214,7 +214,7 @@ def launch(app, project, asset, task,
os.environ["FTRACK_API_KEY"] = ftrack_key
if user:
os.environ["PYPE_USERNAME"] = user
os.environ["OPENPYPE_USERNAME"] = user
# test required
if not project or not asset or not task:

View file

@ -11,7 +11,7 @@ class PrePython2Vendor(PreLaunchHook):
def execute(self):
# Prepare vendor dir path
self.log.info("adding global python 2 vendor")
pype_root = os.getenv("PYPE_ROOT")
pype_root = os.getenv("OPENPYPE_ROOT")
python_2_vendor = os.path.join(
pype_root,
"pype",
@ -32,4 +32,3 @@ class PrePython2Vendor(PreLaunchHook):
# Set new PYTHONPATH to launch context environments
self.launch_context.env["PYTHONPATH"] = os.pathsep.join(python_paths)

View file

@ -35,7 +35,7 @@ class CelactionPrelaunchHook(PreLaunchHook):
winreg.KEY_ALL_ACCESS)
# TODO: this will need to be checked more thoroughly
pype_exe = os.getenv("PYPE_EXECUTABLE")
pype_exe = os.getenv("OPENPYPE_EXECUTABLE")
winreg.SetValueEx(hKey, "SubmitAppTitle", 0, winreg.REG_SZ, pype_exe)

View file

@ -15,7 +15,7 @@ from .lib import (
update_frame_range
)
from .menu import launch_pype_menu
from .menu import launch_openpype_menu
__all__ = [
@ -34,5 +34,5 @@ __all__ = [
"update_frame_range",
# menu
"launch_pype_menu",
"launch_openpype_menu",
]

View file

@ -49,11 +49,11 @@ class Spacer(QtWidgets.QWidget):
self.setLayout(layout)
class PypeMenu(QtWidgets.QWidget):
class OpenPypeMenu(QtWidgets.QWidget):
def __init__(self, *args, **kwargs):
super(self.__class__, self).__init__(*args, **kwargs)
self.setObjectName("PypeMenu")
self.setObjectName("OpenPypeMenu")
self.setWindowFlags(
QtCore.Qt.Window
@ -63,14 +63,14 @@ class PypeMenu(QtWidgets.QWidget):
| QtCore.Qt.WindowStaysOnTopHint
)
self.render_mode_widget = None
self.setWindowTitle("Pype")
workfiles_btn = QtWidgets.QPushButton("Workfiles", self)
create_btn = QtWidgets.QPushButton("Create", self)
publish_btn = QtWidgets.QPushButton("Publish", self)
load_btn = QtWidgets.QPushButton("Load", self)
inventory_btn = QtWidgets.QPushButton("Inventory", self)
libload_btn = QtWidgets.QPushButton("Library", self)
rendermode_btn = QtWidgets.QPushButton("Set render mode", self)
self.setWindowTitle("OpenPype")
workfiles_btn = QtWidgets.QPushButton("Workfiles ...", self)
create_btn = QtWidgets.QPushButton("Create ...", self)
publish_btn = QtWidgets.QPushButton("Publish ...", self)
load_btn = QtWidgets.QPushButton("Load ...", self)
inventory_btn = QtWidgets.QPushButton("Inventory ...", self)
libload_btn = QtWidgets.QPushButton("Library ...", self)
rendermode_btn = QtWidgets.QPushButton("Set render mode ...", self)
duplicate_with_inputs_btn = QtWidgets.QPushButton(
"Duplicate with input connections", self
)
@ -156,11 +156,11 @@ class PypeMenu(QtWidgets.QWidget):
print("Clicked Reset Resolution")
def launch_pype_menu():
def launch_openpype_menu():
app = QtWidgets.QApplication(sys.argv)
app.setQuitOnLastWindowClosed(False)
pype_menu = PypeMenu()
pype_menu = OpenPypeMenu()
stylesheet = load_stylesheet()
pype_menu.setStyleSheet(stylesheet)

View file

@ -20,7 +20,7 @@ QPushButton:hover {
color: #e64b3d;
}
#PypeMenu {
#OpenPypeMenu {
border: 1px solid #fef9ef;
}

View file

@ -11,9 +11,6 @@ import pype.hosts.fusion
log = Logger().get_logger(__name__)
AVALON_CONFIG = os.getenv("AVALON_CONFIG", "pype")
HOST_DIR = os.path.dirname(os.path.abspath(pype.hosts.fusion.__file__))
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins")

View file

@ -18,7 +18,7 @@ def main(env):
log.info(f"Avalon registred hosts: {avalon.api.registered_host()}")
menu.launch_pype_menu()
menu.launch_openpype_menu()
if __name__ == "__main__":

View file

@ -154,7 +154,7 @@ def application_launch():
# It is now moved so it it manually called.
# ensure_scene_settings()
# check_inventory()
# fills PYPE_HARMONY_JS
# fills OPENPYPE_HARMONY_JS
pype_harmony_path = Path(__file__).parent.parent / "js" / "PypeHarmony.js"
pype_harmony_js = pype_harmony_path.read_text()

View file

@ -6,8 +6,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}

View file

@ -5,8 +5,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}
if (typeof $ === 'undefined'){

View file

@ -6,8 +6,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}
if (typeof $ === 'undefined'){

View file

@ -6,8 +6,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}

View file

@ -6,8 +6,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}

View file

@ -6,8 +6,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}

View file

@ -6,8 +6,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}
/**

View file

@ -6,8 +6,8 @@
// check if PypeHarmony is defined and if not, load it.
if (typeof PypeHarmony === 'undefined') {
var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js';
include(PYPE_HARMONY_JS.replace(/\\/g, "/"));
var OPENPYPE_HARMONY_JS = System.getenv('OPENPYPE_HARMONY_JS') + '/PypeHarmony.js';
include(OPENPYPE_HARMONY_JS.replace(/\\/g, "/"));
}

View file

@ -2,21 +2,7 @@
<mainMenu>
<menuBar>
<subMenu id="avalon_menu">
<label>Pype</label>
<subMenu id="avalon_context">
<labelExpression><![CDATA[
from avalon import api
return "%s - %s" % (api.Session["AVALON_ASSET"], api.Session["AVALON_TASK"])
]]></labelExpression>
<scriptItem id="avalon_context_switch">
<label>Set Context</label>
<scriptCode><![CDATA[
from avalon.tools import contextmanager; contextmanager.show()
]]></scriptCode>
</scriptItem>
</subMenu>
<separatorItem/>
<label>OpenPype</label>
<scriptItem id="avalon_create">
<label>Create ...</label>
@ -55,7 +41,7 @@ publish.show(parent)
<separatorItem/>
<scriptItem id="workfiles">
<label>Work Files</label>
<label>Work Files ...</label>
<scriptCode><![CDATA[
import hou, os
from pype.tools import workfiles

View file

@ -3,7 +3,7 @@ import hou
def main():
print("Installing Avalon ...")
print("Installing OpenPype ...")
api.install(houdini)

View file

@ -1,21 +1,21 @@
[
{
"type": "action",
"command": "$PYPE_SCRIPTS\\others\\save_scene_incremental.py",
"command": "$OPENPYPE_SCRIPTS\\others\\save_scene_incremental.py",
"sourcetype": "file",
"title": "# Version Up",
"tooltip": "Incremental save with a specific format"
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\others\\open_current_folder.py",
"command": "$OPENPYPE_SCRIPTS\\others\\open_current_folder.py",
"sourcetype": "file",
"title": "Open working folder..",
"tooltip": "Show current scene in Explorer"
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\avalon\\launch_manager.py",
"command": "$OPENPYPE_SCRIPTS\\avalon\\launch_manager.py",
"sourcetype": "file",
"title": "# Project Manager",
"tooltip": "Add assets to the project"
@ -44,7 +44,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\modeling\\separateMeshPerShader.py",
"command": "$OPENPYPE_SCRIPTS\\modeling\\separateMeshPerShader.py",
"sourcetype": "file",
"tags": ["modeling", "separateMeshPerShader"],
"title": "# Separate Mesh Per Shader",
@ -52,7 +52,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\modeling\\polyDetachSeparate.py",
"command": "$OPENPYPE_SCRIPTS\\modeling\\polyDetachSeparate.py",
"sourcetype": "file",
"tags": ["modeling", "poly", "detach", "separate"],
"title": "# Polygon Detach and Separate",
@ -60,14 +60,14 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\modeling\\polySelectEveryNthEdgeUI.py",
"command": "$OPENPYPE_SCRIPTS\\modeling\\polySelectEveryNthEdgeUI.py",
"sourcetype": "file",
"tags": ["modeling", "select", "nth", "edge", "ui"],
"title": "# Select Every Nth Edge"
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\modeling\\djPFXUVs.py",
"command": "$OPENPYPE_SCRIPTS\\modeling\\djPFXUVs.py",
"sourcetype": "file",
"tags": ["modeling", "djPFX", "UVs"],
"title": "# dj PFX UVs",
@ -81,7 +81,7 @@
"items": [
{
"type": "action",
"command": "$PYPE_SCRIPTS\\rigging\\advancedSkeleton.py",
"command": "$OPENPYPE_SCRIPTS\\rigging\\advancedSkeleton.py",
"sourcetype": "file",
"tags": [
"rigging",
@ -106,7 +106,7 @@
{
"type": "action",
"title": "# Import Proxies",
"command": "$PYPE_SCRIPTS\\shading\\vray\\vrayImportProxies.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\vrayImportProxies.py",
"sourcetype": "file",
"tags": ["shading", "vray", "import", "proxies"],
"tooltip": ""
@ -117,7 +117,7 @@
{
"type": "action",
"title": "# Select All GES",
"command": "$PYPE_SCRIPTS\\shading\\vray\\selectAllGES.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\selectAllGES.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "select All GES"]
@ -125,7 +125,7 @@
{
"type": "action",
"title": "# Select All GES Under Selection",
"command": "$PYPE_SCRIPTS\\shading\\vray\\selectAllGESUnderSelection.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\selectAllGESUnderSelection.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "select", "all", "GES"]
@ -136,7 +136,7 @@
{
"type": "action",
"title": "# Selection To VRay Mesh",
"command": "$PYPE_SCRIPTS\\shading\\vray\\selectionToVrayMesh.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\selectionToVrayMesh.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "selection", "vraymesh"]
@ -144,7 +144,7 @@
{
"type": "action",
"title": "# Add VRay Round Edges Attribute",
"command": "$PYPE_SCRIPTS\\shading\\vray\\addVrayRoundEdgesAttribute.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\addVrayRoundEdgesAttribute.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "round edges", "attribute"]
@ -152,7 +152,7 @@
{
"type": "action",
"title": "# Add Gamma",
"command": "$PYPE_SCRIPTS\\shading\\vray\\vrayAddGamma.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\vrayAddGamma.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "add gamma"]
@ -162,7 +162,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\vray\\select_vraymesh_materials_with_unconnected_shader_slots.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\select_vraymesh_materials_with_unconnected_shader_slots.py",
"sourcetype": "file",
"title": "# Select Unconnected Shader Materials",
"tags": [
@ -177,7 +177,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\vray\\vrayMergeSimilarVRayMeshMaterials.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\vrayMergeSimilarVRayMeshMaterials.py",
"sourcetype": "file",
"title": "# Merge Similar VRay Mesh Materials",
"tags": [
@ -192,7 +192,7 @@
{
"type": "action",
"title": "# Create Two Sided Material",
"command": "$PYPE_SCRIPTS\\shading\\vray\\vrayCreate2SidedMtlForSelectedMtlRenamed.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\vrayCreate2SidedMtlForSelectedMtlRenamed.py",
"sourcetype": "file",
"tooltip": "Creates two sided material for selected material and renames it",
"tags": ["shading", "vray", "two sided", "material"]
@ -200,7 +200,7 @@
{
"type": "action",
"title": "# Create Two Sided Material For Selected",
"command": "$PYPE_SCRIPTS\\shading\\vray\\vrayCreate2SidedMtlForSelectedMtl.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\vrayCreate2SidedMtlForSelectedMtl.py",
"sourcetype": "file",
"tooltip": "Select material to create a two sided version from it",
"tags": [
@ -215,7 +215,7 @@
{
"type": "action",
"title": "# Add OpenSubdiv Attribute",
"command": "$PYPE_SCRIPTS\\shading\\vray\\addVrayOpenSubdivAttribute.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\addVrayOpenSubdivAttribute.py",
"sourcetype": "file",
"tooltip": "",
"tags": [
@ -229,7 +229,7 @@
{
"type": "action",
"title": "# Remove OpenSubdiv Attribute",
"command": "$PYPE_SCRIPTS\\shading\\vray\\removeVrayOpenSubdivAttribute.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\removeVrayOpenSubdivAttribute.py",
"sourcetype": "file",
"tooltip": "",
"tags": [
@ -246,7 +246,7 @@
{
"type": "action",
"title": "# Add Subdivision Attribute",
"command": "$PYPE_SCRIPTS\\shading\\vray\\addVraySubdivisionAttribute.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\addVraySubdivisionAttribute.py",
"sourcetype": "file",
"tooltip": "",
"tags": [
@ -258,7 +258,7 @@
{
"type": "action",
"title": "# Remove Subdivision Attribute.py",
"command": "$PYPE_SCRIPTS\\shading\\vray\\removeVraySubdivisionAttribute.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\removeVraySubdivisionAttribute.py",
"sourcetype": "file",
"tooltip": "",
"tags": [
@ -275,7 +275,7 @@
{
"type": "action",
"title": "# Add Vray Object Ids",
"command": "$PYPE_SCRIPTS\\shading\\vray\\addVrayObjectIds.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\addVrayObjectIds.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "add", "object id"]
@ -283,7 +283,7 @@
{
"type": "action",
"title": "# Add Vray Material Ids",
"command": "$PYPE_SCRIPTS\\shading\\vray\\addVrayMaterialIds.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\addVrayMaterialIds.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "addVrayMaterialIds.py"]
@ -294,7 +294,7 @@
{
"type": "action",
"title": "# Set Physical DOF Depth",
"command": "$PYPE_SCRIPTS\\shading\\vray\\vrayPhysicalDOFSetDepth.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\vrayPhysicalDOFSetDepth.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "physical", "DOF ", "Depth"]
@ -302,7 +302,7 @@
{
"type": "action",
"title": "# Magic Vray Proxy UI",
"command": "$PYPE_SCRIPTS\\shading\\vray\\magicVrayProxyUI.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vray\\magicVrayProxyUI.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "magicVrayProxyUI"]
@ -311,7 +311,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\pyblish\\lighting\\set_filename_prefix.py",
"command": "$OPENPYPE_SCRIPTS\\pyblish\\lighting\\set_filename_prefix.py",
"sourcetype": "file",
"tags": [
"shading",
@ -335,7 +335,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\LightLinkUi.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\LightLinkUi.py",
"sourcetype": "file",
"tags": ["shading", "light", "link", "ui"],
"title": "# Light Link UI",
@ -343,7 +343,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\vdviewer_ui.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\vdviewer_ui.py",
"sourcetype": "file",
"tags": [
"shading",
@ -358,7 +358,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\setTexturePreviewToCLRImage.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\setTexturePreviewToCLRImage.py",
"sourcetype": "file",
"tags": ["shading", "CLRImage", "textures", "preview"],
"title": "# Set Texture Preview To CLRImage",
@ -366,7 +366,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\fixDefaultShaderSetBehavior.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\fixDefaultShaderSetBehavior.py",
"sourcetype": "file",
"tags": ["shading", "fix", "DefaultShaderSet", "Behavior"],
"title": "# Fix Default Shader Set Behavior",
@ -374,7 +374,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\fixSelectedShapesReferenceAssignments.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\fixSelectedShapesReferenceAssignments.py",
"sourcetype": "file",
"tags": [
"shading",
@ -389,7 +389,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\selectLambert1Members.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\selectLambert1Members.py",
"sourcetype": "file",
"tags": ["shading", "selectLambert1Members"],
"title": "# Select Lambert1 Members",
@ -397,7 +397,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\selectShapesWithoutShader.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\selectShapesWithoutShader.py",
"sourcetype": "file",
"tags": ["shading", "selectShapesWithoutShader"],
"title": "# Select Shapes Without Shader",
@ -405,7 +405,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\fixRenderLayerOutAdjustmentErrors.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\fixRenderLayerOutAdjustmentErrors.py",
"sourcetype": "file",
"tags": ["shading", "fixRenderLayerOutAdjustmentErrors"],
"title": "# Fix RenderLayer Out Adjustment Errors",
@ -413,7 +413,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\shading\\fix_renderlayer_missing_node_override.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\fix_renderlayer_missing_node_override.py",
"sourcetype": "file",
"tags": [
"shading",
@ -429,7 +429,7 @@
{
"type": "action",
"title": "# Image 2 Tiled EXR",
"command": "$PYPE_SCRIPTS\\shading\\open_img2exr.py",
"command": "$OPENPYPE_SCRIPTS\\shading\\open_img2exr.py",
"sourcetype": "file",
"tooltip": "",
"tags": ["shading", "vray", "exr"]
@ -442,7 +442,7 @@
"items": [
{
"type": "action",
"command": "$PYPE_SCRIPTS\\pyblish\\open_deadline_submission_settings.py",
"command": "$OPENPYPE_SCRIPTS\\pyblish\\open_deadline_submission_settings.py",
"sourcetype": "file",
"tags": ["settings", "deadline", "globals", "render"],
"title": "# DL Submission Settings UI",
@ -461,7 +461,7 @@
"items": [
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\attributes\\copyValues.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\attributes\\copyValues.py",
"sourcetype": "file",
"tags": ["animation", "copy", "attributes"],
"title": "# Copy Values",
@ -469,7 +469,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\attributes\\copyInConnections.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\attributes\\copyInConnections.py",
"sourcetype": "file",
"tags": [
"animation",
@ -483,7 +483,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\attributes\\copyOutConnections.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\attributes\\copyOutConnections.py",
"sourcetype": "file",
"tags": [
"animation",
@ -497,7 +497,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\attributes\\copyTransformLocal.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\attributes\\copyTransformLocal.py",
"sourcetype": "file",
"tags": [
"animation",
@ -511,7 +511,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\attributes\\copyTransformMatrix.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\attributes\\copyTransformMatrix.py",
"sourcetype": "file",
"tags": [
"animation",
@ -525,7 +525,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\attributes\\copyTransformUI.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\attributes\\copyTransformUI.py",
"sourcetype": "file",
"tags": [
"animation",
@ -539,7 +539,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\attributes\\simpleCopyUI.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\attributes\\simpleCopyUI.py",
"sourcetype": "file",
"tags": [
"animation",
@ -561,7 +561,7 @@
"items": [
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\optimize\\toggleFreezeHierarchy.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\optimize\\toggleFreezeHierarchy.py",
"sourcetype": "file",
"tags": ["animation", "hierarchy", "toggle", "freeze"],
"title": "# Toggle Freeze Hierarchy",
@ -569,7 +569,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\animation\\optimize\\toggleParallelNucleus.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\optimize\\toggleParallelNucleus.py",
"sourcetype": "file",
"tags": ["animation", "nucleus", "toggle", "parallel"],
"title": "# Toggle Parallel Nucleus",
@ -579,21 +579,21 @@
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\bakeSelectedToWorldSpace.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\bakeSelectedToWorldSpace.py",
"tags": ["animation", "bake", "selection", "worldspace.py"],
"title": "# Bake Selected To Worldspace",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\timeStepper.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\timeStepper.py",
"tags": ["animation", "time", "stepper"],
"title": "# Time Stepper",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\capture_ui.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\capture_ui.py",
"tags": [
"animation",
"capture",
@ -607,63 +607,63 @@
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\simplePlayblastUI.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\simplePlayblastUI.py",
"tags": ["animation", "simple", "playblast", "ui"],
"title": "# Simple Playblast UI",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\tweenMachineUI.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\tweenMachineUI.py",
"tags": ["animation", "tween", "machine"],
"title": "# Tween Machine UI",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\selectAllAnimationCurves.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\selectAllAnimationCurves.py",
"tags": ["animation", "select", "curves"],
"title": "# Select All Animation Curves",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\pathAnimation.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\pathAnimation.py",
"tags": ["animation", "path", "along"],
"title": "# Path Animation",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\offsetSelectedObjectsUI.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\offsetSelectedObjectsUI.py",
"tags": ["animation", "offsetSelectedObjectsUI.py"],
"title": "# Offset Selected Objects UI",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\key_amplifier_ui.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\key_amplifier_ui.py",
"tags": ["animation", "key", "amplifier"],
"title": "# Key Amplifier UI",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\anim_scene_optimizer.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\anim_scene_optimizer.py",
"tags": ["animation", "anim_scene_optimizer.py"],
"title": "# Anim_Scene_Optimizer",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\zvParentMaster.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\zvParentMaster.py",
"tags": ["animation", "zvParentMaster.py"],
"title": "# ZV Parent Master",
"type": "action"
},
{
"sourcetype": "file",
"command": "$PYPE_SCRIPTS\\animation\\animLibrary.py",
"command": "$OPENPYPE_SCRIPTS\\animation\\animLibrary.py",
"tags": ["animation", "studiolibrary.py"],
"title": "Anim Library",
"type": "action"
@ -676,7 +676,7 @@
"items": [
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\alignDistributeUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\alignDistributeUI.py",
"sourcetype": "file",
"tags": ["layout", "align", "Distribute", "UI"],
"title": "# Align Distribute UI",
@ -684,7 +684,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\alignSimpleUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\alignSimpleUI.py",
"sourcetype": "file",
"tags": ["layout", "align", "UI", "Simple"],
"title": "# Align Simple UI",
@ -692,7 +692,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\center_locator.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\center_locator.py",
"sourcetype": "file",
"tags": ["layout", "center", "locator"],
"title": "# Center Locator",
@ -700,7 +700,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\average_locator.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\average_locator.py",
"sourcetype": "file",
"tags": ["layout", "average", "locator"],
"title": "# Average Locator",
@ -708,7 +708,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\selectWithinProximityUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\selectWithinProximityUI.py",
"sourcetype": "file",
"tags": ["layout", "select", "proximity", "ui"],
"title": "# Select Within Proximity UI",
@ -716,7 +716,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\dupCurveUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\dupCurveUI.py",
"sourcetype": "file",
"tags": ["layout", "Duplicate", "Curve", "UI"],
"title": "# Duplicate Curve UI",
@ -724,7 +724,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\randomDeselectUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\randomDeselectUI.py",
"sourcetype": "file",
"tags": ["layout", "random", "Deselect", "UI"],
"title": "# Random Deselect UI",
@ -732,7 +732,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\multiReferencerUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\multiReferencerUI.py",
"sourcetype": "file",
"tags": ["layout", "multi", "reference"],
"title": "# Multi Referencer UI",
@ -740,7 +740,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\duplicateOffsetUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\duplicateOffsetUI.py",
"sourcetype": "file",
"tags": ["layout", "duplicate", "offset", "UI"],
"title": "# Duplicate Offset UI",
@ -748,7 +748,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\spPaint3d.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\spPaint3d.py",
"sourcetype": "file",
"tags": ["layout", "spPaint3d", "paint", "tool"],
"title": "# SP Paint 3d",
@ -756,7 +756,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\randomizeUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\randomizeUI.py",
"sourcetype": "file",
"tags": ["layout", "randomize", "UI"],
"title": "# Randomize UI",
@ -764,7 +764,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\layout\\distributeWithinObjectUI.py",
"command": "$OPENPYPE_SCRIPTS\\layout\\distributeWithinObjectUI.py",
"sourcetype": "file",
"tags": ["layout", "distribute", "ObjectUI", "within"],
"title": "# Distribute Within Object UI",
@ -778,7 +778,7 @@
"items": [
{
"type": "action",
"command": "$PYPE_SCRIPTS\\particles\\instancerToObjects.py",
"command": "$OPENPYPE_SCRIPTS\\particles\\instancerToObjects.py",
"sourcetype": "file",
"tags": ["particles", "instancerToObjects"],
"title": "# Instancer To Objects",
@ -786,7 +786,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\particles\\instancerToObjectsInstances.py",
"command": "$OPENPYPE_SCRIPTS\\particles\\instancerToObjectsInstances.py",
"sourcetype": "file",
"tags": ["particles", "instancerToObjectsInstances"],
"title": "# Instancer To Objects Instances",
@ -794,7 +794,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\particles\\instancerToObjectsInstancesWithAnimation.py",
"command": "$OPENPYPE_SCRIPTS\\particles\\instancerToObjectsInstancesWithAnimation.py",
"sourcetype": "file",
"tags": [
"particles",
@ -805,7 +805,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\particles\\instancerToObjectsWithAnimation.py",
"command": "$OPENPYPE_SCRIPTS\\particles\\instancerToObjectsWithAnimation.py",
"sourcetype": "file",
"tags": ["particles", "instancerToObjectsWithAnimation"],
"title": "# Instancer To Objects With Animation",
@ -819,7 +819,7 @@
"items": [
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\repair_faulty_containers.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\repair_faulty_containers.py",
"sourcetype": "file",
"tags": ["cleanup", "repair", "containers"],
"title": "# Find and Repair Containers",
@ -830,7 +830,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\removeNamespaces.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\removeNamespaces.py",
"sourcetype": "file",
"tags": ["cleanup", "remove", "namespaces"],
"title": "# Remove Namespaces",
@ -838,7 +838,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\remove_user_defined_attributes.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\remove_user_defined_attributes.py",
"sourcetype": "file",
"tags": ["cleanup", "remove_user_defined_attributes"],
"title": "# Remove User Defined Attributes",
@ -846,7 +846,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\removeUnknownNodes.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\removeUnknownNodes.py",
"sourcetype": "file",
"tags": ["cleanup", "removeUnknownNodes"],
"title": "# Remove Unknown Nodes",
@ -854,7 +854,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\removeUnloadedReferences.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\removeUnloadedReferences.py",
"sourcetype": "file",
"tags": ["cleanup", "removeUnloadedReferences"],
"title": "# Remove Unloaded References",
@ -862,7 +862,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\removeReferencesFailedEdits.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\removeReferencesFailedEdits.py",
"sourcetype": "file",
"tags": ["cleanup", "removeReferencesFailedEdits"],
"title": "# Remove References Failed Edits",
@ -870,7 +870,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\remove_unused_looks.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\remove_unused_looks.py",
"sourcetype": "file",
"tags": ["cleanup", "removeUnusedLooks"],
"title": "# Remove Unused Looks",
@ -881,7 +881,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\uniqifyNodeNames.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\uniqifyNodeNames.py",
"sourcetype": "file",
"tags": ["cleanup", "uniqifyNodeNames"],
"title": "# Uniqify Node Names",
@ -889,7 +889,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\autoRenameFileNodes.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\autoRenameFileNodes.py",
"sourcetype": "file",
"tags": ["cleanup", "auto", "rename", "filenodes"],
"title": "# Auto Rename File Nodes",
@ -897,7 +897,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\update_asset_id.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\update_asset_id.py",
"sourcetype": "file",
"tags": ["cleanup", "update", "database", "asset", "id"],
"title": "# Update Asset ID",
@ -905,7 +905,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\ccRenameReplace.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\ccRenameReplace.py",
"sourcetype": "file",
"tags": ["cleanup", "rename", "ui"],
"title": "Renamer",
@ -913,7 +913,7 @@
},
{
"type": "action",
"command": "$PYPE_SCRIPTS\\cleanup\\renameShapesToTransform.py",
"command": "$OPENPYPE_SCRIPTS\\cleanup\\renameShapesToTransform.py",
"sourcetype": "file",
"tags": ["cleanup", "renameShapesToTransform"],
"title": "# Rename Shapes To Transform",

View file

@ -8,7 +8,8 @@ from pype.api import BuildWorkfile
import maya.cmds as cmds
self = sys.modules[__name__]
self._menu = os.environ.get('PYPE_STUDIO_NAME') or "Pype"
self._menu = os.environ.get("AVALON_LABEL")
log = logging.getLogger(__name__)

File diff suppressed because it is too large Load diff

View file

@ -274,7 +274,7 @@ class CreateRender(plugin.Creator):
# authentication token expired so we need to login to Muster
# again to get it. We use Pype API call to show login window.
api_url = "{}/muster/show_login".format(
os.environ["PYPE_WEBSERVER_URL"])
os.environ["OPENPYPE_WEBSERVER_URL"])
self.log.debug(api_url)
login_response = self._requests_get(api_url, timeout=1)
if login_response.status_code != 200:
@ -296,7 +296,7 @@ class CreateRender(plugin.Creator):
"""
if "verify" not in kwargs:
kwargs["verify"] = (
False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True
False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True
) # noqa
return requests.post(*args, **kwargs)
@ -315,6 +315,6 @@ class CreateRender(plugin.Creator):
"""
if "verify" not in kwargs:
kwargs["verify"] = (
False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True
False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True
) # noqa
return requests.get(*args, **kwargs)

View file

@ -191,7 +191,7 @@ class CreateVRayScene(plugin.Creator):
# authentication token expired so we need to login to Muster
# again to get it. We use Pype API call to show login window.
api_url = "{}/muster/show_login".format(
os.environ["PYPE_WEBSERVER_URL"])
os.environ["OPENPYPE_WEBSERVER_URL"])
self.log.debug(api_url)
login_response = self._requests_get(api_url, timeout=1)
if login_response.status_code != 200:
@ -213,7 +213,7 @@ class CreateVRayScene(plugin.Creator):
"""
if "verify" not in kwargs:
kwargs["verify"] = (
False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True
False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True
) # noqa
return requests.post(*args, **kwargs)
@ -232,6 +232,6 @@ class CreateVRayScene(plugin.Creator):
"""
if "verify" not in kwargs:
kwargs["verify"] = (
False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True
False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True
) # noqa
return requests.get(*args, **kwargs)

View file

@ -310,7 +310,7 @@ class MayaSubmitMuster(pyblish.api.InstancePlugin):
output_dir = instance.data["outputDir"]
metadata_path = os.path.join(output_dir, metadata_filename)
pype_root = os.environ["PYPE_SETUP_PATH"]
pype_root = os.environ["OPENPYPE_SETUP_PATH"]
# we must provide either full path to executable or use musters own
# python named MPython.exe, residing directly in muster bin
@ -509,7 +509,7 @@ class MayaSubmitMuster(pyblish.api.InstancePlugin):
environment[path] = os.environ[path]
environment["PATH"] = os.environ["PATH"]
# self.log.debug("enviro: {}".format(environment['PYPE_SCRIPTS']))
# self.log.debug("enviro: {}".format(environment['OPENPYPE_SCRIPTS']))
clean_environment = {}
for key, value in environment.items():
clean_path = ""
@ -559,5 +559,5 @@ class MayaSubmitMuster(pyblish.api.InstancePlugin):
of defense SSL is providing and it is not recommended.
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
return requests.post(*args, **kwargs)

View file

@ -85,7 +85,7 @@ class ValidateMusterConnection(pyblish.api.ContextPlugin):
Renew authentication token by logging into Muster
"""
api_url = "{}/muster/show_login".format(
os.environ["PYPE_WEBSERVER_URL"])
os.environ["OPENPYPE_WEBSERVER_URL"])
cls.log.debug(api_url)
response = cls._requests_get(api_url, timeout=1)
if response.status_code != 200:
@ -103,7 +103,7 @@ class ValidateMusterConnection(pyblish.api.ContextPlugin):
of defense SSL is providing and it is not recommended.
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
return requests.post(*args, **kwargs)
def _requests_get(self, *args, **kwargs):
@ -117,5 +117,5 @@ class ValidateMusterConnection(pyblish.api.ContextPlugin):
of defense SSL is providing and it is not recommended.
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
return requests.get(*args, **kwargs)

View file

@ -4,7 +4,7 @@ import pype.hosts.maya.api.lib as mlib
from maya import cmds
print("starting PYPE usersetup")
print("starting OpenPype usersetup")
# build a shelf
settings = get_project_settings(os.environ['AVALON_PROJECT'])
@ -14,7 +14,7 @@ shelf_preset = settings['maya'].get('project_shelf')
if shelf_preset:
project = os.environ["AVALON_PROJECT"]
icon_path = os.path.join(os.environ['PYPE_PROJECT_SCRIPTS'],
icon_path = os.path.join(os.environ['OPENPYPE_PROJECT_SCRIPTS'],
project, "icons")
icon_path = os.path.abspath(icon_path)
@ -26,4 +26,4 @@ if shelf_preset:
cmds.evalDeferred("mlib.shelf(name=shelf_preset['name'], iconPath=icon_path, preset=shelf_preset)")
print("finished PYPE usersetup")
print("finished OpenPype usersetup")

View file

@ -146,7 +146,7 @@ def create_unreal_project(project_name: str,
directory is not found in plugin folders as this indicates
this is only source distribution of the plugin. Dev mode
is also set by preset file `unreal/project_setup.json` in
**PYPE_CONFIG**.
**OPENPYPE_CONFIG**.
:type dev_mode: bool
:returns: None
"""
@ -180,17 +180,17 @@ def create_unreal_project(project_name: str,
}
if preset["install_unreal_python_engine"]:
# If `PYPE_UNREAL_ENGINE_PYTHON_PLUGIN` is set, copy it from there to
# support offline installation.
# If `OPENPYPE_UNREAL_ENGINE_PYTHON_PLUGIN` is set, copy it from there
# to support offline installation.
# Otherwise clone UnrealEnginePython to Plugins directory
# https://github.com/20tab/UnrealEnginePython.git
uep_path = os.path.join(plugins_path, "UnrealEnginePython")
if os.environ.get("PYPE_UNREAL_ENGINE_PYTHON_PLUGIN"):
if os.environ.get("OPENPYPE_UNREAL_ENGINE_PYTHON_PLUGIN"):
os.makedirs(uep_path, exist_ok=True)
dir_util._path_created = {}
dir_util.copy_tree(
os.environ.get("PYPE_UNREAL_ENGINE_PYTHON_PLUGIN"),
os.environ.get("OPENPYPE_UNREAL_ENGINE_PYTHON_PLUGIN"),
uep_path)
else:
# WARNING: this will trigger dev_mode, because we need to compile

View file

@ -9,7 +9,7 @@ import site
# add Python version specific vendor folder
site.addsitedir(
os.path.join(
os.getenv("PYPE_ROOT", ""),
os.getenv("OPENPYPE_ROOT", ""),
"vendor", "python", "python_{}".format(sys.version[0])))
from .terminal import Terminal
@ -106,7 +106,7 @@ from .local_settings import (
JSONSettingRegistry,
PypeSettingsRegistry,
get_local_site_id,
change_pype_mongo_url
change_openpype_mongo_url
)
from .path_tools import (
@ -219,7 +219,7 @@ __all__ = [
"JSONSettingRegistry",
"PypeSettingsRegistry",
"get_local_site_id",
"change_pype_mongo_url",
"change_openpype_mongo_url",
"timeit",

View file

@ -607,7 +607,7 @@ class AbstractSubmitDeadline(pyblish.api.InstancePlugin):
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
# add 10sec timeout before bailing out
kwargs['timeout'] = 10
return requests.post(*args, **kwargs)
@ -626,7 +626,7 @@ class AbstractSubmitDeadline(pyblish.api.InstancePlugin):
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
# add 10sec timeout before bailing out
kwargs['timeout'] = 10
return requests.get(*args, **kwargs)

View file

@ -156,7 +156,7 @@ class Anatomy:
return self._roots_obj
def root_environments(self):
"""Return PYPE_ROOT_* environments for current project in dict."""
"""Return OPENPYPE_ROOT_* environments for current project in dict."""
return self._roots_obj.root_environments()
def root_environmets_fill_data(self, template=None):
@ -181,7 +181,7 @@ class Anatomy:
return self.roots_obj.all_root_paths()
def set_root_environments(self):
"""Set PYPE_ROOT_* environments for current project."""
"""Set OPENPYPE_ROOT_* environments for current project."""
self._roots_obj.set_root_environments()
def root_names(self):
@ -320,7 +320,7 @@ class Anatomy:
"<{}>"
## Output
"<PYPE_PROJECT_ROOT_NAS>/project/asset/task/animation_v001.ma"
"<OPENPYPE_PROJECT_ROOT_NAS>/project/asset/task/animation_v001.ma"
Args:
filepath (str): Full file path where root should be replaced.
@ -1359,7 +1359,7 @@ class Roots:
anatomy Anatomy: Anatomy object created for a specific project.
"""
env_prefix = "PYPE_PROJECT_ROOT"
env_prefix = "OPENPYPE_PROJECT_ROOT"
roots_filename = "roots.json"
def __init__(self, anatomy):
@ -1465,7 +1465,8 @@ class Roots:
def root_environments(self):
"""Use root keys to create unique keys for environment variables.
Concatenates prefix "PYPE_ROOT" with root keys to create unique keys.
Concatenates prefix "OPENPYPE_ROOT" with root keys to create unique
keys.
Returns:
dict: Result is `{(str): (str)}` dicitonary where key represents
@ -1487,13 +1488,13 @@ class Roots:
Result on windows platform::
{
"PYPE_ROOT_WORK": "P:/projects/work",
"PYPE_ROOT_PUBLISH": "P:/projects/publish"
"OPENPYPE_ROOT_WORK": "P:/projects/work",
"OPENPYPE_ROOT_PUBLISH": "P:/projects/publish"
}
Short example when multiroot is not used::
{
"PYPE_ROOT": "P:/projects"
"OPENPYPE_ROOT": "P:/projects"
}
"""
return self._root_environments()

View file

@ -1187,7 +1187,7 @@ def _prepare_last_workfile(data, workdir):
file_template = anatomy.templates["work"]["file"]
workdir_data.update({
"version": 1,
"user": os.environ.get("PYPE_USERNAME") or getpass.getuser(),
"user": os.environ.get("OPENPYPE_USERNAME") or getpass.getuser(),
"ext": extensions[0]
})

View file

@ -1153,7 +1153,7 @@ def get_creator_by_name(creator_name, case_sensitive=False):
@with_avalon
def change_timer_to_current_context():
"""Called after context change to change timers"""
webserver_url = os.environ.get("PYPE_WEBSERVER_URL")
webserver_url = os.environ.get("OPENPYPE_WEBSERVER_URL")
if not webserver_url:
log.warning("Couldn't find webserver url")
return

View file

@ -150,13 +150,13 @@ def get_pype_execute_args(*args):
It is possible to pass any arguments that will be added after pype
executables.
"""
pype_executable = os.environ["PYPE_EXECUTABLE"]
pype_executable = os.environ["OPENPYPE_EXECUTABLE"]
pype_args = [pype_executable]
executable_filename = os.path.basename(pype_executable)
if "python" in executable_filename.lower():
pype_args.append(
os.path.join(os.environ["PYPE_ROOT"], "start.py")
os.path.join(os.environ["OPENPYPE_ROOT"], "start.py")
)
if args:

View file

@ -8,7 +8,7 @@ log = Logger().get_logger(__name__)
def discover_host_vendor_module(module_name):
host = os.environ["AVALON_APP"]
pype_root = os.environ["PYPE_ROOT"]
pype_root = os.environ["OPENPYPE_ROOT"]
main_module = module_name.split(".")[0]
module_path = os.path.join(
pype_root, "hosts", host, "vendor", main_module)

View file

@ -213,7 +213,7 @@ class IniSettingRegistry(ASettingRegistry):
# type: (str, str) -> IniSettingRegistry
super(IniSettingRegistry, self).__init__(name)
# get registry file
version = os.getenv("PYPE_VERSION", "N/A")
version = os.getenv("OPENPYPE_VERSION", "N/A")
self._registry_file = os.path.join(path, "{}.ini".format(name))
if not os.path.exists(self._registry_file):
with open(self._registry_file, mode="w") as cfg:
@ -369,7 +369,7 @@ class JSONSettingRegistry(ASettingRegistry):
now = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
header = {
"__metadata__": {
"pype-version": os.getenv("PYPE_VERSION", "N/A"),
"pype-version": os.getenv("OPENPYPE_VERSION", "N/A"),
"generated": now
},
"registry": {}
@ -496,10 +496,10 @@ def get_local_site_id():
return _create_local_site_id()
def change_pype_mongo_url(new_mongo_url):
def change_openpype_mongo_url(new_mongo_url):
"""Change mongo url in pype registry.
Change of Pype mongo URL require restart of running pype processes or
Change of OpenPype mongo URL require restart of running pype processes or
processes using pype.
"""

View file

@ -1,11 +1,11 @@
"""
Logging to console and to mongo. For mongo logging, you need to set either
``PYPE_LOG_MONGO_URL`` to something like:
``OPENPYPE_LOG_MONGO_URL`` to something like:
.. example::
mongo://user:password@hostname:port/database/collection?authSource=avalon
or set ``PYPE_LOG_MONGO_HOST`` and other variables.
or set ``OPENPYPE_LOG_MONGO_HOST`` and other variables.
See :func:`_mongo_settings`
Best place for it is in ``repos/pype-config/environments/global.json``
@ -207,7 +207,7 @@ class PypeLogger:
# Collection name under database in Mongo
log_collection_name = "logs"
# PYPE_DEBUG
# OPENPYPE_DEBUG
pype_debug = 0
# Data same for all record documents
@ -335,7 +335,7 @@ class PypeLogger:
# like Ftrack event server has 3 other subprocesses that should
# use same mongo id
if use_mongo_logging:
mongo_id = os.environ.pop("PYPE_PROCESS_MONGO_ID", None)
mongo_id = os.environ.pop("OPENPYPE_PROCESS_MONGO_ID", None)
if not mongo_id:
# Create new object id
mongo_id = ObjectId()
@ -347,11 +347,11 @@ class PypeLogger:
# Store result to class definition
cls.use_mongo_logging = use_mongo_logging
# Define if is in PYPE_DEBUG mode
cls.pype_debug = int(os.getenv("PYPE_DEBUG") or "0")
# Define if is in OPENPYPE_DEBUG mode
cls.pype_debug = int(os.getenv("OPENPYPE_DEBUG") or "0")
# Mongo URL where logs will be stored
cls.log_mongo_url = os.environ.get("PYPE_MONGO")
cls.log_mongo_url = os.environ.get("OPENPYPE_MONGO")
if not cls.log_mongo_url:
cls.use_mongo_logging = False

View file

@ -77,7 +77,7 @@ def compose_url(scheme=None,
def get_default_components():
mongo_url = os.environ.get("PYPE_MONGO")
mongo_url = os.environ.get("OPENPYPE_MONGO")
if mongo_url is None:
raise MongoEnvNotSet(
"URL for Mongo logging connection is not set."
@ -139,7 +139,7 @@ class PypeMongoConnection:
@staticmethod
def get_default_mongo_url():
return os.environ["PYPE_MONGO"]
return os.environ["OPENPYPE_MONGO"]
@classmethod
def get_mongo_client(cls, mongo_url=None):

View file

@ -235,7 +235,7 @@ def oiio_supported():
Returns:
(bool)
"""
oiio_path = os.getenv("PYPE_OIIO_PATH", "")
oiio_path = os.getenv("OPENPYPE_OIIO_PATH", "")
if not oiio_path or not os.path.exists(oiio_path):
log.debug("OIIOTool is not configured or not present at {}".
format(oiio_path))
@ -269,7 +269,7 @@ def decompress(target_dir, file_url,
(int(input_frame_end) > int(input_frame_start))
oiio_cmd = []
oiio_cmd.append(os.getenv("PYPE_OIIO_PATH"))
oiio_cmd.append(os.getenv("OPENPYPE_OIIO_PATH"))
oiio_cmd.append("--compression none")
@ -328,7 +328,7 @@ def should_decompress(file_url):
"""
if oiio_supported():
output = run_subprocess([
os.getenv("PYPE_OIIO_PATH"),
os.getenv("OPENPYPE_OIIO_PATH"),
"--info", "-v", file_url])
return "compression: \"dwaa\"" in output or \
"compression: \"dwab\"" in output

View file

@ -28,8 +28,8 @@ def get_pype_info():
"version": get_pype_version(),
"version_type": version_type,
"executable": executable_args[-1],
"pype_root": os.environ["PYPE_ROOT"],
"mongo_url": os.environ["PYPE_MONGO"]
"pype_root": os.environ["OPENPYPE_ROOT"],
"mongo_url": os.environ["OPENPYPE_MONGO"]
}

View file

@ -21,7 +21,7 @@ class Terminal:
If :mod:`Colorama` is not found, it will still work, but without colors.
Depends on :mod:`Colorama`
Using **PYPE_LOG_NO_COLORS** environment variable.
Using **OPENPYPE_LOG_NO_COLORS** environment variable.
"""
# Is Terminal initialized
@ -38,7 +38,8 @@ class Terminal:
"""Initialize Terminal class as object.
First check if colorized output is disabled by environment variable
`PYPE_LOG_NO_COLORS` value. By default is colorized output turned on.
`OPENPYPE_LOG_NO_COLORS` value. By default is colorized output turned
on.
Then tries to import python module that do the colors magic and create
it's terminal object. Colorized output is not used if import of python
@ -49,7 +50,7 @@ class Terminal:
from pype.lib import env_value_to_bool
use_colors = env_value_to_bool(
"PYPE_LOG_NO_COLORS", default=Terminal.use_colors
"OPENPYPE_LOG_NO_COLORS", default=Terminal.use_colors
)
if not use_colors:
Terminal.use_colors = use_colors
@ -166,7 +167,7 @@ class Terminal:
def log(message):
"""Return color formatted message.
If environment variable `PYPE_LOG_NO_COLORS` is set to
If environment variable `OPENPYPE_LOG_NO_COLORS` is set to
whatever value, message will be formatted but not colorized.
Args:

View file

@ -23,7 +23,7 @@ class AvalonModule(PypeModule, ITrayModule, IWebServerRoutes):
avalon_mongo_url = avalon_settings["AVALON_MONGO"]
# Use pype mongo if Avalon's mongo not defined
if not avalon_mongo_url:
avalon_mongo_url = os.environ["PYPE_MONGO"]
avalon_mongo_url = os.environ["OPENPYPE_MONGO"]
thumbnail_root = os.environ.get("AVALON_THUMBNAIL_ROOT")
if not thumbnail_root:

View file

@ -64,9 +64,9 @@ class AfterEffectsSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
"AVALON_ASSET",
"AVALON_TASK",
"AVALON_APP_NAME",
"PYPE_USERNAME",
"PYPE_DEV",
"PYPE_LOG_NO_COLORS"
"OPENPYPE_USERNAME",
"OPENPYPE_DEV",
"OPENPYPE_LOG_NO_COLORS"
]
environment = dict({key: os.environ[key] for key in keys

View file

@ -273,9 +273,9 @@ class HarmonySubmitDeadline(
"AVALON_ASSET",
"AVALON_TASK",
"AVALON_APP_NAME",
"PYPE_USERNAME",
"PYPE_DEV",
"PYPE_LOG_NO_COLORS"
"OPENPYPE_USERNAME",
"OPENPYPE_DEV",
"OPENPYPE_LOG_NO_COLORS"
]
environment = dict({key: os.environ[key] for key in keys

View file

@ -441,15 +441,15 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
"AVALON_ASSET",
"AVALON_TASK",
"AVALON_APP_NAME",
"PYPE_USERNAME",
"PYPE_DEV",
"PYPE_LOG_NO_COLORS"
"OPENPYPE_USERNAME",
"OPENPYPE_DEV",
"OPENPYPE_LOG_NO_COLORS"
]
environment = dict({key: os.environ[key] for key in keys
if key in os.environ}, **api.Session)
environment["PYPE_LOG_NO_COLORS"] = "1"
environment["PYPE_MAYA_VERSION"] = cmds.about(v=True)
environment["OPENPYPE_LOG_NO_COLORS"] = "1"
environment["OPENPYPE_MAYA_VERSION"] = cmds.about(v=True)
# to recognize job from PYPE for turning Event On/Off
environment["OPENPYPE_RENDER_JOB"] = "1"
self.payload_skeleton["JobInfo"].update({
@ -858,20 +858,20 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
envs.append(
"AVALON_APP_NAME={}".format(os.environ.get("AVALON_APP_NAME")))
envs.append(
"PYPE_ASS_EXPORT_RENDER_LAYER={}".format(data["renderlayer"]))
"OPENPYPE_ASS_EXPORT_RENDER_LAYER={}".format(data["renderlayer"]))
envs.append(
"PYPE_ASS_EXPORT_SCENE_FILE={}".format(data["filepath"]))
"OPENPYPE_ASS_EXPORT_SCENE_FILE={}".format(data["filepath"]))
envs.append(
"PYPE_ASS_EXPORT_OUTPUT={}".format(
"OPENPYPE_ASS_EXPORT_OUTPUT={}".format(
payload['JobInfo']['OutputFilename0']))
envs.append(
"PYPE_ASS_EXPORT_START={}".format(
"OPENPYPE_ASS_EXPORT_START={}".format(
int(self._instance.data["frameStartHandle"])))
envs.append(
"PYPE_ASS_EXPORT_END={}".format(
"OPENPYPE_ASS_EXPORT_END={}".format(
int(self._instance.data["frameEndHandle"])))
envs.append(
"PYPE_ASS_EXPORT_STEP={}".format(1))
"OPENPYPE_ASS_EXPORT_STEP={}".format(1))
i = 0
for e in envs:
@ -984,7 +984,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
# add 10sec timeout before bailing out
kwargs['timeout'] = 10
return requests.post(*args, **kwargs)
@ -1003,7 +1003,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
# add 10sec timeout before bailing out
kwargs['timeout'] = 10
return requests.get(*args, **kwargs)

View file

@ -237,7 +237,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin):
"PYBLISHPLUGINPATH",
"NUKE_PATH",
"TOOL_ENV",
"PYPE_DEV",
"OPENPYPE_DEV",
"FOUNDRY_LICENSE"
]
environment = dict({key: os.environ[key] for key in keys

View file

@ -114,14 +114,15 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
"FTRACK_API_USER",
"FTRACK_API_KEY",
"FTRACK_SERVER",
"PYPE_METADATA_FILE",
"OPENPYPE_METADATA_FILE",
"AVALON_PROJECT",
"AVALON_ASSET",
"AVALON_TASK",
"AVALON_APP_NAME",
"OPENPYPE_PUBLISH_JOB"
"PYPE_LOG_NO_COLORS",
"PYPE_USERNAME",
"OPENPYPE_LOG_NO_COLORS",
"OPENPYPE_USERNAME",
"OPENPYPE_RENDER_JOB",
"OPENPYPE_PUBLISH_JOB"
]
@ -223,8 +224,8 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
environment["AVALON_ASSET"] = io.Session["AVALON_ASSET"]
environment["AVALON_TASK"] = io.Session["AVALON_TASK"]
environment["AVALON_APP_NAME"] = os.environ.get("AVALON_APP_NAME")
environment["PYPE_LOG_NO_COLORS"] = "1"
environment["PYPE_USERNAME"] = instance.context.data["user"]
environment["OPENPYPE_LOG_NO_COLORS"] = "1"
environment["OPENPYPE_USERNAME"] = instance.context.data["user"]
environment["OPENPYPE_PUBLISH_JOB"] = "1"
environment["OPENPYPE_RENDER_JOB"] = "0"
@ -1048,4 +1049,4 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
# Directory
publish_folder = os.path.dirname(file_path)
return publish_folder
return publish_folder

View file

@ -44,5 +44,5 @@ class ValidateDeadlineConnection(pyblish.api.ContextPlugin):
of defense SSL is providing and it is not recommended.
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
return requests.get(*args, **kwargs)

View file

@ -26,7 +26,7 @@ class AppplicationsAction(BaseAction):
type = "Application"
label = "Application action"
identifier = "pype_app.{}.".format(str(uuid4()))
icon_url = os.environ.get("PYPE_STATICS_SERVER")
icon_url = os.environ.get("OPENPYPE_STATICS_SERVER")
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

View file

@ -12,7 +12,7 @@ from pype.lib import get_pype_execute_args
class SocketThread(threading.Thread):
"""Thread that checks suprocess of storer of processor of events"""
MAX_TIMEOUT = int(os.environ.get("PYPE_FTRACK_SOCKET_TIMEOUT", 45))
MAX_TIMEOUT = int(os.environ.get("OPENPYPE_FTRACK_SOCKET_TIMEOUT", 45))
def __init__(self, name, port, filepath, additional_args=[]):
super(SocketThread, self).__init__()
@ -57,7 +57,7 @@ class SocketThread(threading.Thread):
)
env = os.environ.copy()
env["PYPE_PROCESS_MONGO_ID"] = str(Logger.mongo_process_id)
env["OPENPYPE_PROCESS_MONGO_ID"] = str(Logger.mongo_process_id)
# Pype executable (with path to start script if not build)
args = get_pype_execute_args(
# Add `run` command

View file

@ -3,7 +3,7 @@ from .ftrack_base_handler import BaseHandler
def statics_icon(*icon_statics_file_parts):
statics_server = os.environ.get("PYPE_STATICS_SERVER")
statics_server = os.environ.get("OPENPYPE_STATICS_SERVER")
if not statics_server:
return None
return "/".join((statics_server, *icon_statics_file_parts))

View file

@ -8,7 +8,7 @@ class ValidateFtrackAttributes(pyblish.api.InstancePlugin):
Attributes to be validated are specified in:
`$PYPE_CONFIG/presets/<host>/ftrack_attributes.json`
`$OPENPYPE_CONFIG/presets/<host>/ftrack_attributes.json`
This is array (list) of checks in format:
[

View file

@ -153,5 +153,5 @@ class MusterModule(PypeModule, ITrayModule, IWebServerRoutes):
of defense SSL is providing and it is not recommended.
"""
if 'verify' not in kwargs:
kwargs['verify'] = False if os.getenv("PYPE_DONT_VERIFY_SSL", True) else True # noqa
kwargs['verify'] = False if os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) else True # noqa
return requests.post(*args, **kwargs)

View file

@ -221,7 +221,7 @@ class TimersManager(PypeModule, ITrayService, IIdleManager, IWebServerRoutes):
def change_timer_from_host(self, project_name, asset_name, task_name):
"""Prepared method for calling change timers on REST api"""
webserver_url = os.environ.get("PYPE_WEBSERVER_URL")
webserver_url = os.environ.get("OPENPYPE_WEBSERVER_URL")
if not webserver_url:
self.log.warning("Couldn't find webserver url")
return

View file

@ -29,7 +29,7 @@ class UserModule(PypeModule, ITrayModule, IWebServerRoutes):
appdirs.user_data_dir('pype-app', 'pype')
)
cred_filename = 'user_info.json'
env_name = "PYPE_USERNAME"
env_name = "OPENPYPE_USERNAME"
name = "user"

View file

@ -49,8 +49,8 @@ class WebServerModule(PypeModule, ITrayService):
self.server_manager.add_static(static_prefix, resources.RESOURCES_DIR)
webserver_url = "http://localhost:{}".format(self.port)
os.environ["PYPE_WEBSERVER_URL"] = webserver_url
os.environ["PYPE_STATICS_SERVER"] = "{}{}".format(
os.environ["OPENPYPE_WEBSERVER_URL"] = webserver_url
os.environ["OPENPYPE_STATICS_SERVER"] = "{}{}".format(
webserver_url, static_prefix
)

View file

@ -11,7 +11,7 @@ class CollectCurrentUserPype(pyblish.api.ContextPlugin):
label = "Collect Pype User"
def process(self, context):
user = os.getenv("PYPE_USERNAME", "").strip()
user = os.getenv("OPENPYPE_USERNAME", "").strip()
if not user:
user = context.data.get("user", getpass.getuser())

View file

@ -17,7 +17,7 @@ from avalon import api
class CollectRenderedFiles(pyblish.api.ContextPlugin):
"""
This collector will try to find json files in provided
`PYPE_PUBLISH_DATA`. Those files _MUST_ share same context.
`OPENPYPE_PUBLISH_DATA`. Those files _MUST_ share same context.
"""
order = pyblish.api.CollectorOrder - 0.2
@ -113,9 +113,9 @@ class CollectRenderedFiles(pyblish.api.ContextPlugin):
def process(self, context):
self._context = context
assert os.environ.get("PYPE_PUBLISH_DATA"), (
"Missing `PYPE_PUBLISH_DATA`")
paths = os.environ["PYPE_PUBLISH_DATA"].split(os.pathsep)
assert os.environ.get("OPENPYPE_PUBLISH_DATA"), (
"Missing `OPENPYPE_PUBLISH_DATA`")
paths = os.environ["OPENPYPE_PUBLISH_DATA"].split(os.pathsep)
project_name = os.environ.get("AVALON_PROJECT")
if project_name is None:

View file

@ -45,7 +45,7 @@ class ExtractScanlineExr(pyblish.api.InstancePlugin):
stagingdir = os.path.normpath(repre.get("stagingDir"))
oiio_tool_path = os.getenv("PYPE_OIIO_PATH", "")
oiio_tool_path = os.getenv("OPENPYPE_OIIO_PATH", "")
if not os.path.exists(oiio_tool_path):
self.log.error(
"OIIO tool not found in {}".format(oiio_tool_path))

View file

@ -79,7 +79,7 @@ class PypeCommands:
pyblish.api.register_target("filesequence")
pyblish.api.register_host("shell")
os.environ["PYPE_PUBLISH_DATA"] = os.pathsep.join(paths)
os.environ["OPENPYPE_PUBLISH_DATA"] = os.pathsep.join(paths)
log.info("Running publish ...")

View file

@ -32,7 +32,7 @@ def get_liberation_font_path(bold=False, italic=False):
def pype_icon_filepath(debug=None):
if debug is None:
debug = bool(os.getenv("PYPE_DEV"))
debug = bool(os.getenv("OPENPYPE_DEV"))
if debug:
icon_file_name = "openpype_icon_staging.png"
@ -43,7 +43,7 @@ def pype_icon_filepath(debug=None):
def pype_splash_filepath(debug=None):
if debug is None:
debug = bool(os.getenv("PYPE_DEV"))
debug = bool(os.getenv("OPENPYPE_DEV"))
if debug:
splash_file_name = "openpype_splash_staging.png"

View file

@ -1,4 +1,8 @@
"""This module is used for command line exporting of ASS files."""
"""This module is used for command line exporting of ASS files.
WARNING:
This need to be rewriten to be able use it in Pype 3!
"""
import os
import argparse
@ -45,10 +49,10 @@ def __main__():
auto_pype_root = os.path.dirname(os.path.abspath(__file__))
auto_pype_root = os.path.abspath(auto_pype_root + "../../../../..")
auto_pype_root = os.environ.get('PYPE_SETUP_PATH') or auto_pype_root
if os.environ.get('PYPE_SETUP_PATH'):
auto_pype_root = os.environ.get('OPENPYPE_SETUP_PATH') or auto_pype_root
if os.environ.get('OPENPYPE_SETUP_PATH'):
print("Got Pype location from environment: {}".format(
os.environ.get('PYPE_SETUP_PATH')))
os.environ.get('OPENPYPE_SETUP_PATH')))
pype_command = "pype.ps1"
if platform.system().lower() == "linux":
@ -74,7 +78,7 @@ def __main__():
print("Set pype root to: {}".format(pype_root))
print("Paths: {}".format(kwargs.paths or [os.getcwd()]))
# paths = kwargs.paths or [os.environ.get("PYPE_METADATA_FILE")] or [os.getcwd()] # noqa
# paths = kwargs.paths or [os.environ.get("OPENPYPE_METADATA_FILE")] or [os.getcwd()] # noqa
mayabatch = os.environ.get("AVALON_APP_NAME").replace("maya", "mayabatch")
args = [

View file

@ -12,12 +12,12 @@ Attributes:
*/
$scene_file=`getenv "PYPE_ASS_EXPORT_SCENE_FILE"`;
$step=`getenv "PYPE_ASS_EXPORT_STEP"`;
$start=`getenv "PYPE_ASS_EXPORT_START"`;
$end=`getenv "PYPE_ASS_EXPORT_END"`;
$file_path=`getenv "PYPE_ASS_EXPORT_OUTPUT"`;
$render_layer = `getenv "PYPE_ASS_EXPORT_RENDER_LAYER"`;
$scene_file=`getenv "OPENPYPE_ASS_EXPORT_SCENE_FILE"`;
$step=`getenv "OPENPYPE_ASS_EXPORT_STEP"`;
$start=`getenv "OPENPYPE_ASS_EXPORT_START"`;
$end=`getenv "OPENPYPE_ASS_EXPORT_END"`;
$file_path=`getenv "OPENPYPE_ASS_EXPORT_OUTPUT"`;
$render_layer = `getenv "OPENPYPE_ASS_EXPORT_RENDER_LAYER"`;
print("*** ASS Export Plugin\n");

View file

@ -1,38 +0,0 @@
import os
import subprocess
import platform
import argparse
def __main__():
parser = argparse.ArgumentParser()
parser.add_argument("--paths",
nargs="*",
default=[],
help="The filepaths to publish. This can be a "
"directory or a path to a .json publish "
"configuration.")
kwargs, args = parser.parse_known_args()
pype_root = os.environ.get("PYPE_SETUP_PATH")
if not pype_root:
raise Exception("PYPE_SETUP_PATH is not set")
# TODO: set correct path
pype_command = "pype.ps1"
if platform.system().lower() == "linux":
pype_command = "pype"
args = [os.path.join(pype_root, pype_command),
"--node", "--publish", "--paths", kwargs.paths]
# if we are using windows, run powershell command directly to support
# UNC paths.
if platform.system().lower() == "windows":
args = ["powershell", "-NoProfile", "-noexit", "-nologo",
"-executionPolicy bypass", "-command",
'"{}; exit $LASTEXITCODE"'.format(" ".join(args))]
print('>>> running pype ...')
p = subprocess.call(args, shell=True)
print('<<< done [ {} ]'.format(p.returncode))

View file

@ -1,97 +0,0 @@
"""This module is used for command line publishing of image sequences."""
import os
import sys
import argparse
import logging
import subprocess
import platform
import json
try:
from shutil import which
except ImportError:
# we are in python < 3.3
def which(command):
path = os.getenv('PATH')
for p in path.split(os.path.pathsep):
p = os.path.join(p, command)
if os.path.exists(p) and os.access(p, os.X_OK):
return p
handler = logging.basicConfig()
log = logging.getLogger("Publish Image Sequences")
log.setLevel(logging.DEBUG)
error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}"
def __main__():
parser = argparse.ArgumentParser()
parser.add_argument("--paths",
nargs="*",
default=[],
help="The filepaths to publish. This can be a "
"directory or a path to a .json publish "
"configuration.")
parser.add_argument("--gui",
default=False,
action="store_true",
help="Whether to run Pyblish in GUI mode.")
parser.add_argument("--pype", help="Pype root")
kwargs, args = parser.parse_known_args()
print("Running pype ...")
auto_pype_root = os.path.dirname(os.path.abspath(__file__))
auto_pype_root = os.path.abspath(auto_pype_root + "../../../../..")
auto_pype_root = os.environ.get('PYPE_SETUP_PATH') or auto_pype_root
if os.environ.get('PYPE_SETUP_PATH'):
print("Got Pype location from environment: {}".format(
os.environ.get('PYPE_SETUP_PATH')))
pype_command = "pype.ps1"
if platform.system().lower() == "linux":
pype_command = "pype"
elif platform.system().lower() == "windows":
pype_command = "pype.bat"
if kwargs.pype:
pype_root = kwargs.pype
else:
# test if pype.bat / pype is in the PATH
# if it is, which() will return its path and we use that.
# if not, we use auto_pype_root path. Caveat of that one is
# that it can be UNC path and that will not work on windows.
pype_path = which(pype_command)
if pype_path:
pype_root = os.path.dirname(pype_path)
else:
pype_root = auto_pype_root
print("Set pype root to: {}".format(pype_root))
print("Paths: {}".format(kwargs.paths or [os.getcwd()]))
paths = kwargs.paths or [os.environ.get("PYPE_METADATA_FILE")] or [os.getcwd()] # noqa
args = [
os.path.join(pype_root, pype_command),
"publish",
" ".join(['"{}"'.format(p) for p in paths])
]
print("Pype command: {}".format(" ".join(args)))
# Forcing forwaring the environment because environment inheritance does
# not always work.
# Cast all values in environment to str to be safe
env = {k: str(v) for k, v in os.environ.items()}
exit_code = subprocess.call(args, env=env)
if exit_code != 0:
raise RuntimeError("Publishing failed.")
if __name__ == '__main__':
__main__()

View file

@ -6,9 +6,9 @@
"host_name": "maya",
"environment": {
"PYTHONPATH": [
"{PYPE_ROOT}/pype/hosts/maya/startup",
"{PYPE_REPOS_ROOT}/avalon-core/setup/maya",
"{PYPE_REPOS_ROOT}/maya-look-assigner",
"{OPENPYPE_ROOT}/pype/hosts/maya/startup",
"{OPENPYPE_REPOS_ROOT}/avalon-core/setup/maya",
"{OPENPYPE_REPOS_ROOT}/maya-look-assigner",
"{PYTHONPATH}"
],
"MAYA_DISABLE_CLIC_IPM": "Yes",
@ -16,7 +16,7 @@
"MAYA_DISABLE_CER": "Yes",
"PYMEL_SKIP_MEL_INIT": "Yes",
"LC_ALL": "C",
"PYPE_LOG_NO_COLORS": "Yes"
"OPENPYPE_LOG_NO_COLORS": "Yes"
},
"variants": {
"maya_2020": {
@ -91,8 +91,8 @@
"host_name": "maya",
"environment": {
"PYTHONPATH": [
"{PYPE_REPOS_ROOT}/avalon-core/setup/maya",
"{PYPE_REPOS_ROOT}/maya-look-assigner",
"{OPENPYPE_REPOS_ROOT}/avalon-core/setup/maya",
"{OPENPYPE_REPOS_ROOT}/maya-look-assigner",
"{PYTHON_ENV}/python2/Lib/site-packages",
"{PYTHONPATH}"
],
@ -101,7 +101,7 @@
"MAYA_DISABLE_CER": "Yes",
"PYMEL_SKIP_MEL_INIT": "Yes",
"LC_ALL": "C",
"PYPE_LOG_NO_COLORS": "Yes",
"OPENPYPE_LOG_NO_COLORS": "Yes",
"MAYA_TEST": "{MAYA_VERSION}"
},
"variants": {
@ -171,9 +171,9 @@
"host_name": "nuke",
"environment": {
"NUKE_PATH": [
"{PYPE_REPOS_ROOT}/avalon-core/setup/nuke/nuke_path",
"{PYPE_ROOT}/pype/hosts/nuke/startup",
"{PYPE_STUDIO_PLUGINS}/nuke"
"{OPENPYPE_REPOS_ROOT}/avalon-core/setup/nuke/nuke_path",
"{OPENPYPE_ROOT}/pype/hosts/nuke/startup",
"{OPENPYPE_STUDIO_PLUGINS}/nuke"
],
"PATH": {
"windows": "C:/Program Files (x86)/QuickTime/QTSystem/;{PATH}"
@ -264,9 +264,9 @@
"host_name": "nuke",
"environment": {
"NUKE_PATH": [
"{PYPE_REPOS_ROOT}/avalon-core/setup/nuke/nuke_path",
"{PYPE_ROOT}/pype/hosts/nuke/startup",
"{PYPE_STUDIO_PLUGINS}/nuke"
"{OPENPYPE_REPOS_ROOT}/avalon-core/setup/nuke/nuke_path",
"{OPENPYPE_ROOT}/pype/hosts/nuke/startup",
"{OPENPYPE_STUDIO_PLUGINS}/nuke"
],
"PATH": {
"windows": "C:/Program Files (x86)/QuickTime/QTSystem/;{PATH}"
@ -381,7 +381,7 @@
"host_name": "hiero",
"environment": {
"HIERO_PLUGIN_PATH": [
"{PYPE_ROOT}/pype/hosts/hiero/startup"
"{OPENPYPE_ROOT}/pype/hosts/hiero/startup"
],
"PATH": {
"windows": "C:/Program Files (x86)/QuickTime/QTSystem/;{PATH}"
@ -496,7 +496,7 @@
"host_name": "hiero",
"environment": {
"HIERO_PLUGIN_PATH": [
"{PYPE_ROOT}/pype/hosts/hiero/startup"
"{OPENPYPE_ROOT}/pype/hosts/hiero/startup"
],
"PATH": {
"windows": "C:/Program Files (x86)/QuickTime/QTSystem/;{PATH}"
@ -633,7 +633,7 @@
"{PYTHON36}/Scripts",
"{PATH}"
],
"PYPE_LOG_NO_COLORS": "Yes"
"OPENPYPE_LOG_NO_COLORS": "Yes"
},
"variants": {
"fusion_16": {
@ -709,8 +709,8 @@
"{PYTHON36_RESOLVE}/Scripts",
"{PATH}"
],
"PRE_PYTHON_SCRIPT": "{PYPE_ROOT}/pype/resolve/preload_console.py",
"PYPE_LOG_NO_COLORS": "True",
"PRE_PYTHON_SCRIPT": "{OPENPYPE_ROOT}/pype/resolve/preload_console.py",
"OPENPYPE_LOG_NO_COLORS": "True",
"RESOLVE_DEV": "True"
},
"variants": {
@ -740,14 +740,14 @@
"host_name": "houdini",
"environment": {
"HOUDINI_PATH": {
"darwin": "{PYPE_ROOT}/pype/hosts/houdini/startup:&",
"linux": "{PYPE_ROOT}/pype/hosts/houdini/startup:&",
"windows": "{PYPE_ROOT}/pype/hosts/houdini/startup;&"
"darwin": "{OPENPYPE_ROOT}/pype/hosts/houdini/startup:&",
"linux": "{OPENPYPE_ROOT}/pype/hosts/houdini/startup:&",
"windows": "{OPENPYPE_ROOT}/pype/hosts/houdini/startup;&"
},
"HOUDINI_MENU_PATH": {
"darwin": "{PYPE_ROOT}/pype/hosts/houdini/startup:&",
"linux": "{PYPE_ROOT}/pype/hosts/houdini/startup:&",
"windows": "{PYPE_ROOT}/pype/hosts/houdini/startup;&"
"darwin": "{OPENPYPE_ROOT}/pype/hosts/houdini/startup:&",
"linux": "{OPENPYPE_ROOT}/pype/hosts/houdini/startup:&",
"windows": "{OPENPYPE_ROOT}/pype/hosts/houdini/startup;&"
}
},
"variants": {
@ -806,9 +806,9 @@
"icon": "{}/app_icons/blender.png",
"host_name": "blender",
"environment": {
"BLENDER_USER_SCRIPTS": "{PYPE_REPOS_ROOT}/avalon-core/setup/blender",
"BLENDER_USER_SCRIPTS": "{OPENPYPE_REPOS_ROOT}/avalon-core/setup/blender",
"PYTHONPATH": [
"{PYPE_REPOS_ROOT}/avalon-core/setup/blender",
"{OPENPYPE_REPOS_ROOT}/avalon-core/setup/blender",
"{PYTHONPATH}"
],
"CREATE_NEW_CONSOLE": "yes"
@ -869,7 +869,7 @@
"host_name": "harmony",
"environment": {
"AVALON_HARMONY_WORKFILES_ON_LAUNCH": "1",
"LIB_OPENHARMONY_PATH": "{PYPE_ROOT}/pype/vendor/OpenHarmony"
"LIB_OPENHARMONY_PATH": "{OPENPYPE_ROOT}/pype/vendor/OpenHarmony"
},
"variants": {
"harmony_20": {
@ -912,7 +912,7 @@
"icon": "{}/app_icons/tvpaint.png",
"host_name": "tvpaint",
"environment": {
"PYPE_LOG_NO_COLORS": "True"
"OPENPYPE_LOG_NO_COLORS": "True"
},
"variants": {
"tvpaint_animation_11-64bits": {
@ -958,7 +958,7 @@
"host_name": "photoshop",
"environment": {
"AVALON_PHOTOSHOP_WORKFILES_ON_LAUNCH": "1",
"PYPE_LOG_NO_COLORS": "Yes",
"OPENPYPE_LOG_NO_COLORS": "Yes",
"WEBSOCKET_URL": "ws://localhost:8099/ws/",
"WORKFILES_SAVE_AS": "Yes"
},
@ -1006,7 +1006,7 @@
"host_name": "aftereffects",
"environment": {
"AVALON_AFTEREFFECTS_WORKFILES_ON_LAUNCH": "1",
"PYPE_LOG_NO_COLORS": "Yes",
"OPENPYPE_LOG_NO_COLORS": "Yes",
"WEBSOCKET_URL": "ws://localhost:8097/ws/",
"WORKFILES_SAVE_AS": "Yes"
},
@ -1053,7 +1053,7 @@
"icon": "app_icons/celaction.png",
"host_name": "celaction",
"environment": {
"CELACTION_TEMPLATE": "{PYPE_ROOT}/pype/hosts/celaction/celaction_template_scene.scn"
"CELACTION_TEMPLATE": "{OPENPYPE_ROOT}/pype/hosts/celaction/celaction_template_scene.scn"
},
"variants": {
"celation_Local": {
@ -1075,8 +1075,8 @@
"icon": "{}/app_icons/ue4.png'",
"host_name": "unreal",
"environment": {
"AVALON_UNREAL_PLUGIN": "{PYPE_REPOS_ROOT}/avalon-unreal-integration",
"PYPE_LOG_NO_COLORS": "True",
"AVALON_UNREAL_PLUGIN": "{OPENPYPE_REPOS_ROOT}/avalon-unreal-integration",
"OPENPYPE_LOG_NO_COLORS": "True",
"QT_PREFERRED_BINDING": "PySide"
},
"variants": {

View file

@ -3,19 +3,19 @@
"studio_code": "stu",
"environment": {
"FFMPEG_PATH": {
"windows": "{PYPE_ROOT}/vendor/bin/ffmpeg_exec/windows/bin",
"darwin": "{PYPE_ROOT}/vendor/bin/ffmpeg_exec/darwin/bin",
"linux": ":{PYPE_ROOT}/vendor/bin/ffmpeg_exec/linux"
"windows": "{OPENPYPE_ROOT}/vendor/bin/ffmpeg_exec/windows/bin",
"darwin": "{OPENPYPE_ROOT}/vendor/bin/ffmpeg_exec/darwin/bin",
"linux": ":{OPENPYPE_ROOT}/vendor/bin/ffmpeg_exec/linux"
},
"PYPE_OCIO_CONFIG": "{STUDIO_SOFT}/OpenColorIO-Configs",
"OPENPYPE_OCIO_CONFIG": "{STUDIO_SOFT}/OpenColorIO-Configs",
"__environment_keys__": {
"global": [
"FFMPEG_PATH",
"PYPE_OCIO_CONFIG"
"OPENPYPE_OCIO_CONFIG"
]
}
},
"pype_path": {
"openpype_path": {
"windows": [],
"darwin": [],
"linux": []

View file

@ -2,7 +2,7 @@
"tool_groups": {
"mtoa": {
"environment": {
"MTOA": "{PYPE_STUDIO_SOFTWARE}/arnold/mtoa_{MAYA_VERSION}_{MTOA_VERSION}",
"MTOA": "{OPENPYPE_STUDIO_SOFTWARE}/arnold/mtoa_{MAYA_VERSION}_{MTOA_VERSION}",
"MAYA_RENDER_DESC_PATH": "{MTOA}",
"MAYA_MODULE_PATH": "{MTOA}",
"ARNOLD_PLUGIN_PATH": "{MTOA}/shaders",

View file

@ -1,9 +1,9 @@
"""Pype Settings
"""OpenPype Settings
Settings define how pype and it's modules behave. They became main component of
dynamism.
Settings define how openpype and it's modules behave. They became main
component of dynamism.
Pype settings (ATM) have 3 layers:
OpenPype settings (ATM) have 3 layers:
1.) Defaults - defined in code
2.) Studio overrides - values that are applied on default that may modify only
some values or None, result can be called "studio settings"
@ -24,7 +24,7 @@ visuallise how values are applied.
With help of setting entities it is possible to modify settings from code.
Pype has (ATM) 2 types of settings:
OpenPype has (ATM) 2 types of settings:
1.) System settings - global system settings, don't have project overrides
2.) Project settings - project specific settings

View file

@ -611,8 +611,8 @@ class BaseItemEntity(BaseEntity):
def remove_from_studio_default(self, on_change_trigger=None):
"""Remove studio overrides from entity and it's children.
Reset values to pype's default and mark entity to not store values as
studio overrides if entity is not under group.
Reset values to openpype's default and mark entity to not store values
as studio overrides if entity is not under group.
This is wrapper method that handles on_change callbacks only when all
`_remove_from_studio_default` on all children happened. That is
@ -672,8 +672,8 @@ class BaseItemEntity(BaseEntity):
def remove_from_project_override(self, on_change_trigger=None):
"""Remove project overrides from entity and it's children.
Reset values to studio overrides or pype's default and mark entity to
not store values as project overrides if entity is not under group.
Reset values to studio overrides or openpype's default and mark entity
to not store values as project overrides if entity is not under group.
This is wrapper method that handles on_change callbacks only when all
`_remove_from_project_override` on all children happened. That is
@ -837,9 +837,9 @@ class ItemEntity(BaseItemEntity):
def update_default_value(self, parent_values):
"""Fill default values on startup or on refresh.
Default values stored in `pype` repository should update all items in
schema. Each item should take values for his key and set it's value or
pass values down to children items.
Default values stored in `openpype` repository should update all items
in schema. Each item should take values for his key and set it's value
or pass values down to children items.
Args:
parent_values (dict): Values of parent's item. But in case item is

View file

@ -7,9 +7,9 @@
- each input may have "input modifiers" (keys in dictionary) that are required or optional
- only required modifier for all input items is key `"type"` which says what type of item it is
- there are special keys across all inputs
- `"is_file"` - this key is for storing pype defaults in `pype` repo
- `"is_file"` - this key is for storing openpype defaults in `openpype` repo
- reasons of existence: developing new schemas does not require to create defaults manually
- key is validated, must be once in hierarchy else it won't be possible to store pype defaults
- key is validated, must be once in hierarchy else it won't be possible to store openpype defaults
- `"is_group"` - define that all values under key in hierarchy will be overriden if any value is modified, this information is also stored to overrides
- this keys is not allowed for all inputs as they may have not reason for that
- key is validated, can be only once in hierarchy but is not required

View file

@ -29,8 +29,8 @@
},
{
"type": "path",
"key": "pype_path",
"label": "Pype Path",
"key": "openpype_path",
"label": "Versions Repository",
"multiplatform": true,
"multipath": true
}

View file

@ -227,9 +227,9 @@ class MongoSettingsHandler(SettingsHandler):
def _prepare_global_settings(self, data):
output = {}
# Add "pype_path" key to global settings if is set
if "general" in data and "pype_path" in data["general"]:
output["pype_path"] = data["general"]["pype_path"]
# Add "openpype_path" key to global settings if is set
if "general" in data and "openpype_path" in data["general"]:
output["openpype_path"] = data["general"]["openpype_path"]
return output
def save_studio_settings(self, data):

View file

@ -24,4 +24,4 @@ TerminalFilters = {
}
# Allow animations in GUI
Animated = env_variable_to_bool("PYPE_PYBLISH_ANIMATED", True)
Animated = env_variable_to_bool("OPENPYPE_PYBLISH_ANIMATED", True)

View file

@ -5,16 +5,16 @@ import traceback
from Qt import QtWidgets
from pymongo.errors import ServerSelectionTimeoutError
from pype.api import change_pype_mongo_url
from pype.api import change_openpype_mongo_url
class PypeMongoWidget(QtWidgets.QWidget):
class OpenPypeMongoWidget(QtWidgets.QWidget):
def __init__(self, parent):
super(PypeMongoWidget, self).__init__(parent)
super(OpenPypeMongoWidget, self).__init__(parent)
# Warning label
warning_label = QtWidgets.QLabel((
"WARNING: Requires restart. Change of Pype Mongo requires to"
"WARNING: Requires restart. Change of OpenPype Mongo requires to"
" restart of all running Pype processes and process using Pype"
" (Including this)."
"\n- all changes in different categories won't be saved."
@ -22,12 +22,12 @@ class PypeMongoWidget(QtWidgets.QWidget):
warning_label.setStyleSheet("font-weight: bold;")
# Label
mongo_url_label = QtWidgets.QLabel("Pype Mongo URL", self)
mongo_url_label = QtWidgets.QLabel("OpenPype Mongo URL", self)
# Input
mongo_url_input = QtWidgets.QLineEdit(self)
mongo_url_input.setPlaceholderText("< Pype Mongo URL >")
mongo_url_input.setText(os.environ["PYPE_MONGO"])
mongo_url_input.setPlaceholderText("< OpenPype Mongo URL >")
mongo_url_input.setText(os.environ["OPENPYPE_MONGO"])
# Confirm button
mongo_url_change_btn = QtWidgets.QPushButton("Confirm Change", self)
@ -48,14 +48,14 @@ class PypeMongoWidget(QtWidgets.QWidget):
dialog = QtWidgets.QMessageBox(self)
title = "Pype mongo changed"
title = "OpenPype mongo changed"
message = (
"Pype mongo url was successfully changed. Restart Pype please."
"OpenPype mongo url was successfully changed. Restart Pype please."
)
details = None
try:
change_pype_mongo_url(value)
change_openpype_mongo_url(value)
except Exception as exc:
if isinstance(exc, ServerSelectionTimeoutError):
error_message = (
@ -65,10 +65,10 @@ class PypeMongoWidget(QtWidgets.QWidget):
else:
error_message = str(exc)
title = "Pype mongo change failed"
title = "OpenPype mongo change failed"
# TODO catch exception message more gracefully
message = (
"Pype mongo change was not successful."
"OpenPype mongo change was not successful."
" Full traceback can be found in details section.\n\n"
"Error message:\n{}"
).format(error_message)

View file

@ -17,7 +17,7 @@ from .widgets import (
SpacerWidget,
ExpandingWidget
)
from .mongo_widget import PypeMongoWidget
from .mongo_widget import OpenPypeMongoWidget
from .general_widget import LocalGeneralWidgets
from .apps_widget import LocalApplicationsWidgets
from .projects_widget import ProjectSettingsWidget
@ -62,7 +62,7 @@ class LocalSettingsWidget(QtWidgets.QWidget):
pype_mongo_layout.setContentsMargins(CHILD_OFFSET, 5, 0, 0)
pype_mongo_expand_widget.set_content_widget(pype_mongo_content)
pype_mongo_widget = PypeMongoWidget(self)
pype_mongo_widget = OpenPypeMongoWidget(self)
pype_mongo_layout.addWidget(pype_mongo_widget)
self.main_layout.addWidget(pype_mongo_expand_widget)

View file

@ -7,9 +7,9 @@
- each input may have "input modifiers" (keys in dictionary) that are required or optional
- only required modifier for all input items is key `"type"` which says what type of item it is
- there are special keys across all inputs
- `"is_file"` - this key is for storing pype defaults in `pype` repo
- `"is_file"` - this key is for storing openpype defaults in `openpype` repo
- reasons of existence: developing new schemas does not require to create defaults manually
- key is validated, must be once in hierarchy else it won't be possible to store pype defaults
- key is validated, must be once in hierarchy else it won't be possible to store openpype defaults
- `"is_group"` - define that all values under key in hierarchy will be overriden if any value is modified, this information is also stored to overrides
- this keys is not allowed for all inputs as they may have not reason for that
- key is validated, can be only once in hierarchy but is not required
@ -191,7 +191,7 @@
{
"type": "boolean",
"key": "my_boolean_key",
"label": "Do you want to use Pype?"
"label": "Do you want to use OpenPype?"
}
```

View file

@ -643,7 +643,7 @@ class ProjectListWidget(QtWidgets.QWidget):
items = [self.default]
mongo_url = os.environ["PYPE_MONGO"]
mongo_url = os.environ["OPENPYPE_MONGO"]
# Force uninstall of whole avalon connection if url does not match
# to current environment and set it as environment

View file

@ -15,7 +15,7 @@ class MainWidget(QtWidgets.QWidget):
def __init__(self, user_role, parent=None):
super(MainWidget, self).__init__(parent)
self.setObjectName("MainWidget")
self.setWindowTitle("Pype Settings")
self.setWindowTitle("OpenPype Settings")
self.resize(self.widget_width, self.widget_height)

View file

@ -77,8 +77,8 @@ class TrayManager:
self.tray_widget.showMessage(*args, **kwargs)
def _add_version_item(self):
subversion = os.environ.get("PYPE_SUBVERSION")
client_name = os.environ.get("PYPE_CLIENT")
subversion = os.environ.get("OPENPYPE_SUBVERSION")
client_name = os.environ.get("OPENPYPE_CLIENT")
version_string = pype.version.__version__
if subversion:

View file

@ -3,7 +3,7 @@
Bootstrapping process of Pype is as follows:
`PYPE_PATH` is checked for existence - either one from environment or
`OPENPYPE_PATH` is checked for existence - either one from environment or
from user settings. Precedence takes the one set by environment.
On this path we try to find pype in directories version string in their names.
@ -11,16 +11,16 @@ For example: `pype-v3.0.1-foo` is valid name, or even `foo_3.0.2` - as long
as version can be determined from its name _AND_ file `pype/pype/version.py`
can be found inside, it is considered Pype installation.
If no Pype repositories are found in `PYPE_PATH` (user data dir)
If no Pype repositories are found in `OPENPYPE_PATH` (user data dir)
then **Igniter** (Pype setup tool) will launch its GUI.
It can be used to specify `PYPE_PATH` or if it is _not_ specified, current
It can be used to specify `OPENPYPE_PATH` or if it is _not_ specified, current
*"live"* repositories will be used to create zip file and copy it to
appdata dir in user home and extract it there. Version will be determined by
version specified in Pype module.
If Pype repository directories are found in default install location
(user data dir) or in `PYPE_PATH`, it will get list of those dirs there and
(user data dir) or in `OPENPYPE_PATH`, it will get list of those dirs there and
use latest one or the one specified with optional `--use-version` command
line argument. If the one specified doesn't exist then latest available
version will be used. All repositories in that dir will be added
@ -31,7 +31,7 @@ used. All directories under `repos` will be added to `sys.path` and
`PYTHONPATH`.
Pype depends on connection to `MongoDB`_. You can specify MongoDB connection
string via `PYPE_MONGO` set in environment or it can be set in user
string via `OPENPYPE_MONGO` set in environment or it can be set in user
settings or via **Igniter** GUI.
So, bootstrapping Pype looks like this::
@ -40,7 +40,7 @@ So, bootstrapping Pype looks like this::
+-------------------------------------------------------+
| Determine MongoDB connection: |
| Use `PYPE_MONGO`, system keyring `pypeMongo` |
| Use `OPENPYPE_MONGO`, system keyring `pypeMongo` |
+--------------------------|----------------------------+
.--- Found? --.
YES NO
@ -53,7 +53,7 @@ So, bootstrapping Pype looks like this::
| |
+-----------------v------------------------------------+ |
| Get location of Pype: | |
| 1) Test for `PYPE_PATH` environment variable | |
| 1) Test for `OPENPYPE_PATH` environment variable | |
| 2) Test `pypePath` in registry setting | |
| 3) Test user data directory | |
| ................................................... | |
@ -67,7 +67,7 @@ So, bootstrapping Pype looks like this::
YES NO |
| | |
| +--------------v------------------+ |
| | Look in `PYPE_PATH`, find | |
| | Look in `OPENPYPE_PATH`, find | |
| | latest version and install it | |
| | to user data dir. | |
| +--------------|------------------+ |
@ -191,7 +191,7 @@ def set_avalon_environments():
# Avalon mongo URL
avalon_mongo_url = (
os.environ.get("AVALON_MONGO")
or os.environ["PYPE_MONGO"]
or os.environ["OPENPYPE_MONGO"]
)
os.environ.update({
# Mongo url (use same as pype has)
@ -281,7 +281,7 @@ def _process_arguments() -> tuple:
def _determine_mongodb() -> str:
"""Determine mongodb connection string.
First use ``PYPE_MONGO`` environment variable, then system keyring.
First use ``OPENPYPE_MONGO`` environment variable, then system keyring.
Then try to run **Igniter UI** to let user specify it.
Returns:
@ -292,7 +292,7 @@ def _determine_mongodb() -> str:
"""
pype_mongo = os.getenv("PYPE_MONGO", None)
pype_mongo = os.getenv("OPENPYPE_MONGO", None)
if not pype_mongo:
# try system keyring
try:
@ -313,23 +313,23 @@ def _determine_mongodb() -> str:
def _initialize_environment(pype_version: PypeVersion) -> None:
version_path = pype_version.path
os.environ["PYPE_VERSION"] = pype_version.version
os.environ["OPENPYPE_VERSION"] = pype_version.version
# set PYPE_ROOT to point to currently used Pype version.
os.environ["PYPE_ROOT"] = os.path.normpath(version_path.as_posix())
os.environ["OPENPYPE_ROOT"] = os.path.normpath(version_path.as_posix())
# inject version to Python environment (sys.path, ...)
print(">>> Injecting Pype version to running environment ...")
bootstrap.add_paths_from_directory(version_path)
# Additional sys paths related to PYPE_ROOT directory
# TODO move additional paths to `boot` part when PYPE_ROOT will point
# Additional sys paths related to OPENPYPE_ROOT directory
# TODO move additional paths to `boot` part when OPENPYPE_ROOT will point
# to same hierarchy from code and from frozen pype
additional_paths = [
# add pype tools
os.path.join(os.environ["PYPE_ROOT"], "pype", "pype", "tools"),
os.path.join(os.environ["OPENPYPE_ROOT"], "pype", "pype", "tools"),
# add common pype vendor
# (common for multiple Python interpreter versions)
os.path.join(
os.environ["PYPE_ROOT"],
os.environ["OPENPYPE_ROOT"],
"pype",
"pype",
"vendor",
@ -338,7 +338,7 @@ def _initialize_environment(pype_version: PypeVersion) -> None:
)
]
split_paths = os.getenv("PYTHONPATH", "").split(os.pathsep)
split_paths = os.getenv("OPENPYTHONPATH", "").split(os.pathsep)
for path in additional_paths:
split_paths.insert(0, path)
sys.path.insert(0, path)
@ -351,7 +351,7 @@ def _find_frozen_pype(use_version: str = None,
"""Find Pype to run from frozen code.
This will process and modify environment variables:
``PYTHONPATH``, ``PYPE_VERSION``, ``PYPE_ROOT``
``PYTHONPATH``, ``OPENPYPE_VERSION``, ``OPENPYPE_ROOT``
Args:
use_version (str, optional): Try to use specified version.
@ -368,7 +368,7 @@ def _find_frozen_pype(use_version: str = None,
pype_version = None
pype_versions = bootstrap.find_pype(include_zips=True,
staging=use_staging)
if not os.getenv("PYPE_TRYOUT"):
if not os.getenv("OPENPYPE_TRYOUT"):
try:
# use latest one found (last in the list is latest)
pype_version = pype_versions[-1]
@ -379,7 +379,7 @@ def _find_frozen_pype(use_version: str = None,
import igniter
return_code = igniter.open_dialog()
if return_code == 2:
os.environ["PYPE_TRYOUT"] = "1"
os.environ["OPENPYPE_TRYOUT"] = "1"
if return_code == 3:
# run Pype after installation
@ -399,7 +399,7 @@ def _find_frozen_pype(use_version: str = None,
if not pype_versions:
# no Pype versions found anyway, lets use then the one
# shipped with frozen Pype
if not os.getenv("PYPE_TRYOUT"):
if not os.getenv("OPENPYPE_TRYOUT"):
print("*** Still no luck finding Pype.")
print(("*** We'll try to use the one coming "
"with Pype installation."))
@ -476,7 +476,7 @@ def _bootstrap_from_code(use_version):
# get current version of Pype
local_version = bootstrap.get_local_live_version()
os.environ["PYPE_VERSION"] = local_version
os.environ["OPENPYPE_VERSION"] = local_version
if use_version and use_version != local_version:
pype_versions = bootstrap.find_pype(include_zips=True)
version_path = BootstrapRepos.get_version_path_from_list(
@ -484,10 +484,10 @@ def _bootstrap_from_code(use_version):
if version_path:
# use specified
bootstrap.add_paths_from_directory(version_path)
os.environ["PYPE_VERSION"] = use_version
os.environ["OPENPYPE_VERSION"] = use_version
else:
version_path = pype_root
os.environ["PYPE_ROOT"] = pype_root
os.environ["OPENPYPE_ROOT"] = pype_root
repos = os.listdir(os.path.join(pype_root, "repos"))
repos = [os.path.join(pype_root, "repos", repo) for repo in repos]
# add self to python paths
@ -505,15 +505,19 @@ def _bootstrap_from_code(use_version):
# in case when we are running without any version installed.
if not getattr(sys, 'frozen', False):
split_paths.append(site.getsitepackages()[-1])
# TODO move additional paths to `boot` part when PYPE_ROOT will point
# to same hierarchy from code and from frozen pype
# TODO move additional paths to `boot` part when OPENPYPE_ROOT will
# point to same hierarchy from code and from frozen pype
additional_paths = [
# add pype tools
os.path.join(os.environ["PYPE_ROOT"], "pype", "tools"),
os.path.join(os.environ["OPENPYPE_ROOT"], "pype", "tools"),
# add common pype vendor
# (common for multiple Python interpreter versions)
os.path.join(
os.environ["PYPE_ROOT"], "pype", "vendor", "python", "common"
os.environ["OPENPYPE_ROOT"],
"pype",
"vendor",
"python",
"common"
)
]
for path in additional_paths:
@ -555,7 +559,7 @@ def boot():
print(f"!!! {e}")
sys.exit(1)
os.environ["PYPE_MONGO"] = pype_mongo
os.environ["OPENPYPE_MONGO"] = pype_mongo
# ------------------------------------------------------------------------
# Set environments - load Pype path from database (if set)
@ -563,15 +567,15 @@ def boot():
# set PYPE_ROOT to running location until proper version can be
# determined.
if getattr(sys, 'frozen', False):
os.environ["PYPE_ROOT"] = os.path.dirname(sys.executable)
os.environ["OPENPYPE_ROOT"] = os.path.dirname(sys.executable)
else:
os.environ["PYPE_ROOT"] = os.path.dirname(__file__)
os.environ["OPENPYPE_ROOT"] = os.path.dirname(__file__)
# Get Pype path from database and set it to environment so Pype can
# find its versions there and bootstrap them.
pype_path = get_pype_path_from_db(pype_mongo)
if not os.getenv("PYPE_PATH") and pype_path:
os.environ["PYPE_PATH"] = pype_path
if not os.getenv("OPENPYPE_PATH") and pype_path:
os.environ["OPENPYPE_PATH"] = pype_path
# ------------------------------------------------------------------------
# Find Pype versions
@ -590,13 +594,13 @@ def boot():
# set this to point either to `python` from venv in case of live code
# or to `pype` or `pype_console` in case of frozen code
os.environ["PYPE_EXECUTABLE"] = sys.executable
os.environ["OPENPYPE_EXECUTABLE"] = sys.executable
if getattr(sys, 'frozen', False):
os.environ["PYPE_REPOS_ROOT"] = os.environ["PYPE_ROOT"]
os.environ["OPENPYPE_REPOS_ROOT"] = os.environ["OPENPYPE_ROOT"]
else:
os.environ["PYPE_REPOS_ROOT"] = os.path.join(
os.environ["PYPE_ROOT"], "repos")
os.environ["OPENPYPE_REPOS_ROOT"] = os.path.join(
os.environ["OPENPYPE_ROOT"], "repos")
# delete Pype module and it's submodules from cache so it is used from
# specific version
@ -624,7 +628,7 @@ def boot():
set_modules_environments()
from pype import cli
from pype.lib import terminal as t
from pype.lib import terminal as t
from pype.version import __version__
assert version_path, "Version path not defined."
@ -667,7 +671,7 @@ def get_info() -> list:
inf.append(("Pype variant", "staging"))
else:
inf.append(("Pype variant", "production"))
inf.append(("Running pype from", os.environ.get('PYPE_ROOT')))
inf.append(("Running pype from", os.environ.get('OPENPYPE_ROOT')))
inf.append(("Using mongodb", components["host"]))
if os.environ.get("FTRACK_SERVER"):