Fix AttributeError in prop_with_search caused by duplicate bl_idname

The light module's EnumPropertySearch operator was using the same
bl_idname ("bim.enum_property_search") as the main BIM_OT_enum_property_search
in operator.py, but only defined prop_name and search_term properties,
lacking should_click_ok and others. Whichever class registered last would
overwrite the other, causing an AttributeError when helper.py tried to
set op.should_click_ok on the stripped-down version.

Renamed the light module operator to "radiance.enum_property_search" and
updated the matching call in light/ui.py.

Generated with the assistance of an AI coding tool.
This commit is contained in:
Ryan Schultz
2026-03-11 17:39:00 -05:00
parent bb661ce998
commit afd6f422ee
2 changed files with 2 additions and 2 deletions
@@ -1037,7 +1037,7 @@ class RADIANCE_OT_open_spectraldb(bpy.types.Operator):
class EnumPropertySearch(bpy.types.Operator):
bl_idname = "bim.enum_property_search"
bl_idname = "radiance.enum_property_search"
bl_label = "Search Enum Property"
bl_options = {"REGISTER", "UNDO"}
+1 -1
View File
@@ -41,7 +41,7 @@ def prop_with_search(layout, data, prop_name, **kwargs):
try:
if len(get_enum_items(data, prop_name)) > 10:
row.context_pointer_set(name="data", data=data)
op = row.operator("bim.enum_property_search", text="", icon="VIEWZOOM")
op = row.operator("radiance.enum_property_search", text="", icon="VIEWZOOM")
op.prop_name = prop_name
except TypeError:
pass