mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
remove launcher plugins
This commit is contained in:
parent
a48c678342
commit
aab1a3145a
3 changed files with 0 additions and 127 deletions
|
|
@ -1,45 +0,0 @@
|
||||||
from avalon import api, lib
|
|
||||||
|
|
||||||
from pype.api import Logger
|
|
||||||
|
|
||||||
log = Logger().get_logger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class AssetCreator(api.Action):
|
|
||||||
|
|
||||||
name = "asset_creator"
|
|
||||||
label = "Asset Creator"
|
|
||||||
icon = "plus-square"
|
|
||||||
order = 250
|
|
||||||
|
|
||||||
def is_compatible(self, session):
|
|
||||||
"""Return whether the action is compatible with the session"""
|
|
||||||
compatible = True
|
|
||||||
|
|
||||||
# Check required modules.
|
|
||||||
module_names = [
|
|
||||||
"ftrack_api", "ftrack_api_old", "pype.tools.assetcreator"
|
|
||||||
]
|
|
||||||
for name in module_names:
|
|
||||||
try:
|
|
||||||
__import__(name)
|
|
||||||
except ImportError:
|
|
||||||
compatible = False
|
|
||||||
|
|
||||||
# Check session environment.
|
|
||||||
if "AVALON_PROJECT" not in session:
|
|
||||||
compatible = False
|
|
||||||
|
|
||||||
return compatible
|
|
||||||
|
|
||||||
def process(self, session, **kwargs):
|
|
||||||
asset = ''
|
|
||||||
if 'AVALON_ASSET' in session:
|
|
||||||
asset = session['AVALON_ASSET']
|
|
||||||
return lib.launch(
|
|
||||||
executable="python",
|
|
||||||
args=[
|
|
||||||
"-u", "-m", "pype.tools.assetcreator",
|
|
||||||
session['AVALON_PROJECT'], asset
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
import os
|
|
||||||
from avalon import api, lib
|
|
||||||
|
|
||||||
|
|
||||||
class FusionRenderNode(api.Action):
|
|
||||||
|
|
||||||
name = "fusionrendernode9"
|
|
||||||
label = "F9 Render Node"
|
|
||||||
icon = "object-group"
|
|
||||||
order = 997
|
|
||||||
|
|
||||||
def is_compatible(self, session):
|
|
||||||
"""Return whether the action is compatible with the session"""
|
|
||||||
if "AVALON_PROJECT" in session:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def process(self, session, **kwargs):
|
|
||||||
"""Implement the behavior for when the action is triggered
|
|
||||||
|
|
||||||
Args:
|
|
||||||
session (dict): environment dictionary
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Popen instance of newly spawned process
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Update environment with session
|
|
||||||
env = os.environ.copy()
|
|
||||||
env.update(session)
|
|
||||||
|
|
||||||
# Get executable by name
|
|
||||||
app = lib.get_application(self.name)
|
|
||||||
env.update(app["environment"])
|
|
||||||
executable = lib.which(app["executable"])
|
|
||||||
|
|
||||||
return lib.launch(executable=executable, args=[], environment=env)
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
import os
|
|
||||||
|
|
||||||
from avalon import api, lib
|
|
||||||
|
|
||||||
|
|
||||||
class VrayRenderSlave(api.Action):
|
|
||||||
|
|
||||||
name = "vrayrenderslave"
|
|
||||||
label = "V-Ray Slave"
|
|
||||||
icon = "object-group"
|
|
||||||
order = 996
|
|
||||||
|
|
||||||
def is_compatible(self, session):
|
|
||||||
"""Return whether the action is compatible with the session"""
|
|
||||||
if "AVALON_PROJECT" in session:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def process(self, session, **kwargs):
|
|
||||||
"""Implement the behavior for when the action is triggered
|
|
||||||
|
|
||||||
Args:
|
|
||||||
session (dict): environment dictionary
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Popen instance of newly spawned process
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Update environment with session
|
|
||||||
env = os.environ.copy()
|
|
||||||
env.update(session)
|
|
||||||
|
|
||||||
# Get executable by name
|
|
||||||
app = lib.get_application(self.name)
|
|
||||||
env.update(app["environment"])
|
|
||||||
executable = lib.which(app["executable"])
|
|
||||||
|
|
||||||
# Run as server
|
|
||||||
arguments = ["-server", "-portNumber=20207"]
|
|
||||||
|
|
||||||
return lib.launch(executable=executable,
|
|
||||||
args=arguments,
|
|
||||||
environment=env)
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue