Philipp Oeser af601e01fa Fix #145987: Brush selector available in Image Editor Mask mode
The keymap `km_image_paint` righfully includes both
`VIEW3D_AST_brush_texture_paint` and `IMAGE_AST_brush_paint` since
painting can be done in both Editors.

So we want to improve upon polling.

Three parent classes involved: `ImageAssetShelf`, `View3DAssetShelf`,
both inherit from `BrushAssetShelf`

`IMAGE_AST_brush_paint` (inherits from `ImageAssetShelf`) was already
checking for being in paint mode (so that Asset Shelf already wasnt
showing), but `VIEW3D_AST_brush_texture_paint` (inherits from
`View3DAssetShelf`) was permissive (doesnt have specialized poll, relies
on the "mother" classes `BrushAssetShelf` which only checks for an
active object and if that active objects `mode` equals the Assets Shelfs
"mode"). This can be true if you have an object in Texture Paint mode in
the 3DView.

So to make shelves like `VIEW3D_AST_brush_texture_paint` **not** pass
their poll in the Image Editor, add a specific poll case.

NOTE: the report also mentiones a crash when actually selecting a "bad"
brush from the "bad" asset shelf. Since that scenario is now impossible
to reach, the crash has not been investigated further.

Pull Request: https://projects.blender.org/blender/blender/pulls/146071
2025-09-22 15:56:52 +02:00
2025-08-11 12:02:20 +02:00
2025-09-16 18:04:25 +02:00
2023-12-08 13:28:13 +11:00
2025-07-10 12:48:33 +10:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%