Skip to main content

Framework core

The framework-core library is constructed around a few key components: the Host, the Client, the Event Manager, and the Registry. In essence, the framework-core library's functionality is established by initializing the Host and the Client, which then interact through events managed by the Event Manager. Meanwhile, the Registry is leveraged to manage and provide extensions, with a set of default ones available in the framework-common-extensions project.

Host

The Host plays a pivotal role in the framework. Its main responsibilities include:

  • Managing interactions with the underlying application that the host runs within, typically a DCC (Digital Content Creation) application, through plugins.
  • Instantiated with an Event Manager, facilitating communication between the Host and the Client.
  • Execute tool-configs on demand by the client on the Engine.
Host(event_manager, registry=registry_instance)

Client

The Client component is tasked with:

  • Reading the tool configuration and context from the Host.
  • Running framework dialogs (interactive/GUI mode)
  • Instructing the Host to execute the augmented tool configuration, its plugins, and options gathered from the user.
client = Client(event_manager, registry=registry_instance)

Event Manager

The Event Manager is integral for:

  • Facilitating communication between the Host and the Client.
  • Managing and dispatching events within the system.
  • Being instantiated with a session to handle these events effectively.
event_manager = EventManager(
session=session, mode=constants.event.LOCAL_EVENT_MODE
)

Registry

The Registry serves to:

  • Store and manage extensions within the framework.
  • Be instantiated and scanned to identify available extensions.
  • Provide default extensions, which are included in the framework-common-extensions.
registry_instance = Registry()
registry_instance.scan_extensions(paths=framework_extensions_path)