Brush Assets: Store assets outside Main #117730

Manually merged
Brecht Van Lommel merged 18 commits from brecht/blender:brush-separate-main into brush-assets-project 2024-02-27 14:53:03 +01:00

This is an experiment, but we hope this can become stable
and in an acceptable state in the brush-assets-project branch.

  • One main database per asset blend file, so that there are no
    conflicts between the regular main and different asset blend files.
  • Various code for avoiding conflicts and untangling databases can
    be removed because of this.
  • Assets are appended to this, no linking and overrides. Highlighting
    property changes is gone because of this. This change does not
    necessarily need to be made along with the rest, but it does simplify
    making renaming and editing textures work.
  • Some basic checks to avoid linking between regular main and
    asset main, but much more would be needed.
  • Tool settings brush pointers were changed to do no user counting,
    but really should not be part of ID management at all and handled
    purely through some runtime lookup outside of it.
  • Basic texture editing works and gets saved and loaded. But will need
    more work for all operators, RNA, editors to deal with different mains.

Includes other changes for brush/tool selection.

  • Remove "brush select" operator
  • Remove creating a new brush on Paint init when none is found
  • Remove unnecessary tool -> brush connection
  • Remove BRUSH_OT_add operator
This is an experiment, but we hope this can become stable and in an acceptable state in the brush-assets-project branch. * One main database per asset blend file, so that there are no conflicts between the regular main and different asset blend files. * Various code for avoiding conflicts and untangling databases can be removed because of this. * Assets are appended to this, no linking and overrides. Highlighting property changes is gone because of this. This change does not necessarily need to be made along with the rest, but it does simplify making renaming and editing textures work. * Some basic checks to avoid linking between regular main and asset main, but much more would be needed. * Tool settings brush pointers were changed to do no user counting, but really should not be part of ID management at all and handled purely through some runtime lookup outside of it. * Basic texture editing works and gets saved and loaded. But will need more work for all operators, RNA, editors to deal with different mains. Includes other changes for brush/tool selection. * Remove "brush select" operator * Remove creating a new brush on Paint init when none is found * Remove unnecessary tool -> brush connection * Remove BRUSH_OT_add operator
Brecht Van Lommel requested review from Bastien Montagne 2024-02-01 18:58:53 +01:00
Brecht Van Lommel requested review from Julian Eisel 2024-02-01 18:58:54 +01:00
Brecht Van Lommel requested review from Hans Goudey 2024-02-01 18:58:54 +01:00
Brecht Van Lommel changed title from Brush Assets: experiment storing brush asset outside Main to WIP: Brush Assets: experiment storing brush asset outside Main 2024-02-01 18:59:05 +01:00
Brecht Van Lommel force-pushed brush-separate-main from 5fb4dce947 to 44d253d0c4 2024-02-01 19:02:37 +01:00 Compare
Brecht Van Lommel added 3 commits 2024-02-01 22:42:00 +01:00

TL;DR: I don't think we should go that way. While I can see the interest of supporting multiple Main in the UI, RNA, and whole Blender, I see implementing this idea as a massive amount of work, and a huge amounts of aftermath and maintenance burden in the future years. I think we already have way too many unfinished/in-need-of-improvements code in the Core area, to not add yet another monster to the list. Definitively not as part of another project that is supposed to be 'done' in a few months.

  • One main database per asset blend file, so that there are no
    conflicts between the regular main and different asset blend files.

This will become an issue I think if we keep the idea of one asset blendfile per brush? Having to deal with hundreds of Main data-bases does not sounds great. I think this would work better if there is one blendfile per asset library.

  • Various code for avoiding conflicts and untangling databases can
    be removed because of this.

Don't really see this as a benefit? The cost of properly supporting multiple Main databases will be orders of magnitude higher than this simplification improvement.

  • Assets are appended to this, no linking and overrides. Highlighting
    property changes is gone because of this. This change does not
    necessarily need to be made along with the rest, but it does simplify
    making renaming and editing textures work.

I have no idea how much artists and brush designers would like to have this 'diff preview' feature that comes 'for free' with the liboverrides... This is indeed the only real remaining reason to use them, now that the whole 'draft' concept has been abandoned. The other main benefit (having link to original asset) becomes irrelevant with the idea of having one Main database per asset file.

  • Some basic checks to avoid linking between regular main and
    asset main, but much more would be needed.
  • Tool settings brush pointers were changed to do no user counting,
    but really should not be part of ID management at all and handled
    purely through some runtime lookup outside of it.
  • Basic texture editing works and gets saved and loaded. But will need
    more work for all operators, RNA, editors to deal with different mains.

These three points are likely only a subset of all the issues we'd have to tackle. And things like making RNA, tools and UI properly support data from multiple Main databases is already a giant amount of work imho.

TL;DR: I don't think we should go that way. While I can see the interest of supporting multiple Main in the UI, RNA, and whole Blender, I see implementing this idea as a massive amount of work, and a _huge_ amounts of aftermath and maintenance burden in the future years. I think we already have way too many unfinished/in-need-of-improvements code in the Core area, to not add yet another monster to the list. Definitively not as part of another project that is supposed to be 'done' in a few months. > * One main database per asset blend file, so that there are no > conflicts between the regular main and different asset blend files. This will become an issue I think if we keep the idea of one asset blendfile per brush? Having to deal with hundreds of Main data-bases does not sounds great. I think this would work better if there is one blendfile per asset library. > * Various code for avoiding conflicts and untangling databases can > be removed because of this. Don't really see this as a benefit? The cost of properly supporting multiple Main databases will be orders of magnitude higher than this simplification improvement. > * Assets are appended to this, no linking and overrides. Highlighting > property changes is gone because of this. This change does not > necessarily need to be made along with the rest, but it does simplify > making renaming and editing textures work. I have no idea how much artists and brush designers would like to have this 'diff preview' feature that comes 'for free' with the liboverrides... This is indeed the only real remaining reason to use them, now that the whole 'draft' concept has been abandoned. The other main benefit (having link to original asset) becomes irrelevant with the idea of having one Main database per asset file. > * Some basic checks to avoid linking between regular main and > asset main, but much more would be needed. > * Tool settings brush pointers were changed to do no user counting, > but really should not be part of ID management at all and handled > purely through some runtime lookup outside of it. > * Basic texture editing works and gets saved and loaded. But will need > more work for all operators, RNA, editors to deal with different mains. These three points are likely only a subset of all the issues we'd have to tackle. And things like making RNA, tools and UI properly support data from multiple Main databases is already a giant amount of work imho.
Hans Goudey added 11 commits 2024-02-21 21:11:08 +01:00
ef391974ff Cleanup: Use construct after first use idiom
Removes the need to manually free the mains, since the static variable
will be destructed in the proper order. But still keep that for now, just in case.
629d1c3c4b Cleanup: Remove some unnecessary temporary main variables
Maybe this makes it a bit harder to use the wrong main by mistake
45b5c20f20 Remove BRUSH_OT_add operator
This doesn't seem to be visible anywhere in the UI. New brushes
are more easily created by duplicating existing brushes anyway.
716a582583 Remove unnecessary tool -> brush connection
These were adding brushes and finding brushes in the active (non-asset)
main. This sort of thing should be handled differently now anyway
99e6409a2e Remove creating a new brush on Paint init when none is found
Now instead of creating a brush from scratch, the default asset
should be used instead. I'm pretty sure that is done elsewhere,
and if it isn't it should be fixed.
67bb4a80b9 Remove "brush select" operator
Selecting a brush based on the tool type isn't done anymore,
and this operator doesn't really make sense in the context of
prioritizing brush selection instead of tool selection / the asset
shelf. It would otherwise have to be fixed for storing brush
data-blocks in other mains.
Hans Goudey added 1 commit 2024-02-21 23:10:16 +01:00
Hans Goudey added 2 commits 2024-02-22 19:05:22 +01:00
Hans Goudey changed title from WIP: Brush Assets: experiment storing brush asset outside Main to Brush Assets: experiment storing brush asset outside Main 2024-02-23 22:47:53 +01:00
Member

As an update, we talked about this more in chat and decided the benefits of using a separate main to store the runtime/local brush assets would be worth it. There is still more work to do, but having a separate branch isn't helpful anymore, so we decided to merge this into the brush assets branch.

As an update, we talked about this more in chat and decided the benefits of using a separate main to store the runtime/local brush assets would be worth it. There is still more work to do, but having a separate branch isn't helpful anymore, so we decided to merge this into the brush assets branch.
Brecht Van Lommel changed title from Brush Assets: experiment storing brush asset outside Main to Brush Assets: Store assets outside Main 2024-02-27 14:41:47 +01:00
Brecht Van Lommel manually merged commit b030911aa9 into brush-assets-project 2024-02-27 14:53:03 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117730
No description provided.