Curves: make the "surface_uv_map" a searchable dropdown
The users had to type in a name here, but we can also make it a dropdown choice with existing UV Maps for convenience: - dont have to remember a name or copy paste obviously - shows in red if it was removed / invalid Came up in T101028 Maniphest Tasks: T101028 Differential Revision: https://developer.blender.org/D15956
This commit is contained in:
parent
e5782df4ab
commit
2180e6fc9f
Notes:
blender-bot
2023-02-14 06:17:14 +01:00
Referenced by issue #101028, Hair Curves don't read UV maps added after creating the curves.
|
@ -44,7 +44,13 @@ class DATA_PT_curves_surface(DataButtonsPanel, Panel):
|
|||
layout.use_property_split = True
|
||||
|
||||
layout.prop(ob.data, "surface")
|
||||
layout.prop(ob.data, "surface_uv_map", text="UV Map")
|
||||
has_surface = ob.data.surface is not None
|
||||
if has_surface:
|
||||
layout.prop_search(ob.data, "surface_uv_map", ob.data.surface.data, "uv_layers", text="UV Map")
|
||||
else:
|
||||
row = layout.row()
|
||||
row.prop(ob.data, "surface_uv_map", text="UV Map")
|
||||
row.enabled = has_surface
|
||||
|
||||
|
||||
class CURVES_MT_add_attribute(Menu):
|
||||
|
|
Loading…
Reference in New Issue