diff --git a/README.md b/README.md index 456655bfb9..aae79f2358 100644 --- a/README.md +++ b/README.md @@ -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**.
@@ -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
-Use pyenv to install Python version for Pype build +Use pyenv to install Python version for OpenPype build 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 ```
-#### 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 diff --git a/igniter/bootstrap_repos.py b/igniter/bootstrap_repos.py index 58d59afe88..ec980805be 100644 --- a/igniter/bootstrap_repos.py +++ b/igniter/bootstrap_repos.py @@ -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. diff --git a/igniter/install_dialog.py b/igniter/install_dialog.py index 5fa676fd5b..cf8513ec4c 100644 --- a/igniter/install_dialog.py +++ b/igniter/install_dialog.py @@ -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 diff --git a/igniter/install_thread.py b/igniter/install_thread.py index a184a19d36..b0da4c9f0d 100644 --- a/igniter/install_thread.py +++ b/igniter/install_thread.py @@ -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) diff --git a/igniter/user_settings.py b/igniter/user_settings.py index 00ce68cb0b..b0c2ac2370 100644 --- a/igniter/user_settings.py +++ b/igniter/user_settings.py @@ -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": {} diff --git a/pype/api.py b/pype/api.py index 37e878580a..ce18097eca 100644 --- a/pype/api.py +++ b/pype/api.py @@ -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" ] diff --git a/pype/cli.py b/pype/cli.py index f67cf10ea1..c6da88cbc1 100644 --- a/pype/cli.py +++ b/pype/cli.py @@ -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: diff --git a/pype/hooks/pre_python2_vendor.py b/pype/hooks/pre_python2_vendor.py index 6f34e44132..377431b372 100644 --- a/pype/hooks/pre_python2_vendor.py +++ b/pype/hooks/pre_python2_vendor.py @@ -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) - \ No newline at end of file diff --git a/pype/hosts/celaction/hooks/pre_celaction_registers.py b/pype/hosts/celaction/hooks/pre_celaction_registers.py index 40e8eaa6ff..2e535d6d77 100644 --- a/pype/hosts/celaction/hooks/pre_celaction_registers.py +++ b/pype/hosts/celaction/hooks/pre_celaction_registers.py @@ -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) diff --git a/pype/hosts/fusion/api/__init__.py b/pype/hosts/fusion/api/__init__.py index 61eaf44ddb..5581a0a9cb 100644 --- a/pype/hosts/fusion/api/__init__.py +++ b/pype/hosts/fusion/api/__init__.py @@ -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", ] diff --git a/pype/hosts/fusion/api/menu.py b/pype/hosts/fusion/api/menu.py index c37f1daa49..b338b361d0 100644 --- a/pype/hosts/fusion/api/menu.py +++ b/pype/hosts/fusion/api/menu.py @@ -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) diff --git a/pype/hosts/fusion/api/menu_style.qss b/pype/hosts/fusion/api/menu_style.qss index df4fd7e949..12c474b070 100644 --- a/pype/hosts/fusion/api/menu_style.qss +++ b/pype/hosts/fusion/api/menu_style.qss @@ -20,7 +20,7 @@ QPushButton:hover { color: #e64b3d; } -#PypeMenu { +#OpenPypeMenu { border: 1px solid #fef9ef; } diff --git a/pype/hosts/fusion/api/pipeline.py b/pype/hosts/fusion/api/pipeline.py index 36084dc734..bcb2b0aaf3 100644 --- a/pype/hosts/fusion/api/pipeline.py +++ b/pype/hosts/fusion/api/pipeline.py @@ -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") diff --git a/pype/hosts/fusion/utility_scripts/Pype_menu.py b/pype/hosts/fusion/utility_scripts/__OpenPype_Menu__.py similarity index 93% rename from pype/hosts/fusion/utility_scripts/Pype_menu.py rename to pype/hosts/fusion/utility_scripts/__OpenPype_Menu__.py index 0cd2b7502e..8940f5fc52 100644 --- a/pype/hosts/fusion/utility_scripts/Pype_menu.py +++ b/pype/hosts/fusion/utility_scripts/__OpenPype_Menu__.py @@ -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__": diff --git a/pype/hosts/harmony/api/__init__.py b/pype/hosts/harmony/api/__init__.py index 1a0255d045..ae1450d9cc 100644 --- a/pype/hosts/harmony/api/__init__.py +++ b/pype/hosts/harmony/api/__init__.py @@ -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() diff --git a/pype/hosts/harmony/js/creators/CreateRender.js b/pype/hosts/harmony/js/creators/CreateRender.js index cfb0701df4..92ec6dfd2f 100644 --- a/pype/hosts/harmony/js/creators/CreateRender.js +++ b/pype/hosts/harmony/js/creators/CreateRender.js @@ -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, "/")); } diff --git a/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js b/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js index cfa71e2834..d809c350ab 100644 --- a/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js +++ b/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js @@ -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'){ diff --git a/pype/hosts/harmony/js/loaders/TemplateLoader.js b/pype/hosts/harmony/js/loaders/TemplateLoader.js index 160979f943..1df04c8282 100644 --- a/pype/hosts/harmony/js/loaders/TemplateLoader.js +++ b/pype/hosts/harmony/js/loaders/TemplateLoader.js @@ -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'){ diff --git a/pype/hosts/harmony/js/publish/CollectCurrentFile.js b/pype/hosts/harmony/js/publish/CollectCurrentFile.js index d39f23712d..2eeb7fb764 100644 --- a/pype/hosts/harmony/js/publish/CollectCurrentFile.js +++ b/pype/hosts/harmony/js/publish/CollectCurrentFile.js @@ -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, "/")); } diff --git a/pype/hosts/harmony/js/publish/CollectFarmRender.js b/pype/hosts/harmony/js/publish/CollectFarmRender.js index 7c0cda5165..759dc5ce5d 100644 --- a/pype/hosts/harmony/js/publish/CollectFarmRender.js +++ b/pype/hosts/harmony/js/publish/CollectFarmRender.js @@ -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, "/")); } diff --git a/pype/hosts/harmony/js/publish/CollectPalettes.js b/pype/hosts/harmony/js/publish/CollectPalettes.js index 8fda55ff75..afb0ad854a 100644 --- a/pype/hosts/harmony/js/publish/CollectPalettes.js +++ b/pype/hosts/harmony/js/publish/CollectPalettes.js @@ -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, "/")); } diff --git a/pype/hosts/harmony/js/publish/ExtractPalette.js b/pype/hosts/harmony/js/publish/ExtractPalette.js index 794c6fdbb1..c4765354c4 100644 --- a/pype/hosts/harmony/js/publish/ExtractPalette.js +++ b/pype/hosts/harmony/js/publish/ExtractPalette.js @@ -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, "/")); } /** diff --git a/pype/hosts/harmony/js/publish/ExtractTemplate.js b/pype/hosts/harmony/js/publish/ExtractTemplate.js index d36a8947f8..4676e1ff68 100644 --- a/pype/hosts/harmony/js/publish/ExtractTemplate.js +++ b/pype/hosts/harmony/js/publish/ExtractTemplate.js @@ -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, "/")); } diff --git a/pype/hosts/houdini/startup/MainMenuCommon.XML b/pype/hosts/houdini/startup/MainMenuCommon.XML index ba639a71a1..faa811de86 100644 --- a/pype/hosts/houdini/startup/MainMenuCommon.XML +++ b/pype/hosts/houdini/startup/MainMenuCommon.XML @@ -2,21 +2,7 @@ - - - - - - - - - - + @@ -55,7 +41,7 @@ publish.show(parent) - + " ## Output - "/project/asset/task/animation_v001.ma" + "/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() diff --git a/pype/lib/applications.py b/pype/lib/applications.py index 6df296db95..4ebf34597f 100644 --- a/pype/lib/applications.py +++ b/pype/lib/applications.py @@ -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] }) diff --git a/pype/lib/avalon_context.py b/pype/lib/avalon_context.py index d4daf22142..393b6820fa 100644 --- a/pype/lib/avalon_context.py +++ b/pype/lib/avalon_context.py @@ -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 diff --git a/pype/lib/execute.py b/pype/lib/execute.py index f815d05f1b..441dcfa754 100644 --- a/pype/lib/execute.py +++ b/pype/lib/execute.py @@ -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: diff --git a/pype/lib/import_utils.py b/pype/lib/import_utils.py index 5c832a925c..5fca0ae5f9 100644 --- a/pype/lib/import_utils.py +++ b/pype/lib/import_utils.py @@ -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) diff --git a/pype/lib/local_settings.py b/pype/lib/local_settings.py index aa372a52d2..82507cb0c0 100644 --- a/pype/lib/local_settings.py +++ b/pype/lib/local_settings.py @@ -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. """ diff --git a/pype/lib/log.py b/pype/lib/log.py index f6e95eea8a..9675637700 100644 --- a/pype/lib/log.py +++ b/pype/lib/log.py @@ -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 diff --git a/pype/lib/mongo.py b/pype/lib/mongo.py index 3ee43bb934..edb52a29ab 100644 --- a/pype/lib/mongo.py +++ b/pype/lib/mongo.py @@ -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): diff --git a/pype/lib/plugin_tools.py b/pype/lib/plugin_tools.py index 0f3a0a2838..f352f134d0 100644 --- a/pype/lib/plugin_tools.py +++ b/pype/lib/plugin_tools.py @@ -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 diff --git a/pype/lib/pype_info.py b/pype/lib/pype_info.py index cbcc5811a0..d9e810e556 100644 --- a/pype/lib/pype_info.py +++ b/pype/lib/pype_info.py @@ -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"] } diff --git a/pype/lib/terminal.py b/pype/lib/terminal.py index 51b0bcebd6..9e9bfa9790 100644 --- a/pype/lib/terminal.py +++ b/pype/lib/terminal.py @@ -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: diff --git a/pype/modules/avalon_apps/avalon_app.py b/pype/modules/avalon_apps/avalon_app.py index 38d6e4394c..60f62fe731 100644 --- a/pype/modules/avalon_apps/avalon_app.py +++ b/pype/modules/avalon_apps/avalon_app.py @@ -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: diff --git a/pype/modules/deadline/plugins/publish/submit_aftereffects_deadline.py b/pype/modules/deadline/plugins/publish/submit_aftereffects_deadline.py index f3c81e79e8..5ec5129fa4 100644 --- a/pype/modules/deadline/plugins/publish/submit_aftereffects_deadline.py +++ b/pype/modules/deadline/plugins/publish/submit_aftereffects_deadline.py @@ -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 diff --git a/pype/modules/deadline/plugins/publish/submit_harmony_deadline..py b/pype/modules/deadline/plugins/publish/submit_harmony_deadline..py index 46b651061d..d723490a69 100644 --- a/pype/modules/deadline/plugins/publish/submit_harmony_deadline..py +++ b/pype/modules/deadline/plugins/publish/submit_harmony_deadline..py @@ -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 diff --git a/pype/modules/deadline/plugins/publish/submit_maya_deadline.py b/pype/modules/deadline/plugins/publish/submit_maya_deadline.py index 914782f14c..e0e01a3899 100644 --- a/pype/modules/deadline/plugins/publish/submit_maya_deadline.py +++ b/pype/modules/deadline/plugins/publish/submit_maya_deadline.py @@ -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) diff --git a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py index 6692c4782f..2e30e624ef 100644 --- a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py +++ b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py @@ -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 diff --git a/pype/modules/deadline/plugins/publish/submit_publish_job.py b/pype/modules/deadline/plugins/publish/submit_publish_job.py index 72aeda50ca..b5150f8ac9 100644 --- a/pype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/pype/modules/deadline/plugins/publish/submit_publish_job.py @@ -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 \ No newline at end of file + return publish_folder diff --git a/pype/modules/deadline/plugins/publish/validate_deadline_connection.py b/pype/modules/deadline/plugins/publish/validate_deadline_connection.py index 1c49e68ee1..88b3f42d49 100644 --- a/pype/modules/deadline/plugins/publish/validate_deadline_connection.py +++ b/pype/modules/deadline/plugins/publish/validate_deadline_connection.py @@ -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) diff --git a/pype/modules/ftrack/event_handlers_user/action_applications.py b/pype/modules/ftrack/event_handlers_user/action_applications.py index 2c42cadfb7..fcfebe5078 100644 --- a/pype/modules/ftrack/event_handlers_user/action_applications.py +++ b/pype/modules/ftrack/event_handlers_user/action_applications.py @@ -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) diff --git a/pype/modules/ftrack/ftrack_server/socket_thread.py b/pype/modules/ftrack/ftrack_server/socket_thread.py index a895e0b900..181fad5ce5 100644 --- a/pype/modules/ftrack/ftrack_server/socket_thread.py +++ b/pype/modules/ftrack/ftrack_server/socket_thread.py @@ -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 diff --git a/pype/modules/ftrack/lib/ftrack_action_handler.py b/pype/modules/ftrack/lib/ftrack_action_handler.py index d95c81955e..2bff9d8cb3 100644 --- a/pype/modules/ftrack/lib/ftrack_action_handler.py +++ b/pype/modules/ftrack/lib/ftrack_action_handler.py @@ -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)) diff --git a/pype/modules/ftrack/plugins/publish/validate_custom_ftrack_attributes.py b/pype/modules/ftrack/plugins/publish/validate_custom_ftrack_attributes.py index 03aa8844fd..549f48889d 100644 --- a/pype/modules/ftrack/plugins/publish/validate_custom_ftrack_attributes.py +++ b/pype/modules/ftrack/plugins/publish/validate_custom_ftrack_attributes.py @@ -8,7 +8,7 @@ class ValidateFtrackAttributes(pyblish.api.InstancePlugin): Attributes to be validated are specified in: - `$PYPE_CONFIG/presets//ftrack_attributes.json` + `$OPENPYPE_CONFIG/presets//ftrack_attributes.json` This is array (list) of checks in format: [ diff --git a/pype/modules/muster/muster.py b/pype/modules/muster/muster.py index 5595ccff15..1a82926802 100644 --- a/pype/modules/muster/muster.py +++ b/pype/modules/muster/muster.py @@ -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) diff --git a/pype/modules/timers_manager/timers_manager.py b/pype/modules/timers_manager/timers_manager.py index b83f51f0ba..a8ea5799e6 100644 --- a/pype/modules/timers_manager/timers_manager.py +++ b/pype/modules/timers_manager/timers_manager.py @@ -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 diff --git a/pype/modules/user/user_module.py b/pype/modules/user/user_module.py index 71c5fd124e..7d257f1781 100644 --- a/pype/modules/user/user_module.py +++ b/pype/modules/user/user_module.py @@ -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" diff --git a/pype/modules/webserver/webserver_module.py b/pype/modules/webserver/webserver_module.py index 3b3f0e7a79..b3fb83596d 100644 --- a/pype/modules/webserver/webserver_module.py +++ b/pype/modules/webserver/webserver_module.py @@ -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 ) diff --git a/pype/plugins/publish/collect_current_pype_user.py b/pype/plugins/publish/collect_current_pype_user.py index a8947dd8fb..de4e950d56 100644 --- a/pype/plugins/publish/collect_current_pype_user.py +++ b/pype/plugins/publish/collect_current_pype_user.py @@ -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()) diff --git a/pype/plugins/publish/collect_rendered_files.py b/pype/plugins/publish/collect_rendered_files.py index e0f3695fd5..edf9b50b92 100644 --- a/pype/plugins/publish/collect_rendered_files.py +++ b/pype/plugins/publish/collect_rendered_files.py @@ -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: diff --git a/pype/plugins/publish/extract_scanline_exr.py b/pype/plugins/publish/extract_scanline_exr.py index a801baa17c..5839105f7f 100644 --- a/pype/plugins/publish/extract_scanline_exr.py +++ b/pype/plugins/publish/extract_scanline_exr.py @@ -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)) diff --git a/pype/pype_commands.py b/pype/pype_commands.py index ea94a35e3a..c46d71c631 100644 --- a/pype/pype_commands.py +++ b/pype/pype_commands.py @@ -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 ...") diff --git a/pype/resources/__init__.py b/pype/resources/__init__.py index fdee38ab34..ef4ed73974 100644 --- a/pype/resources/__init__.py +++ b/pype/resources/__init__.py @@ -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" diff --git a/pype/scripts/export_maya_ass_job.py b/pype/scripts/export_maya_ass_job.py index d343eec131..6e5eff6663 100644 --- a/pype/scripts/export_maya_ass_job.py +++ b/pype/scripts/export_maya_ass_job.py @@ -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 = [ diff --git a/pype/scripts/export_maya_ass_sequence.mel b/pype/scripts/export_maya_ass_sequence.mel index 83d1d010ac..b3b9a8543e 100644 --- a/pype/scripts/export_maya_ass_sequence.mel +++ b/pype/scripts/export_maya_ass_sequence.mel @@ -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"); diff --git a/pype/scripts/publish_deadline.py b/pype/scripts/publish_deadline.py deleted file mode 100644 index 16d097a1ea..0000000000 --- a/pype/scripts/publish_deadline.py +++ /dev/null @@ -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)) diff --git a/pype/scripts/publish_filesequence.py b/pype/scripts/publish_filesequence.py deleted file mode 100644 index 905c6b99ba..0000000000 --- a/pype/scripts/publish_filesequence.py +++ /dev/null @@ -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__() diff --git a/pype/settings/defaults/system_settings/applications.json b/pype/settings/defaults/system_settings/applications.json index 5eccdfb83d..b21b035e38 100644 --- a/pype/settings/defaults/system_settings/applications.json +++ b/pype/settings/defaults/system_settings/applications.json @@ -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": { diff --git a/pype/settings/defaults/system_settings/general.json b/pype/settings/defaults/system_settings/general.json index 99db4e85c6..d93d2a0c3a 100644 --- a/pype/settings/defaults/system_settings/general.json +++ b/pype/settings/defaults/system_settings/general.json @@ -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": [] diff --git a/pype/settings/defaults/system_settings/tools.json b/pype/settings/defaults/system_settings/tools.json index 214bfc95e5..535d8d5fdb 100644 --- a/pype/settings/defaults/system_settings/tools.json +++ b/pype/settings/defaults/system_settings/tools.json @@ -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", diff --git a/pype/settings/entities/__init__.py b/pype/settings/entities/__init__.py index 2ff911e7d4..f76a915225 100644 --- a/pype/settings/entities/__init__.py +++ b/pype/settings/entities/__init__.py @@ -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 diff --git a/pype/settings/entities/base_entity.py b/pype/settings/entities/base_entity.py index c01fca6a4e..88afdc8c93 100644 --- a/pype/settings/entities/base_entity.py +++ b/pype/settings/entities/base_entity.py @@ -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 diff --git a/pype/settings/entities/schemas/README.md b/pype/settings/entities/schemas/README.md index e92ba8918f..18312a8364 100644 --- a/pype/settings/entities/schemas/README.md +++ b/pype/settings/entities/schemas/README.md @@ -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 diff --git a/pype/settings/entities/schemas/system_schema/schema_general.json b/pype/settings/entities/schemas/system_schema/schema_general.json index 26dc251acf..fd650b4a1e 100644 --- a/pype/settings/entities/schemas/system_schema/schema_general.json +++ b/pype/settings/entities/schemas/system_schema/schema_general.json @@ -29,8 +29,8 @@ }, { "type": "path", - "key": "pype_path", - "label": "Pype Path", + "key": "openpype_path", + "label": "Versions Repository", "multiplatform": true, "multipath": true } diff --git a/pype/settings/handlers.py b/pype/settings/handlers.py index b4f9aa0826..13cb9b9ba5 100644 --- a/pype/settings/handlers.py +++ b/pype/settings/handlers.py @@ -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): diff --git a/pype/tools/pyblish_pype/settings.py b/pype/tools/pyblish_pype/settings.py index 5848cdf698..11539f67a6 100644 --- a/pype/tools/pyblish_pype/settings.py +++ b/pype/tools/pyblish_pype/settings.py @@ -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) diff --git a/pype/tools/settings/local_settings/mongo_widget.py b/pype/tools/settings/local_settings/mongo_widget.py index c6f6ab1591..f6f1ae1acb 100644 --- a/pype/tools/settings/local_settings/mongo_widget.py +++ b/pype/tools/settings/local_settings/mongo_widget.py @@ -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) diff --git a/pype/tools/settings/local_settings/window.py b/pype/tools/settings/local_settings/window.py index c5f5d15831..b2c32d135e 100644 --- a/pype/tools/settings/local_settings/window.py +++ b/pype/tools/settings/local_settings/window.py @@ -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) diff --git a/pype/tools/settings/settings/README.md b/pype/tools/settings/settings/README.md index 65d73a0728..31d8fc5b74 100644 --- a/pype/tools/settings/settings/README.md +++ b/pype/tools/settings/settings/README.md @@ -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?" } ``` diff --git a/pype/tools/settings/settings/widgets/widgets.py b/pype/tools/settings/settings/widgets/widgets.py index ccd437ece3..d00372be03 100644 --- a/pype/tools/settings/settings/widgets/widgets.py +++ b/pype/tools/settings/settings/widgets/widgets.py @@ -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 diff --git a/pype/tools/settings/settings/widgets/window.py b/pype/tools/settings/settings/widgets/window.py index 058611c36a..96275facff 100644 --- a/pype/tools/settings/settings/widgets/window.py +++ b/pype/tools/settings/settings/widgets/window.py @@ -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) diff --git a/pype/tools/tray/pype_tray.py b/pype/tools/tray/pype_tray.py index 2d37c04136..0d3f729870 100644 --- a/pype/tools/tray/pype_tray.py +++ b/pype/tools/tray/pype_tray.py @@ -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: diff --git a/start.py b/start.py index 8d60a14403..e8fac8c86c 100644 --- a/start.py +++ b/start.py @@ -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"):