Cleanup: Rename Asset Browser context member from "active_id" to "id"

This is the same name we use elsewhere for the focused/active ID context
member, so this should follow it.
This commit is contained in:
Julian Eisel 2020-12-16 01:05:46 +01:00
parent 975ca91939
commit 055ef5df61
Notes: blender-bot 2023-02-14 11:08:33 +01:00
Referenced by commit b665781808, Asset Browser: fix context properties reported to Python
2 changed files with 3 additions and 3 deletions

View File

@ -806,7 +806,7 @@ static int /*eContextResult*/ file_context(const bContext *C,
CTX_data_pointer_set(result, &screen->id, &RNA_FileSelectEntry, file);
return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "active_id")) {
if (CTX_data_equals(member, "id")) {
const FileDirEntry *file = filelist_file(sfile->files, params->active_file);
ID *id = filelist_file_get_id(file);

View File

@ -507,7 +507,7 @@ void ED_OT_flush_edits(wmOperatorType *ot)
static bool lib_id_load_custom_preview_poll(bContext *C)
{
const PointerRNA idptr = CTX_data_pointer_get(C, "active_id");
const PointerRNA idptr = CTX_data_pointer_get(C, "id");
BLI_assert(!idptr.data || RNA_struct_is_ID(idptr.type));
const ID *id = idptr.data;
@ -541,7 +541,7 @@ static int lib_id_load_custom_preview_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
PointerRNA idptr = CTX_data_pointer_get(C, "active_id");
PointerRNA idptr = CTX_data_pointer_get(C, "id");
ID *id = idptr.data;
BKE_previewimg_id_custom_set(id, path);