prop_with_search.enable_relating_type_suggestions - keep default to False

To gradually introduce it when it's needed.
This commit is contained in:
Andrej730
2025-08-06 17:05:29 +05:00
parent ce154cc8d2
commit 0f6cc23c28
5 changed files with 23 additions and 4 deletions
+1 -1
View File
@@ -361,7 +361,7 @@ def prop_with_search(
should_click_ok: bool = False,
original_operator_path: Optional[str] = None,
*,
enable_relating_type_suggestions: bool = True,
enable_relating_type_suggestions: bool = False,
search_threshold: int = 10,
button_kwargs: Union[dict[str, Any], None] = None,
**kwargs: Any,
@@ -121,7 +121,13 @@ class CoveringToolUI:
if AuthoringData.data["ifc_classes"]:
row = cls.layout.row(align=True)
row.label(text="", icon="FILE_3D")
prop_with_search(row, cls.props, "relating_type_id", text="")
prop_with_search(
row,
cls.props,
"relating_type_id",
text="",
enable_relating_type_suggestions=True,
)
row.operator("bim.launch_type_manager", icon=tool.Blender.TYPE_MANAGER_ICON, text="")
else:
row.label(text=f"No {AuthoringData.data['ifc_element_type']} Found", icon="ERROR")
@@ -238,7 +238,13 @@ class AnnotationToolUI:
row = cls.layout.row(align=True)
row.label(text="", icon="FILE_3D")
prop_with_search(row, cls.props, "relating_type_id", text="")
prop_with_search(
row,
cls.props,
"relating_type_id",
text="",
enable_relating_type_suggestions=True,
)
row.operator("bim.launch_annotation_type_manager", icon=tool.Blender.TYPE_MANAGER_ICON, text="")
add_layout_hotkey_operator(cls.layout, "Add", "S_A", "Create a new annotation")
@@ -662,6 +662,7 @@ class CreateObjectUI:
text="",
button_kwargs={"emboss": False},
emboss=True,
enable_relating_type_suggestions=True,
)
# Limit width because names can get really long.
row_.ui_units_x = 10.0
+7 -1
View File
@@ -79,7 +79,13 @@ class BIM_PT_type(Panel):
row.prop(props, "relating_type_class", text="")
if type_prop.get_relating_type(None, context):
prop_with_search(row, props, "relating_type", text="")
prop_with_search(
row,
props,
"relating_type",
text="",
enable_relating_type_suggestions=True,
)
row.operator("bim.assign_type", icon="CHECKMARK", text="")
row_object.prop(props, "relating_type_object", icon="COPYDOWN")
else: