Skip to content

Externalise Configuration #165

@mottosso

Description

@mottosso

Goal

Enable use of mindbender-core in varying production requirements, including paths, kinds of assets and default values.

Motivation

At the moment, paths, content validations, how things are loaded and intended to be created are all embedded into the core repository. I've designed it such that configuration and functionality are conceptually separated but hosted together in order to simplify the development during the early stages.

The configuration is..

  1. Publishing plug-ins, hosted in /plugins
  2. Loader plug-ins, hosted in {app}/loaders
  3. Creator plug-ins, hosted in {app}/creators (Related Creator Plug-ins #157)

Beyond this, there is the inventory for defining and customising project and project content.

The time has now come to expand on what is made possible by the project and doing so means separating company configuration from core functionality. This will enable others, such as @BigRoy to adopt our core, whilst still maintaining their own individual workflow, and then work with us on building a stronger foundation.

Implementation

The aforementioned configuration is to be hosted in an individual Git repository, config. It will continue to grow independently of the underlying code and kept together via setup

The goal is to enable future studios to build their own config repository to customise every relevant aspect of the core production pipeline.

Requirements

Currently, these conceptual items are included in configuration.

  • Inventory
  • Creators
  • Loaders
  • Publishers

Each but the inventory also require additional customisation per application. For example, publishing from Maya require access to the Maya API, whereas publishing from Nuke requires a different API.

The resulting directory layout could either be concept-first or application-first.

We'll be using it in one of two ways.

  1. A high-level installation process
  2. A component-wise registration process

With (1), the entire configuration is configured internally and boasts an entrypoint for installation, whereas (2) implies that the user of said configuration is responsible for registering the individual components - e.g. publishers and loaders - on their own.

High-level installation process

This is likely the simplest in end-user terms, but possible less flexible and maintainable as it requires a more fixed API.

from mindbender import api
api.register_config("c:\path\to\config")
# Installing Mindbender Config..
#   Running application startup script (maya/userSetup.py)..
#   Installing plug-ins..
#     publishers..OK
#     creators..OK
#     loader..OK

Component-wise

On the other hand, simply hosting disparate components in a repository and allowing the user to pick as desired is simpler to maintain and is more configurable, but more difficult to install.

from mindbender import api
api.register_publishers("c:\path\to\config\publishers")
api.register_publishers("c:\path\to\config\maya\publishers")
api.register_loaders("c:\path\to\config\loaders")
api.register_loaders("c:\path\to\config\maya\loaders")
api.register_creators("c:\path\to\config\creators")
api.register_creators("c:\path\to\config\maya\creators")

Application First

└── config
    ├── maya
    │   ├── creators
    │   │   ├── mindbender.model.py
    │   │   └── mindbender.rig.py
    │   ├── loaders
    │   │   ├── mindbender.model.py
    │   │   └── mindbender.rig.py
    │   ├── publishers
    │   │   ├── validate_normals.py
    │   │   └── extract_alembic.py
    │   ├── __init__.py
    │   └── lib.py
    ├── nuke
    │   ├── creators
    │   ├── loaders
    │   └── publishers
    │
    │   # Global plug-ins, applicable to all apps
    ├── creators
    │   └── mindbender.group.py
    ├── loaders
    │   └── mindbender.group.py
    └── publishers
        └── validate_name.py

Concept First

└── config
    ├── creators
    │   ├── maya
    │   │   ├── mindbender.animation.py
    │   │   ├── mindbender.rig.py
    │   │   └── mindbender.lookdev.py
    │   └── nuke
    │       ├── mindbender.composite.py
    │       ├── mindbender.slapcomp.py
    │       └── mindbender.final.py
    ├── loaders
    │   ├── maya
    │   └── nuke
    ├── publishers
    │   ├── maya
    │   │   ├── validate_normals.py
    │   │   └── extract_alembic.py
    │   └── nuke
    │       ├── mindbender.composite.py
    │       ├── mindbender.slapcomp.py
    │       └── mindbender.final.py
    │ 
    │   # Application-level utilities and tools
    ├── nuke
    │   ├── __init__.py
    │   └── lib.py
    └── maya
        ├── __init__.py
        └── lib.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions