Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_utils.c
| Show First 20 Lines • Show All 483 Lines • ▼ Show 20 Lines | void ui_rna_collection_search_update_fn(const struct bContext *C, | ||||
| BLI_listbase_sort(items_list, sort_search_items_list); | BLI_listbase_sort(items_list, sort_search_items_list); | ||||
| /* add search items from temporary list */ | /* add search items from temporary list */ | ||||
| for (cis = items_list->first; cis; cis = cis->next) { | for (cis = items_list->first; cis; cis = cis->next) { | ||||
| /* If no item has an own icon to display, libraries can use the library icons rather than the | /* If no item has an own icon to display, libraries can use the library icons rather than the | ||||
| * name prefix for showing the library status. */ | * name prefix for showing the library status. */ | ||||
| int name_prefix_offset = cis->name_prefix_offset; | int name_prefix_offset = cis->name_prefix_offset; | ||||
| if (!has_id_icon && cis->is_id) { | if (!has_id_icon && cis->is_id && !requires_exact_data_name) { | ||||
| cis->iconid = UI_library_icon_get(cis->data); | cis->iconid = UI_library_icon_get(cis->data); | ||||
| /* No need to re-allocate, string should be shorter than before (lib status prefix is | /* No need to re-allocate, string should be shorter than before (lib status prefix is | ||||
| * removed). */ | * removed). */ | ||||
| BKE_id_full_name_ui_prefix_get(name_buf, cis->data, false, UI_SEP_CHAR, &name_prefix_offset); | BKE_id_full_name_ui_prefix_get(name_buf, cis->data, false, UI_SEP_CHAR, &name_prefix_offset); | ||||
| BLI_assert(strlen(name_buf) <= MEM_allocN_len(cis->name)); | BLI_assert(strlen(name_buf) <= MEM_allocN_len(cis->name)); | ||||
| strcpy(cis->name, name_buf); | strcpy(cis->name, name_buf); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 320 Lines • Show Last 20 Lines | |||||