Commit: 055ef5df615632f81e30e39ae47b42a87af350ca
Author: Julian Eisel
Date:   Wed Dec 16 01:05:46 2020 +0100
Branches: master
https://developer.blender.org/rB055ef5df615632f81e30e39ae47b42a87af350ca

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.

===================================================================

M       source/blender/editors/space_file/space_file.c
M       source/blender/editors/util/ed_util.c

===================================================================

diff --git a/source/blender/editors/space_file/space_file.c 
b/source/blender/editors/space_file/space_file.c
index d4f6618e82a..5bd7f6c17f6 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -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);
diff --git a/source/blender/editors/util/ed_util.c 
b/source/blender/editors/util/ed_util.c
index 6547e42f410..4740e4d8d33 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to