def install(): """Install Premiere-specific functionality of avalon-core. This is where you install menus and register families, data and loaders into Premiere. It is called automatically when installing via `api.install(premiere)`. See the Maya equivalent for inspiration on how to implement this. """ # Disable all families except for the ones we explicitly want to see family_states = ["imagesequence", "mov"] avalon.data["familiesStateDefault"] = False avalon.data["familiesStateToggled"] = family_states log.info("pype.hosts.premiere installed") pyblish.register_host("premiere") pyblish.register_plugin_path(PUBLISH_PATH) log.info("Registering Premiera plug-ins..") avalon.register_plugin_path(avalon.Loader, LOAD_PATH) avalon.register_plugin_path(avalon.Creator, CREATE_PATH)
def install(): """Install resolve-specific functionality of avalon-core. This is where you install menus and register families, data and loaders into resolve. It is called automatically when installing via `api.install(resolve)`. See the Maya equivalent for inspiration on how to implement this. """ from .. import get_resolve_module # Disable all families except for the ones we explicitly want to see family_states = [ "imagesequence", "render2d", "plate", "render", "mov", "clip" ] avalon.data["familiesStateDefault"] = False avalon.data["familiesStateToggled"] = family_states log.info("pype.hosts.resolve installed") pyblish.register_host("resolve") pyblish.register_plugin_path(PUBLISH_PATH) log.info("Registering DaVinci Resovle plug-ins..") avalon.register_plugin_path(avalon.Loader, LOAD_PATH) avalon.register_plugin_path(avalon.Creator, CREATE_PATH) avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH) # register callback for switching publishable pyblish.register_callback("instanceToggled", on_pyblish_instance_toggled) get_resolve_module()
def install(): """Install fusion-specific functionality of avalon-core. This is where you install menus and register families, data and loaders into fusion. It is called automatically when installing via `api.install(avalon.fusion)` See the Maya equivalent for inspiration on how to implement this. """ # Disable all families except for the ones we explicitly want to see family_states = ["imagesequence", "camera", "pointcache"] avalon.data["familiesStateDefault"] = False avalon.data["familiesStateToggled"] = family_states log.info("openpype.hosts.fusion installed") pyblish.register_host("fusion") pyblish.register_plugin_path(PUBLISH_PATH) log.info("Registering Fusion plug-ins..") avalon.register_plugin_path(avalon.Loader, LOAD_PATH) avalon.register_plugin_path(avalon.Creator, CREATE_PATH) avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH) pyblish.register_callback("instanceToggled", on_pyblish_instance_toggled)
def install(config): """Install Fusion-specific functionality of avalon-core. This function is called automatically on calling `api.install(fusion)`. """ # TODO: Register Fusion callbacks # TODO: Set project # TODO: Install Fusion menu (this is done with config .fu script actually) pyblish.register_host("fusion") # Remove all handlers associated with the root logger object, because # that one sometimes logs as "warnings" incorrectly. for handler in logging.root.handlers[:]: logging.root.removeHandler(handler) # Attach default logging handler that prints to active comp logger = logging.getLogger() formatter = logging.Formatter(fmt="%(message)s\n") handler = CompLogHandler() handler.setFormatter(formatter) logger.addHandler(handler) logger.setLevel(logging.DEBUG) # Trigger install on the config's "fusion" package try: config = importlib.import_module(config.__name__ + ".fusion") except ImportError: pass else: if hasattr(config, "install"): config.install()
def install(): """ Installing Nukestudio integration for avalon Args: config (obj): avalon config module `pype` in our case, it is not used but required by avalon.api.install() """ # adding all events _register_events() log.info("Registering NukeStudio plug-ins..") pyblish.register_host("nukestudio") pyblish.register_plugin_path(PUBLISH_PATH) avalon.register_plugin_path(avalon.Loader, LOAD_PATH) avalon.register_plugin_path(avalon.Creator, CREATE_PATH) avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH) # Disable all families except for the ones we explicitly want to see family_states = ["write", "review", "plate"] avalon.data["familiesStateDefault"] = False avalon.data["familiesStateToggled"] = family_states # install menu menu_install() # register hiero events register_hiero_events()
def install(): log.info("Jiminy Cricket, at your service.") _register_callbacks() if not IS_HEADLESS: _install_menu() pyblish.register_host("maya") config = find_config() config.install() register_config(config)
def install(): """Install Nuke-specific functionality of avalon-core. This is where you install menus and register families, data and loaders into Nuke. It is called automatically when installing via `api.install(nuke)`. See the Maya equivalent for inspiration on how to implement this. """ _install_menu() _register_events() pyblish.register_host("nuke")
def get_all_plugins(): search_directory = os.path.abspath( os.path.join(__file__, "..", "..", "pyblish_bumpybox", "plugins")) directories = [search_directory] for root, dirs, files in os.walk(search_directory): for d in dirs: directories.append(os.path.join(root, d)) hosts = [ "nukeassist", "nuke", "maya", "nukestudio", "hiero", "houdini", "celaction", "ftrack" ] for host in hosts: api.register_host(host) return api.discover(paths=directories)
def install(config): """ Installing Nukestudio integration for avalon Args: config (obj): avalon config module `pype` in our case, it is not used but required by avalon.api.install() """ # adding all events _register_events() log.info("Registering NukeStudio plug-ins..") pyblish.register_host("nukestudio") pyblish.register_plugin_path(PUBLISH_PATH) avalon.register_plugin_path(avalon.Loader, LOAD_PATH) avalon.register_plugin_path(avalon.Creator, CREATE_PATH) avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH) # Disable all families except for the ones we explicitly want to see family_states = [ "write", "review" ] avalon.data["familiesStateDefault"] = False avalon.data["familiesStateToggled"] = family_states # install menu menu_install() # Workfiles. launch_workfiles = os.environ.get("WORKFILES_STARTUP") if launch_workfiles: hiero.core.events.registerInterest( "kAfterNewProjectCreated", launch_workfiles_app ) # Add tags on project load. hiero.core.events.registerInterest( "kAfterProjectLoad", add_tags )
def install(config): """Install Maya-specific functionality of avalon-core. This function is called automatically on calling `api.install(maya)`. """ # Inherit globally set name self._menu = api.Session["AVALON_LABEL"] + "menu" _register_callbacks() _register_events() _set_project() # Check if maya version is compatible else fix it, Maya2018 only # Should be run regardless of batch mode compat.install() if not IS_HEADLESS: _install_menu() pyblish.register_host("mayabatch") pyblish.register_host("mayapy") pyblish.register_host("maya") config = find_host_config(config) if hasattr(config, "install"): config.install()
def install(config): """Install Maya-specific functionality of avalon-core. This function is called automatically on calling `api.install(maya)`. """ # Inherit globally set name self._menu = api.Session["AVALON_LABEL"] + "menu" _register_callbacks() _register_events() _set_project() # Check if maya version is compatible else fix it, Maya2018 only # Should be run regardless of batch mode compat.install() if not IS_HEADLESS: _install_menu() pyblish.register_host("mayabatch") pyblish.register_host("mayapy") pyblish.register_host("maya") try: config = importlib.import_module(config.__name__ + ".maya") except ImportError as exc: if str(exc) != "No module name {}".format(config.__name__ + ".maya"): raise else: config.install()
def install(config): """Install Maya-specific functionality of avalon-core. This function is called automatically on calling `api.install(maya)`. """ # Inherit globally set name self._menu = api.Session["AVALON_LABEL"] + "menu" _register_callbacks() _set_project() if not IS_HEADLESS: _install_menu() pyblish.register_host("mayabatch") pyblish.register_host("mayapy") pyblish.register_host("maya") try: config = importlib.import_module(config.__name__ + ".maya") except ImportError: pass else: config.install()
def install(config): """Install Nuke-specific functionality of avalon-core. This is where you install menus and register families, data and loaders into Nuke. It is called automatically when installing via `api.install(nuke)`. See the Maya equivalent for inspiration on how to implement this. """ _install_menu() _register_events() pyblish.register_host("nuke") # Trigger install on the config's "nuke" package config = find_host_config(config) if hasattr(config, "install"): config.install() log.info("config.nuke installed")
def get_all_plugins(): search_directory = os.path.abspath( os.path.join(__file__, "..", "..", "pyblish_bumpybox", "plugins") ) directories = [search_directory] for root, dirs, files in os.walk(search_directory): for d in dirs: directories.append(os.path.join(root, d)) hosts = [ "nukeassist", "nuke", "maya", "nukestudio", "hiero", "houdini", "celaction", "ftrack" ] for host in hosts: api.register_host(host) return api.discover(paths=directories)
from pyblish import api from pyblish_bumpybox import inventory api.register_host('tvpaint') class CollectSceneArg(api.ContextPlugin): """""" order = inventory.get_order(__file__, "CollectSceneArg") def process(self, context): path = context.data('kwargs')['data']['scene'] context.set_data('currentFile', value=path)
from pyblish import api from pyblish_bumpybox import inventory api.register_host('tvpaint') class CollectSceneArg(api.ContextPlugin): """""" order = inventory.get_order(__file__, "CollectSceneArg") def process(self, context): path = context.data('kwargs')['data']['scene'] context.set_data('currentFile', value=path)
def register_host(): """Register supported hosts""" api.register_host("nuke")