blender/release/scripts/startup
Philipp Oeser 8df968d69f "Show Texture in texture tab" button: full support for Sculpt / Paint
In {rBb279fef85d1a} the button that displays a texture in a Properties
Editor texture tab was added for geometry nodes.
Same commit will actually show them for Brush textures as well (but
disabled -- because the Texture users dont match).
This task is for finanlizing proper support for Brush textures as well.
There was originally a separate patch for this (see {D9813}) but most of
it was already implemented by above commit.

**what this solves**
from the default startup file:
- go to any sculpt or paint mode and add a texture to your brush
- observe the button to edit this texture in the Properties editor is
greyed out

{F9860470}

There are two possible solutions:
- [1] call the texture template for the brush `texture_slot` texture
(instead of the brush 'texture') from the python UI code, this is then
working in harmony how ButsTextureUser works for brushes
- [2] tweak the way `ButsTextureUser` works (dont rely on
`RNA_BrushTextureSlot` there)

This patch implements the first solution.
Since `brush.texture_slot` is `br->mtex` RNA wrapped and `brush.texture`
is `br->mtex.tex` RNA wrapped, this really comes down to doing the same
thing. I checked that creating a new texture and unlinking/deleting will
have the same results even though they take slightly different code
paths: assignment and NULLing the pointers are working on the same (see
above) and RNA update callbacks also do the same [even though in
different functions]:
- brush.texture will do rna_Brush_main_tex_update
- brush.texture_slot.texture will do rna_TextureSlotTexture_update /
rna_TextureSlot_update
(only difference here is an additional DEG relations update in the case
of texture_slot which should not do harm)

Differential Revision: https://developer.blender.org/D10626
2021-03-08 19:38:35 +01:00
..
bl_app_templates_system Cleanup: unused imports 2021-03-06 19:26:18 +11:00
bl_operators Cleanup: unused imports 2021-03-06 19:26:18 +11:00
bl_ui "Show Texture in texture tab" button: full support for Sculpt / Paint 2021-03-08 19:38:35 +01:00
keyingsets_builtins.py Fix missing custom-property escaping for whole-character keying set 2020-12-10 19:31:22 +11:00
nodeitems_builtins.py Geometry Nodes: Rename subdivision nodes 2021-03-08 13:37:49 -05:00