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>2012-11-01 00:29:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-01 00:29:32 +0400
commit1bcadda46b96e3e557aad1b0d2d53a0b4743b413 (patch)
tree3f749a30df330ced48905860da40b1ed21254f6e /source/blender/blenkernel/BKE_idprop.h
parent26541afc8b9bfa0b11ecd2dcdab120cfcfff5d92 (diff)
fix [#30910] Problems: Add Shortcut(s) for "Ctrl Tab" menu
comparing keymaps was too sloppy or too strict, now sloppy keymap comparison works by setting all the operator properties to their default values if they are not already set, then compare this with the keymap item (ignoring values missing from either one). ... this way any non default keymap setting wont match with an operator menu item which doesnt set this operator at all (a problem sighted in this bug report). developer notes: - IDP_EqualsProperties_ex() function adds an argument to treat missing members of either group to act as if there is a match. - WM_operator_properties_default() function to reset RNA values to their defaults. - add IDP_spit(), debug only function to print out ID properties.
Diffstat (limited to 'source/blender/blenkernel/BKE_idprop.h')
-rw-r--r--source/blender/blenkernel/BKE_idprop.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 027f06ef84f..2dd1bfc2a51 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -266,6 +266,12 @@ __attribute__((nonnull))
#endif
;
+int IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const int is_strict)
+#ifdef __GNUC__
+__attribute__((warn_unused_result))
+#endif
+;
+
int IDP_EqualsProperties(struct IDProperty *prop1, struct IDProperty *prop2)
#ifdef __GNUC__
__attribute__((warn_unused_result))
@@ -319,4 +325,9 @@ void IDP_UnlinkProperty(struct IDProperty *prop);
#define IDP_IDPArray(prop) ((IDProperty *)(prop)->data.pointer)
#define IDP_Double(prop) (*(double *)&(prop)->data.val)
+#ifdef DEBUG
+/* for printout only */
+void IDP_spit(IDProperty *prop);
+#endif
+
#endif /* __BKE_IDPROP_H__ */