diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-24 17:00:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-24 17:04:46 +0300 |
commit | 56a336196dbd9d63e84ae8e0cb92b11b211dde6e (patch) | |
tree | f539927f2fbb4286b2b010326044f43600241add /source/blender/blenkernel/BKE_idprop.h | |
parent | 90768c9b68c66885f55115c7a3209bc0f3c3aaf3 (diff) |
Add utility function to reset ID property value to a given one
This is similar to idproperty_reset() defined in layer.c, but it does not
re-alloc property itself.
We should replace idproperty_reset() with IDP_Reset() now.
Diffstat (limited to 'source/blender/blenkernel/BKE_idprop.h')
-rw-r--r-- | source/blender/blenkernel/BKE_idprop.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index 055c530d255..02912739e86 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -32,6 +32,10 @@ #include "BLI_compiler_attrs.h" +#ifdef __cplusplus +extern "C" { +#endif + struct IDProperty; struct ID; @@ -119,6 +123,8 @@ void IDP_ClearProperty(IDProperty *prop); void IDP_RelinkProperty(struct IDProperty *prop); +void IDP_Reset(IDProperty *prop, const IDProperty *reference); + #define IDP_Int(prop) ((prop)->data.val) #define IDP_Array(prop) ((prop)->data.pointer) /* C11 const correctness for casts */ @@ -151,4 +157,8 @@ void IDP_RelinkProperty(struct IDProperty *prop); void IDP_spit(IDProperty *prop); #endif +#ifdef __cplusplus +} +#endif + #endif /* __BKE_IDPROP_H__ */ |