owned this note changed 3 years ago
Linked with GitHub

Brush Management

Just some quick notes in preparation for further discussions.

Brush Assets: Design notes

  • Brushes are appended, not linked (no library overrides)
  • There are generally two kinds assets:
    • Preset Assets: Using means applying (poses, matcaps, )
    • Primitive Assets: Using means importing (objects, materials, )
  • Based on that, two possible choices:
    1. Brushes as presets: There's only a single local brush (per file/mode/scene/?) - the active brush. Activating a brush from the asset library means its settings copy over the active brush. Changes are lost when switching brushes.
    2. Brushes as primitives: Activating a brush from the asset library means appending and setting it as active. If a brush was already used (appended) before, that is reused rather than re-appending it. Hence, changes are not lost when switching brushes or reloading the file. Operators for resetting brushes will be needed.
  • If users end up rarely tweaking settings and switch brushes instead, 1) is a nice & simple design.
  • The difficult parts for 2) are already there, this is basically the Append (Reuse Data) workflow. Note that the references to the original asset are just references that may break. The appended brush is still there then, but this case needs some consideration.
  • A global (or default) brush library and asset "pushing" are crucial. Pushing is planned as an add-on.
  • Standard Asset Library: Asset library that always comes with Blender. Could contain 100s of brushes.
    • Readonly library. Or: Brushes are generated on asset library loading if not there. Accidental deletion of basic brushes not possible.
    • Open question: How are custom brushes combined with that?

Brush Assets: What needs to be done?

When the Extended Asset Browser is enabled in Preferences > Experimental, brushes can already be marked as Assets (e.g. from data-block selectors or the Outliner). However they cannot be used or activated in any way. Can be tackled as follows:

  • Add brush activation operator that's registered in the keymap to act on double clicks in Asset Browsers.

With that brushes should be ready for experiments and development of the new workflow. Everything else is just building extra things, e.g.:

  • Both the preset and primitive brush asset design.
  • Brush selector in the sidebar (template_asset_view())
  • Quick brush picker (right click)

  • (More in sections below)

For the asset system it doesn't matter what brushes are exactly, for as long as they are appendable IDs (otherwise more work would be needed). So brush engine and brush definition designs shouldn't conflict.

Select a repo