Merge pull request #26 from pypeclub/feature/environment_prefix

Environment prefix
This commit is contained in:
Milan Kolar 2021-04-01 17:17:45 +02:00 committed by GitHub
commit 74a1599b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 510 additions and 633 deletions

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

@ -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

@ -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

@ -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,7 @@ 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('OPENPYPE_STUDIO_NAME') or "Pype"
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

@ -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)

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

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": {}

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
@ -78,7 +78,7 @@ class AfterEffectsSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
key=key,
value=val)
# to recognize job from PYPE for turning Event On/Off
dln_job_info.EnvironmentKeyValue = "PYPE_RENDER_JOB=1"
dln_job_info.EnvironmentKeyValue = "OPENPYPE_RENDER_JOB=1"
return dln_job_info

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
@ -288,7 +288,7 @@ class HarmonySubmitDeadline(
value=val)
# to recognize job from PYPE for turning Event On/Off
job_info.EnvironmentKeyValue = "PYPE_RENDER_JOB=1"
job_info.EnvironmentKeyValue = "OPENPYPE_RENDER_JOB=1"
return job_info

View file

@ -441,17 +441,17 @@ 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["PYPE_RENDER_JOB"] = "1"
environment["OPENPYPE_RENDER_JOB"] = "1"
self.payload_skeleton["JobInfo"].update({
"EnvironmentKeyValue%d" % index: "{key}={value}".format(
key=key,
@ -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
@ -279,7 +279,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin):
environment = clean_environment
# to recognize job from PYPE for turning Event On/Off
environment["PYPE_RENDER_JOB"] = "1"
environment["OPENPYPE_RENDER_JOB"] = "1"
payload["JobInfo"].update({
"EnvironmentKeyValue%d" % index: "{key}={value}".format(
key=key,

View file

@ -114,16 +114,16 @@ 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",
"PYPE_PUBLISH_JOB"
"PYPE_LOG_NO_COLORS",
"PYPE_USERNAME",
"PYPE_RENDER_JOB",
"PYPE_PUBLISH_JOB"
"OPENPYPE_PUBLISH_JOB"
"OPENPYPE_LOG_NO_COLORS",
"OPENPYPE_USERNAME",
"OPENPYPE_RENDER_JOB",
"OPENPYPE_PUBLISH_JOB"
]
# custom deadline atributes
@ -223,10 +223,10 @@ 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["PYPE_PUBLISH_JOB"] = "1"
environment["PYPE_RENDER_JOB"] = "0"
environment["OPENPYPE_LOG_NO_COLORS"] = "1"
environment["OPENPYPE_USERNAME"] = instance.context.data["user"]
environment["OPENPYPE_PUBLISH_JOB"] = "1"
environment["OPENPYPE_RENDER_JOB"] = "0"
args = [
'publish',
@ -1048,4 +1048,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,15 +3,15 @@
"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"
]
}
},

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

@ -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

@ -27,7 +27,7 @@ class PypeMongoWidget(QtWidgets.QWidget):
# 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.setText(os.environ["OPENPYPE_MONGO"])
# Confirm button
mongo_url_change_btn = QtWidgets.QPushButton("Confirm Change", self)

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

@ -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"):