[Bf-blender-cvs] [3540b507801] blender2.8: Cleanup: use id-property access macros
Campbell Barton
noreply at git.blender.org
Fri Apr 21 11:45:19 CEST 2017
Commit: 3540b507801461d30d6a856daa26efda15011f79
Author: Campbell Barton
Date: Fri Apr 21 19:47:01 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB3540b507801461d30d6a856daa26efda15011f79
Cleanup: use id-property access macros
===================================================================
M source/blender/blenkernel/intern/layer.c
===================================================================
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index e9c3a43fe1b..0fb945b64ea 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1188,37 +1188,37 @@ void BKE_collection_engine_property_add_bool(IDProperty *props, const char *name
int BKE_collection_engine_property_value_get_int(IDProperty *props, const char *name)
{
IDProperty *idprop = IDP_GetPropertyFromGroup(props, name);
- return idprop ? idprop->data.val : 0;
+ return idprop ? IDP_Int(idprop) : 0;
}
float BKE_collection_engine_property_value_get_float(IDProperty *props, const char *name)
{
IDProperty *idprop = IDP_GetPropertyFromGroup(props, name);
- return idprop ? *((float *)&idprop->data.val) : 0.0f;
+ return idprop ? IDP_Float(idprop) : 0.0f;
}
bool BKE_collection_engine_property_value_get_bool(IDProperty *props, const char *name)
{
IDProperty *idprop = IDP_GetPropertyFromGroup(props, name);
- return idprop ? idprop->data.val : 0;
+ return idprop ? IDP_Int(idprop) : 0;
}
void BKE_collection_engine_property_value_set_int(IDProperty *props, const char *name, int value)
{
IDProperty *idprop = IDP_GetPropertyFromGroup(props, name);
- idprop->data.val = value;
+ IDP_Int(idprop) = value;
}
void BKE_collection_engine_property_value_set_float(IDProperty *props, const char *name, float value)
{
IDProperty *idprop = IDP_GetPropertyFromGroup(props, name);
- *(float *)&idprop->data.val = value;
+ IDP_Float(idprop) = value;
}
void BKE_collection_engine_property_value_set_bool(IDProperty *props, const char *name, bool value)
{
IDProperty *idprop = IDP_GetPropertyFromGroup(props, name);
- idprop->data.val = value;
+ IDP_Int(idprop) = value;
}
/* Engine Settings recalculate */
More information about the Bf-blender-cvs
mailing list