Blender Git Commit Log

Git Commits -> Revision b279fef

Revision b279fef by Philipp Oeser (master)
March 2, 2021, 11:08 (GMT)
Geometry Nodes: show "Show Texture in texture tab" button

This enables the quick access button [to show the relevant Texture in
the Properties Editor] for textures used in geometry nodes.

This goes in line to what we do for other textures:
- modifier textures have this button
- particle textures have this button
- brush textures will soon have it, too (see D9813)

When outside of the Properties Editor, the button will always show (if a
texture is actually assigned), but will be inactive if no suiting
Properties Editor to show the texture in can be found.

Note this also changes the behavior to not show the button if _no_
texture is assigned (as in: we are still showing the "New" button).
Previously it was always there (e.g. for modifier textures), even if it
would take us to an empty texture tab. (Sure, we could add a texture
there then, but imho it makes more sense to just start showing it once a
texture is already there)

For this to work with geometry nodes, the following chages were done:
- implement foreachTexLink for geonode modifiers
- new buttons_texture_user_node_property_add() that stores prop as well
as node
- also use NODE_ACTIVE_TEXTURE flag in geometry nodetrees

notes:
- this still uses the first suiting (as in: pinning does not interfere)
Properties Editor it finds, this should (maybe?) find the _closest_
Property Editor instead (see related feedback in D9813).
- this will already show the button for brush textures as well
(disabled), but there is another mandatory change in an upcomming commit
to make it work there as well (see D9813)

ref. T85278

Maniphest Tasks: T85278

Differential Revision: https://developer.blender.org/D10293

Commit Details:

Full Hash: b279fef85d1a561ceb71e2cdce458bd44b4d853a
Parent Commit: 00f27a8
Lines Changed: +204, -60

3 Modified Paths:

/source/blender/blenkernel/intern/node.cc (+4, -2) (Diff)
/source/blender/editors/space_buttons/buttons_texture.c (+194, -57) (Diff)
/source/blender/modifiers/intern/MOD_nodes.cc (+6, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021