def setup(): pyblish_maya.setup() api.install(maya) io.install("test") self._tempdir = tempfile.mkdtemp() api.register_root(self._tempdir) schema.validate(self._config) schema.validate(self._inventory) inventory.save(name=PROJECT_NAME, config=self._config, inventory=self._inventory) project = io.find_one({"type": "project", "name": PROJECT_NAME}) asset = io.find_one({ "type": "asset", "parent": project["_id"], "name": ASSET_NAME }) # Setup environment os.environ["MINDBENDER__PROJECT"] = str(project["_id"]) os.environ["MINDBENDER__ASSET"] = str(asset["_id"]) os.environ["MINDBENDER_PROJECT"] = PROJECT_NAME os.environ["MINDBENDER_ASSET"] = asset["name"] os.environ["MINDBENDER_ASSETPATH"] = ( "{root}/{project}/{silo}/{asset}".format(root=api.registered_root(), project=PROJECT_NAME, asset=ASSET_NAME, silo="assets")) os.environ["MINDBENDER_SILO"] = "assets"
def setup(): self._tempdir = tempfile.mkdtemp() api.register_root(self._tempdir) # Setup environment os.environ["AVALON_CONFIG"] = "polly" os.environ["AVALON_PROJECT"] = PROJECT_NAME os.environ["AVALON_ASSET"] = ASSET_NAME os.environ["AVALON_TASK"] = TASK_NAME os.environ["AVALON_ASSETPATH"] = ("{root}/{project}/{silo}/{asset}".format( root=api.registered_root(), project=PROJECT_NAME, asset=ASSET_NAME, silo="assets")) os.environ["AVALON_SILO"] = "assets" api.install(maya) io.activate_project(PROJECT_NAME) schema.validate(self._config) schema.validate(self._inventory) inventory.save(name=PROJECT_NAME, config=self._config, inventory=self._inventory)
def reload_pipeline(*args): """Attempt to reload pipeline at run-time. Warning: This is primarily for development and debugging purposes and not well tested. """ api.uninstall() for module in ( "avalon.io", "avalon.lib", "avalon.pipeline", "avalon.blender.pipeline", "avalon.blender.lib", "avalon.tools.loader.app", "avalon.tools.creator.app", "avalon.tools.manager.app", "avalon.api", "avalon.tools", "avalon.blender", ): module = importlib.import_module(module) importlib.reload(module) import avalon.blender api.install(avalon.blender)
def setup(): print("pipeline: Setting up..") from pyblish import api api.register_gui("pyblish_lite") from mindbender import api, nuke api.install(nuke) print("pipeline: Finished!")
def reload_pipeline(*args): """Attempt to reload pipeline at run-time. CAUTION: This is primarily for development and debugging purposes. """ import importlib api.uninstall() for module in ("avalon.io", "avalon.lib", "avalon.pipeline", "avalon.houdini.pipeline", "avalon.houdini.lib", "avalon.tools.loader.app", "avalon.tools.creator.app", "avalon.tools.manager.app", # NOTE(marcus): These have circular depenendencies # that is preventing reloadability # "avalon.tools.cbloader.delegates", # "avalon.tools.cbloader.model", # "avalon.tools.cbloader.widgets", # "avalon.tools.cbloader.app", # "avalon.tools.cbsceneinventory.model", # "avalon.tools.cbsceneinventory.proxy", # "avalon.tools.cbsceneinventory.app", # "avalon.tools.projectmanager.dialogs", # "avalon.tools.projectmanager.lib", # "avalon.tools.projectmanager.model", # "avalon.tools.projectmanager.style", # "avalon.tools.projectmanager.widget", # "avalon.tools.projectmanager.app", "avalon.api", "avalon.tools", "avalon.houdini"): module = importlib.import_module(module) reload(module) self._parent = {hou.ui.mainQtWindow().objectName(): hou.ui.mainQtWindow()} import avalon.houdini api.install(avalon.houdini)
def reload_pipeline(*args): """Attempt to reload pipeline at run-time. CAUTION: This is primarily for development and debugging purposes. """ api.uninstall() for module in ("avalon.io", "avalon.lib", "avalon.pipeline", "avalon.houdini.pipeline", "avalon.houdini.lib", "avalon.tools.creator.app", "avalon.api", "avalon.tools", "avalon.houdini"): module = importlib.import_module(module) reload(module) get_main_window() import avalon.houdini api.install(avalon.houdini)