Commit: 15c433d7d56414faa69fe923e1831db546c2d4f7 Author: Philipp Oeser Date: Thu Dec 22 16:14:15 2022 -0500 Branches: master https://developer.blender.org/rB15c433d7d56414faa69fe923e1831db546c2d4f7
Fix: Missing UI context members after recent refactor Caused by 7d7e90ca685954409ece00. When accessing context members from the windowmanager context (`C->wm.store` which is mainly used for UI related stuff) the above commit broke behavior in `CTX_store_ptr_lookup` in that it changed and would **always** return NULL if no type is passed in. The call to `CTX_store_ptr_lookup` from `ctx_data_get` **always** passes in NULL though. Accessing other context members survived since they take a different code path in `ctx_data_get` and dont use `CTX_store_ptr_lookup`. Now also return the entry if a NULL type was passed as it was before. Fixes T103370, T103405, T103417 Differential Revision: https://developer.blender.org/D16840 =================================================================== M source/blender/blenkernel/intern/context.cc =================================================================== diff --git a/source/blender/blenkernel/intern/context.cc b/source/blender/blenkernel/intern/context.cc index df18cf1795c..090624a289b 100644 --- a/source/blender/blenkernel/intern/context.cc +++ b/source/blender/blenkernel/intern/context.cc @@ -190,7 +190,7 @@ const PointerRNA *CTX_store_ptr_lookup(const bContextStore *store, { for (auto entry = store->entries.rbegin(); entry != store->entries.rend(); ++entry) { if (entry->name == name) { - if (type && RNA_struct_is_a(entry->ptr.type, type)) { + if (!type ||(type && RNA_struct_is_a(entry->ptr.type, type))) { return &entry->ptr; } } _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
