mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
changed environment prefixes in rest of pype module
This commit is contained in:
parent
43572b5b6f
commit
7f15ef8d81
14 changed files with 40 additions and 41 deletions
10
pype/cli.py
10
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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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 ...")
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -49,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":
|
||||
|
|
@ -78,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 = [
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
20
start.py
20
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)
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue