[Bf-blender-cvs] [b3545ae3735] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Fri May 4 07:36:36 CEST 2018
Commit: b3545ae37352ec440ee8fece0cd9c66289ebe52f
Author: Campbell Barton
Date: Fri May 4 07:30:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBb3545ae37352ec440ee8fece0cd9c66289ebe52f
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_idprop.h
index 02912739e86,48a5db93504..c686fa41e7e
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@@ -152,13 -145,8 +152,12 @@@ void IDP_Reset(IDProperty *prop, const
# define IDP_Id(prop) ((ID *) (prop)->data.pointer)
#endif
- #ifndef NDEBUG
- /* for printout only */
- void IDP_spit(IDProperty *prop);
- #endif
+ /* for printout/logging only */
+ char *IDP_reprN(const struct IDProperty *prop);
+ void IDP_print(const struct IDProperty *prop);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BKE_IDPROP_H__ */
diff --cc source/blender/blenkernel/intern/idprop.c
index 87e5ed8cc1e,a224ef1e212..b3b5afa88a9
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@@ -1095,15 -1068,19 +1095,30 @@@ void IDP_ClearProperty(IDProperty *prop
prop->len = prop->totallen = 0;
}
+void IDP_Reset(IDProperty *prop, const IDProperty *reference)
+{
+ if (prop == NULL) {
+ return;
+ }
+ IDP_ClearProperty(prop);
+ if (reference != NULL) {
+ IDP_MergeGroup(prop, reference, true);
+ }
+}
+
/** \} */
+
+ /* We could write a C version, see: idprop_py_api.c */
+ #ifndef WITH_PYTHON
+ char *IDP_reprN(IDProperty *UNUSED(prop))
+ {
+ return BLI_strdup("<unsupported>");
+ }
+
+ void IDP_print(IDProperty *prop)
+ {
+ char *repr = IDP_reprN(prop);
+ printf("IDProperty(%p): %s\n", prop, repr);
+ MEM_freeN(repr);
+ }
+ #endif /* WITH_PYTHON */
More information about the Bf-blender-cvs
mailing list