Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_ops.c
| Show First 20 Lines • Show All 1,128 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. */ | ||||
| else if (type == PROP_STRING) { | else 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_func == ui_rna_collection_search_cb) { | if (search_but && search_but->item_collect_func == ui_rna_collection_search_cb) { | ||||
| uiRNACollectionSearch *coll_search = but->search_arg; | uiRNACollectionSearch *coll_search = search_but->item_collect_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 704 Lines • Show Last 20 Lines | |||||