Adds a new asset shelf option (`STORE_ENABLED_CATALOGS_IN_PREFERENCES` option in BPY) to use the Preferences for storing the enabled catalogs. This way asset shelf types can decide if for their use-case, they want to synchronize the enabled catalogs over Blender sessions and files, or keep the stored locally in the file.
This is important because for example on one hand, it would be annoying if for brush assets you'd have to enable the visible catalog tabs for every 3D View and every file, while on the other hand you need that level of control for the pose library where the catalogs the rigger/animator cares about varies from project to project, character to character and shot to shot.
Conceptually this also makes some sense: The new brush assets workflow synchronizes brush assets and their catalogs across Blender sessions and files, basically making them globally accessible independent of the current file/project, so treating the enabled catalogs the same is consistent.
Pull Request: #120264
The asset system makes some assumptions about these `.asset.blend`
files that make working with them much easier. Disallowing manual
saving was a way to help keep those assumptions true. However
it also gets in the way when working with these files.
This PR removes the stripping of the ".asset" part of the file path
and rephrases the warning message.
Pull Request: #120746
Add an operator to edit the catalog, author, and description of brush
assets. This doesn't edit the preview image yet, I prefer to add that
separately.
![image](/attachments/50ab300d-f130-44be-9134-df7a3a15b233)
Pull Request: #120081
Use the library from the operator's last execution instead of storing a
"default" option in the user preferences. Or if the last library isn't available,
use the current library as a default, or the first library if the current
library isn't editable.
Also use the asset's current catalog path for the initial asset path.
Pull Request: #120028
* Move from paint_ops.cc and asset_weak_reference.cc into asset_edit.cc
* Rename AssetWeakReferenceMain to AssetEditBlend
* Change some functions to be based on ID instead of main pointer
* Make most of save as and update code no longer brush specific
Pull Request: #119888
This is done by reloading or freeing the entire main of the asset, and
remapping pointers for all datablocks contained in it. This remapping is
primarily needed for the user interface to point to the same datablocks.
Pull Request: #119806
Otherwise a name change doesn't update the asset shelf.
Though there are still other issues with renaming- duplicate brushes
will be created when renaming a local copy, switching brushes, then
switching back. Other local changes will also be lost in that case.
I found two cases where `BKE_blender_free` frees pointers that
are owned by the asset main, resulting in use-after-frees:
- Image pool for sculpt brush evaluation
- Freeing the "moviecache" system which isn't stored per-Main
To fix these, free the asset main data-bases after the global main.
This code that set a different tool as active depending on the brush
isn't relevant anymore. It's possible that the deletion could go further
into Python code, but the separation isn't so clear there.
Including no main database cases that were not checked previously.
Replaces BKE_id_is_in_global_main assets by moving them in
BKE_main_from_id which needs to be called anyway.
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.
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.
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
Pull Request: #117730
Adds the ability to choose which of the libraries catalogs to add the
new asset to, or to create a new catalog. The catalogs are presented
in a dropdown list, and every hierarchy level is available. Eventually
we might want some form of tree view here. But for now this approach is
very simple.
Pull Request: #118382
After feedback from Julien, the "Cloth", "General" and "Painting"
catalogs are the ones we want to enable by default in mesh sculpt mode.
Other modes are fine with "All" only.
Adds a new `DEFAULT_VISIBLE` option for the `bl_options` of an asset
shelf. When this asset shelf will be created for the first time, the
asset shelf will be made visible, otherwise it will be hidden.
We don't mess with the visibility further, meaning, when re-opening a
previously active asset shelf, we keep the current asset shelf
visibility. So only the first load is affected. Alternatively asset
shelves could remember their last visibility state, and restore that as
context (e.g. the mode) changes. To be evaluated.
Had to add some trickery to make this overriding of visibility possible.
Activate the new brush tool when opening old files, and activate the
default brush asset for the mode. I'm guessing we may end up storing
the default brush asset for each mode somewhere else in the long term,
but doing it in versioning is simple now, and has the benefit of decoupling
the one time change from the defaults in the future.
Also replace the workspace's tool reference that could still point to the
old separate tools for each brush. This makes everything work by default
when opening a new factory startup file.
Pull Request: #118289
Previously the new brush would always be saved to the default library.
Now the user is presented with a choice that defaults to the library marked
as "Default" in the preferences.
Because the library is now chosen by an operator property, we can't check
its editable status in the poll function. Instead we just check it when the
operator executes.
Pull Request: #118021
Pass the asset library to some functions that always just retrieved the
default before. That makes them more flexible and fixes some potential
issues where the wrong asset library was updated or used in a poll
function, etc.
A new option controls where duplicated brushes are stored.
Maybe eventually the duplicate operator will allow choosing the
library, but it also seems reasonable to store a default so users
don't have to make that choice every time.
Pull Request: #117963
Don't use a keymap for the asset shelf to activate brushes; there's no
need to recreate basic UI interaction at this level. Instead use an
operator button so the ability to add a shortcut is automaticaly added
by other UI code.
Also change the operator to use an explicit asset reference instead of
the "context asset". This was already done for other operators that add
data-blocks from assets.
Pull Request: #117861
The benefits are O(1) access to the string size, clearer ownership,
and easily accessible utility functions. For now, only change functions
where the string is clearly non-null. It's not clear in what cases some
other functions recieve null strings.
* Add documentation / comments
* Apply const where possible to cache_init function codepath
* Minor cleanup of conditionals and initialization
Contains changes that were deferred from #117316
Pull Request: #117651
This is quickly hacked code to get basic features and user interface
testable. A lot more work will be required to make this good.
* Add Save As Asset and Delete Asset operators. These create and delete
brushes assets in asset blend files in a user asset library.
* Update Asset save the current settings to the brush to the asset blend.
* Revert to Asset reverts settings to the ones from the asset blend.
* Regular datablock management buttons are replaced by this mechanism and
hidden from the UI.
* Custom icon, modes and tool have been put into a subpanel. These will need
to find a better place, but should be out of the way for now.
There are many TODO comments in the code, but some main things:
* Delete Asset should become undoable, perhaps with a Trash mechanism.
* Asset shelf refresh performance is poor and looks flickery.
* The brush selector menu lists local, linked and override brushes which is
confusing. It should be made to match the asset shelf.
* Brush dependencies like textures are not handled yet.
* The partial write mechanism and various other parts of this code will
need refactoring to be less hacky.
![brush_asset.png](/attachments/100f59cb-4ddf-429c-83d3-39b071c0cb08)
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: #117513
Instead of showing an active tool for every brush type,
just show a single active tool and rely on the asset shelf
to select different brushes.
A single generic "Brush" icon is used instead of the tool
icons. That avoids raising many questions in the future as
we get more brushes.
Pull Request: #117491
This commit extends the reporting and overwrite confirmation system
created for blendfiles saved by later Blender version, to also detect
and handle 'asset library' blendfiles.
Asset library blendfiles are defined by:
* Not having a defined current Screen or Scene in their global data.
* Having a filename ending by `.asset.blend`.
This is required to avoid/warn users about editing a file that would have
been generated in the 'default' asset library, e.g. when saving a new Brush
asset (see also Part of #116337 and #117239).
Pull Request: #117346
Change for development/prototyping only: Include the brush assets from
the `working/` part of the SVN libraries repository, not just the ones
under `publish/`. This is managed by CMake during the installation build
step.
Ideally these should not appear at all in the asset shelf, but it's not
obvious that will 100% ensure the right mode.
Also fix a missing redraw of the properties editor when switching
brushes.
Pull Request: #117233
The goal is to simplify the interface of the geometry nodes modifier while also
making it more scalable. This allows creating better looking modifiers which
feel more built-in. No functionality is removed by this patch.
The following changes are done:
* The `Output Attributes` panel is hidden when there are no output attributes.
* The `Internal Dependencies` panel is replaced by a new `Manage` panel that
contains all the stuff that is common to all geometry nodes modifiers. It
contains new `Bake` and `Named Attributes` panels for now.
Potential next steps:
* Merge `Output Attributes` panel with the rest of the input list.
* Support hiding the `Manage` panel under some circumstances.
Pull Request: #117170
Previously, calling the bake operator was always creating a job that will
be run in parallel to Blender. This is good when baking from the UI, but may
be undesired when baking with a script.
Now, when the `exec` method of the bake operator is called, the baking
happens synchronously. That means that the operator call will return only
after the baking is done. The `invoke` method has the same behavior as
before. This approach is similar to e.g. `FLUID_OT_bake_all`.
I did notice that calling the invoke method from a script can still result
in a crash sometimes, probably due to conflicting depsgraph evaluations.
That has to be investigated more.
The issue was that some code expected the "extend" sockets
to always exist. This was already always true from the user
point of view, but not internally.
There are different possible fixes, but this patch makes sure
that the extend socket will be available as expected. This is
achieved by making them part of the static node declaration.
We want to extend the static declaration of such dynamic
nodes anyway, to improve reflection capabilities without
having to instantiate nodes.
Make Subsampling 3x3 filter twice faster (on 4K UHD resolution,
Windows/VS2022/Ryzen5950X: 52.7ms -> 28.3ms), by reformulating how it works:
Conceptually Subsampling filter is a box filter: it sums up N source image
pixels, computes their average and outputs the result. Critical thing is,
that should be done in premultiplied space so that colors from fully or
mostly transparent regions do not "override" opaque colors.
Previously, when operating on byte images, the code achieved this by always
working on byte values, doing "progressively smaller" lerp into byte color
result, taking care of premultiplication and again storing the "straight"
alpha for each sample being processed. This meant that for each sample, there
are 3 divisions involved! This also led to some precision loss, since for all
9 samples all the intermediate results would only be stored at byte precision.
Reformulate that by simply accumulating the premultiplied color as a float.
This gets rid of all divisions, except the last step when said float needs to
be written back into a byte color.
The unit test results have a tiny difference, since now it is arguably better
(as per above, previously it was having some precision loss).
Pull Request: #117125
This allows code outside of the render pipeline to make proper
decisions about how the imbuf of render passes are to be handled.
For example, IMB_create_gpu_texture() will now properly select
single channel grayscale texture format for depth pass coming from
multilayer EXR, additionally solving assert in the GPU compositor
code which verifies expected and actual imbuf texture format.
Pull Request: #117184
Set the number of planes based on the number of pass channels.
If the pass contains 2 passes or more than 4 passes set the number
of planes to the previously used value of 32.
This is needed because quite some areas check for the number of
planes for various optimizations. For example, this is one of the
factors which make IMB_create_gpu_texture() to choose the texture
format. If the number of planes for the depth pass is set to the
previously used this function will never consider using single
channel GPU texture.
Unfortunately, this change is not enough to make the GPU texture
to use single channel format as the color space of the image
buffer is also checked, and that is nullptr which means scene linear.
Using screen changing functions with screens used for full screen areas
isn't supported & caused corrupt screen data.
Add checks that the current and overriding screen support switching,
raising an error when they don't. Also add a check when restoring the
context not to change any full screen areas.
CurvesGeometry has no ".selection" attribute when all control points
are selected. The earlier code assumed that the attribute always exists.
Also Python tests are added for the "extrude" operator.
Pull Request: #117095
This simplifies memory management and button string manipulation in
general. Just change one of the few strings stored in `uiBut` for now.
Pull Request: #117183
There were some abstractions inside `IMB_transform` implementation
that were kinda getting in the way. I want to speed up Subsampled3x3
filtering by reformulating the math being done, but that needs to
sample byte images while storing intermediate result as a float -- but
the whole `Pixel`, `PixelPointer` et al. machinery was not quite prepared
to deal with that. Feels like those helper classes do not achieve much,
just make the code longer.
So remove them (`Pixel`, `PixelPointer`, `ChannelConverter` etc.) and
use simple functions. Now the code is more straightforward (IMHO) and
270 lines shorter (40% of the whole file!), and allows me to do the
follow-up optimization easier.
No functional changes.
Pull Request: #117182
Using layout panels in this context is not yet supported. Therefor, the fix
is to raise an exception instead of crashing.
The problem here is that layout panels need an a parent panel which
has a persistent state. The popover currently does not only has a very
short-lived panel currently that is freed directly after drawing.
Also see `ui_paneltype_draw_impl`.
It's likely that support for this can be added in the future but it's currently
unclear how many changes this would require.
Opacity modifier implementation based on GP2.
Functionality is largely unchanged.
_Color Mode_ is either `Stroke` or `Fill` for modifying color opacity or
`Hardness`.
_Uniform Opacity_ does two things at once (!):
- Sets the same opacity value for every point in a stroke.
- Sets opacity as an absolute value rather than a factor.
_Weight as Factor_ (button to the right of Opacity Factor): Use the
vertex group as opacity __factor__ rather than an overall __influence__.
This is confusing and hard to convey, but copies behavior from GP2.
The _Influence_ panel contains the same filter settings as the GP2
modifier, with some small changes:
- _Layer_ selects only strokes in the respective layer (with an _Invert_
option)
- _Material_ selects only points with the respective material (with an
_Invert_ option)
- _Layer Pass_ and _Material Pass_ select only strokes/points which are
rendered in the respective pass.
_Note 1: Layers don't have UI for setting a pass yet, this will be a
generic layer attribute. This can be set through the API for testing._
_Note 2: In GP2 a pass value of zero was used to disable pass filters.
Since zero is a valid pass ID an explicit flag has been added for the
purpose of turning pass filters on and off._
- _Vertex Group_: This can be used as an additional influence filter on
points. If _Weight as Factor_ is enable the vertex group instead
replaces the opacity factor. In _Fill_ mode the vertex group weight of
the stroke's first point is used as influence for the entire stroke.
- _Custom Curve_ is another possible influence factor per point. The
curve input value is the relative position of a point along its
stroke.
The Influence settings have been moved into a separate DNA struct, which
should help with reusability in various modifiers. Various utility
functions can be found int `MOD_grease_pencil_util.hh` for handling
influence settings and generating `IndexMasks` for modernized C++ code.
Pull Request: #116946
Enable huge pages for jemalloc. This requests the Linux kernel to use
huge (2 MB) pages for large allocations. This has the effect of speeding
up first accesses to those allocations, and possibly also speeds up future
accesses by reducing TLB faults.
By default, 4 KB pages are used unless the user enables huge pages through
a kernel parameter or an obscure sysfs setting.
For Cycles benchmarks, this gives about a 5% CPU rendering performance
improvement. It likely also improves performance in other areas of Blender.
Pull Request: #116663
Loading pre-4.0.20 node groups with sockets using subtypes causes
broken socket identifiers. This is because the node tree interface now
expects sockets to use the base identifiers ("NodeSocketFloat" instead
of "NodeSocketFloatFactor" etc.).
To correct this the conversion code now replaces socket idnames that
include a subtype suffix with their base names. This fix is also applied
to files between versions 4.0.20 and 4.1.10, where the socket types
may have been converted incorrectly.
Pull Request: #117133
The unregistering of already registered classes is expected behavior,
however this was done silently and can be unsafe as two Addons may have
the same names for operators and in case of name collision the addon
registered first will break silently / start behave unexpectedly.
So reporting the unregister step seems reasonable.
During Addon development, this might seem noisy when classes are
frequently updated, however catching the problematic cases instead of
being silent might be beneficial.
Part of #116370
Pull Request: #116374
In 13fac109 the node panels got support for individual option button
callbacks, but these were not included in the node editor side bar.
Only the older top-level buttons are drawn there.
The panel structure is currently not accessible in python since it is
part of the `NodeDeclaration` system. To draw node input sockets and
buttons in the correct panel order as they appear on the node, a new
template function `uiTemplateNodeInputs` has been added. This iterates
over declared panels and their contents in the appropriate order and
draws the buttons before sockets in the same panel.
Pull Request: #116936
Double precision pixel coordinate interpolation was added in 3a65d2f591 to
fix an issue of "wobbly" resulting image at very high scale factors. But
the root cause of that was the fact that the scanline loop was repeatedly
adding the floating point step for each pixel, instead of doing multiplication
by pixel index (repeated floating point additions can "drift" due to
imprecision, whereas multiplications are much more accurate).
Change all that math back to use single precision floats. I checked the
original issue the commit was fixing, it is still fine. Also added a gtest
to cover this situation: `imbuf_transform, nearest_very_large_scale`
This makes `IMB_transform` a tiny bit faster, on Windows/VS2022/Ryzen5950X
scaling an image at 4K resolution:
- Bilinear: 5.92 -> 5.83 ms
- Subsampled3x3: 53.6 -> 52.7 ms
Pull Request: #117160
When using EEVEE on high resolution monitors the light buffers might not
get initialized as there are range checks that pass in the first try.
- number of tiles needed is larger than the max_tile_count_threshold
- total_word_count is smaller than max_word_count_threshold as it is
never set (still initialized to zero.
Solution is to not exit on the first try. In a later stage we might want
to use something that doesn't require any looping.
Fixes: #117128
Pull Request: #117164
This commit mainly adds the low-level logic to link and create a runtime
override for brushes.
The biggest changes are in `setup_app_data` (post-loading of .blend
file), to add support to move over some data from old bmain to newly
loaded bmain. The logic is complex, and different depending on whether
it is an undo (aka memfile read) step, or an actual .blend file reading:
* On undo, we only port over brushes themselves, their dependencies are
not handled. However, since memfile reading code already ported over
linked IDs, these do not need to be swapped.
* On real .blend file loading, brushes from the old bmain are being
reused, as long as they do not conflict (name/lib) with brushes from
the new bmain. Their dependencies are also re-used if needed.
Only exception: local assets from old bmain are never re-used.
There is also a new step added to the 'open file' process, which checks
if the to-be-opened file is a library of the currently opened one, and
if so, if there are local tweaked overrides of assets from the new file.
The option to save these tweaks in draft is currently an empty mockup,
but the rest is functional.
Brush now has a new `AssetWeakReference` pointer to keep track of the
last active brush asset, and restore it on fileread in case there is
currently no active brush asset for the given paint/sculpt mode.
Some parts of this commits are mockups/place-holders that are not
expected to be committed as-is, if at all:
* Some initial support for an asset-shelf (using code from
`brush-asset-project` branch), very much WIP still.
* Definition of test brush library with semi-hard-coded path.
* There is also a drawing bug because the poll function of Brush
panels return false initially (tool has no data-block ref).
Very unclear what's hapening here.
Ref. #101908.
This commit mainly adds the low-level logic to link and create a runtime
override for brushes.
The biggest changes are in `setup_app_data` (post-loading of .blend
file), to add support to move over some data from old bmain to newly
loaded bmain. The logic is complex, and different depending on whether
it is an undo (aka memfile read) step, or an actual .blend file reading:
* On undo, we only port over brushes themselves, their dependencies are
not handled. However, since memfile reading code already ported over
linked IDs, these do not need to be swapped.
* On real .blend file loading, brushes from the old bmain are being
reused, as long as they do not conflict (name/lib) with brushes from
the new bmain. Their dependencies are also re-used if needed.
Only exception: local assets from old bmain are never re-used.
There is also a new step added to the 'open file' process, which checks
if the to-be-opened file is a library of the currently opened one, and
if so, if there are local tweaked overrides of assets from the new file.
The option to save these tweaks in draft is currently an empty mockup,
but the rest is functional.
Brush now has a new `AssetWeakReference` pointer to keep track of the
last active brush asset, and restore it on fileread in case there is
currently no active brush asset for the given paint/sculpt mode.
Some parts of this commits are mockups/place-holders that are not
expected to be committed as-is, if at all:
* Some initial support for an asset-shelf (using code from
`brush-asset-project` branch), very much WIP still.
* Definition of test brush library with semi-hard-coded path.
* There is also a drawing bug because the poll function of Brush
panels return false initially (tool has no data-block ref).
Very unclear what's hapening here.
Ref. #101908.
This commit mainly adds the low-level logic to link and create a runtime
override for brushes.
The biggest changes are in `setup_app_data` (post-loading of .blend
file), to add support to move over some data from old bmain to newly
loaded bmain. The logic is complex, and different depending on whether
it is an undo (aka memfile read) step, or an actual .blend file reading:
* On undo, we only port over brushes themselves, their dependencies are
not handled. However, since memfile reading code already ported over
linked IDs, these do not need to be swapped.
* On real .blend file loading, brushes from the old bmain are being
reused, as long as they do not conflict (name/lib) with brushes from
the new bmain. Their dependencies are also re-used if needed.
Only exception: local assets from old bmain are never re-used.
There is also a new step added to the 'open file' process, which checks
if the to-be-opened file is a library of the currently opened one, and
if so, if there are local tweaked overrides of assets from the new file.
The option to save these tweaks in draft is currently an empty mockup,
but the rest is functional.
Brush now has a new `AssetWeakReference` pointer to keep track of the
last active brush asset, and restore it on fileread in case there is
currently no active brush asset for the given paint/sculpt mode.
Some parts of this commits are mockups/place-holders that are not
expected to be committed as-is, if at all:
* Some initial support for an asset-shelf (using code from
`brush-asset-project` branch), very much WIP still.
* Definition of test brush library with semi-hard-coded path.
* There is also a drawing bug because the poll function of Brush
panels return false initially (tool has no data-block ref).
Very unclear what's hapening here.
Ref. #101908.
This commit mainly adds the low-level logic to link and create a runtime
override for brushes.
The biggest changes are in `setup_app_data` (post-loading of .blend
file), to add support to move over some data from old bmain to newly
loaded bmain. The logic is complex, and different depending on whether
it is an undo (aka memfile read) step, or an actual .blend file reading:
* On undo, we only port over brushes themselves, their dependencies are
not handled. However, since memfile reading code already ported over
linked IDs, these do not need to be swapped.
* On real .blend file loading, brushes from the old bmain are being
reused, as long as they do not conflict (name/lib) with brushes from
the new bmain. Their dependencies are also re-used if needed.
Only exception: local assets from old bmain are never re-used.
There is also a new step added to the 'open file' process, which checks
if the to-be-opened file is a library of the currently opened one, and
if so, if there are local tweaked overrides of assets from the new file.
The option to save these tweaks in draft is currently an empty mockup,
but the rest is functional.
Brush now has a new `AssetWeakReference` pointer to keep track of the
last active brush asset, and restore it on fileread in case there is
currently no active brush asset for the given paint/sculpt mode.
Some parts of this commits are mockups/place-holders that are not
expected to be committed as-is, if at all:
* Some initial support for an asset-shelf (using code from
`brush-asset-project` branch), very much WIP still.
* Definition of test brush library with semi-hard-coded path.
* There is also a drawing bug because the poll function of Brush
panels return false initially (tool has no data-block ref).
Very unclear what's hapening here.
Ref. #101908.
This commit mainly adds the low-level logic to link and create a runtime
override for brushes.
The biggest changes are in `setup_app_data` (post-loading of .blend
file), to add support to move over some data from old bmain to newly
loaded bmain. The logic is complex, and different depending on whether
it is an undo (aka memfile read) step, or an actual .blend file reading:
* On undo, we only port over brushes themselves, their dependencies are
not handled. However, since memfile reading code already ported over
linked IDs, these do not need to be swapped.
* On real .blend file loading, brushes from the old bmain are being
reused, as long as they do not conflict (name/lib) with brushes from
the new bmain. Their dependencies are also re-used if needed.
Only exception: local assets from old bmain are never re-used.
There is also a new step added to the 'open file' process, which checks
if the to-be-opened file is a library of the currently opened one, and
if so, if there are local tweaked overrides of assets from the new file.
The option to save these tweaks in draft is currently an empty mockup,
but the rest is functional.
Brush now has a new `AssetWeakReference` pointer to keep track of the
last active brush asset, and restore it on fileread in case there is
currently no active brush asset for the given paint/sculpt mode.
Some parts of this commits are mockups/place-holders that are not
expected to be committed as-is, if at all:
* Some initial support for an asset-shelf (using code from
`brush-asset-project` branch), very much WIP still.
* Definition of test brush library with semi-hard-coded path.
* There is also a drawing bug because the poll function of Brush
panels return false initially (tool has no data-block ref).
Very unclear what's hapening here.
Ref. #101908.