Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_ops.c
| Show First 20 Lines • Show All 1,140 Lines • ▼ Show 20 Lines | if (ptr.data && prop) { | ||||
| if (type == PROP_POINTER) { | if (type == PROP_POINTER) { | ||||
| target_ptr = RNA_property_pointer_get(&ptr, prop); | target_ptr = RNA_property_pointer_get(&ptr, prop); | ||||
| return jump_to_target_ptr(C, target_ptr, poll); | return jump_to_target_ptr(C, target_ptr, poll); | ||||
| } | } | ||||
| /* For string properties with prop_search, look up the search collection item. */ | /* For string properties with prop_search, look up the search collection item. */ | ||||
| if (type == PROP_STRING) { | if (type == PROP_STRING) { | ||||
| const uiBut *but = UI_context_active_but_get(C); | const uiBut *but = UI_context_active_but_get(C); | ||||
| const uiButSearch *search_but = (but->type == UI_BTYPE_SEARCH_MENU) ? (uiButSearch *)but : | |||||
| NULL; | |||||
| if (but->type == UI_BTYPE_SEARCH_MENU && but->search && | if (search_but && search_but->items_update_fn == ui_rna_collection_search_update_fn) { | ||||
| but->search->update_fn == ui_rna_collection_search_update_fn) { | uiRNACollectionSearch *coll_search = search_but->arg; | ||||
| uiRNACollectionSearch *coll_search = but->search->arg; | |||||
| char str_buf[MAXBONENAME]; | char str_buf[MAXBONENAME]; | ||||
| char *str_ptr = RNA_property_string_get_alloc(&ptr, prop, str_buf, sizeof(str_buf), NULL); | char *str_ptr = RNA_property_string_get_alloc(&ptr, prop, str_buf, sizeof(str_buf), NULL); | ||||
| int found = RNA_property_collection_lookup_string( | int found = RNA_property_collection_lookup_string( | ||||
| &coll_search->search_ptr, coll_search->search_prop, str_ptr, &target_ptr); | &coll_search->search_ptr, coll_search->search_prop, str_ptr, &target_ptr); | ||||
| if (str_ptr != str_buf) { | if (str_ptr != str_buf) { | ||||
| ▲ Show 20 Lines • Show All 699 Lines • Show Last 20 Lines | |||||