Fix #137493: UI: Show "Active Spline" panel for surface types

Previously in 5fe1051839 the "Active
Spline" panel was moved to the viewport but not updated correctly for it
to display when active object is of "SURFACE" type. Now it will show for
both curve and surface types.
This commit is contained in:
YimingWu
2025-04-15 08:43:03 +08:00
parent 2690c0266a
commit 4794cbe0bf

View File

@@ -8132,7 +8132,7 @@ class VIEW3D_PT_active_spline(Panel):
@classmethod
def poll(cls, context):
ob = context.object
if ob is None or ob.type != 'CURVE' or ob.mode != 'EDIT':
if ob is None or ob.type not in {'CURVE', 'SURFACE'} or ob.mode != 'EDIT':
return False
curve = ob.data
return curve.splines.active is not None