From 72a484b503d62ad94aa84f7299afdaa8d704ea5a Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 7 Jul 2025 18:31:35 +0200 Subject: [PATCH] Fix #136359: Add data-block selector to handle missing texture better Instead of only showing a button to switch to the texture properties - which don't actually allow creating a texture for linestyle - add a data-block selector that allows creating a texture for linestyle. It will also show a button to switch to the texture properties, if available. It seems like the previous UI didn't have any good way of assigning a texture for linestyle, without going into the texture node editor. Pull Request: https://projects.blender.org/blender/blender/pulls/141408 --- scripts/startup/bl_ui/properties_freestyle.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/startup/bl_ui/properties_freestyle.py b/scripts/startup/bl_ui/properties_freestyle.py index d0fe93e3726..c06bf7b6843 100644 --- a/scripts/startup/bl_ui/properties_freestyle.py +++ b/scripts/startup/bl_ui/properties_freestyle.py @@ -1247,12 +1247,11 @@ class VIEWLAYER_PT_freestyle_linestyle_texture(ViewLayerFreestyleLineStyle, Pane layout.prop(linestyle, "texture_spacing", text="Spacing Along Stroke") row = layout.row() - props = row.operator( - "wm.properties_context_change", - text="Go to Linestyle Textures Properties", - icon='TEXTURE', - ) - props.context = 'TEXTURE' + if linestyle.active_texture: + slot = linestyle.texture_slots[linestyle.active_texture_index] + layout.template_ID(slot, "texture", new="texture.new") + else: + layout.template_ID(linestyle, "active_texture", new="texture.new") class VIEWLAYER_PT_freestyle_animation(ViewLayerFreestyleButtonsPanel, PropertiesAnimationMixin, Panel):