Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-10-25 13:50:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-25 13:50:48 +0300
commit1aa17169249458b26289367f9140ae5dfa8a8ead (patch)
treedef159e17b0252e70f654ccb85b6fc577575ca6e /source/blender/blenloader/intern/versioning_userdef.c
parent2a3b5dc73038bdf528584fd99bc11e855a157ef3 (diff)
parent7137d89daaaea948c9018b3719e453e67803b32d (diff)
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source/blender/blenloader/intern/versioning_userdef.c')
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index e1ee020940e..53a6b8b08cd 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -35,6 +35,7 @@
#include "BKE_addon.h"
#include "BKE_colorband.h"
#include "BKE_main.h"
+#include "BKE_idprop.h"
#include "BKE_keyconfig.h"
#include "BLO_readfile.h" /* Own include. */
@@ -198,6 +199,18 @@ static void do_version_select_mouse(UserDef *userdef, wmKeyMapItem *kmi)
}
}
+static bool keymap_item_has_invalid_wm_context_data_path(wmKeyMapItem *kmi,
+ void *UNUSED(user_data))
+{
+ if (STRPREFIX(kmi->idname, "WM_OT_context_") && kmi->properties) {
+ IDProperty *idprop = IDP_GetPropertyFromGroup(kmi->properties, "data_path");
+ if (idprop && (idprop->type == IDP_STRING) && STRPREFIX(idprop->data.pointer, "(null)")) {
+ return true;
+ }
+ }
+ return false;
+}
+
/* patching UserDef struct and Themes */
void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
{
@@ -637,6 +650,16 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
}
}
+ if (!USER_VERSION_ATLEAST(281, 16)) {
+ BKE_keyconfig_pref_filter_items(userdef,
+ &((struct wmKeyConfigFilterItemParams){
+ .check_item = true,
+ .check_diff_item_add = true,
+ }),
+ keymap_item_has_invalid_wm_context_data_path,
+ NULL);
+ }
+
if (!USER_VERSION_ATLEAST(282, 1)) {
userdef->file_space_data.filter_id = U_default.file_space_data.filter_id;
}