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>2017-04-21 12:47:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-21 12:47:01 +0300
commit3540b507801461d30d6a856daa26efda15011f79 (patch)
tree2342340c42cfd99b869c0ff88225a872b6b4ecac /source/blender/blenkernel
parent6294bd1b8bba6ac6e906eab1e7738b07264df997 (diff)
Cleanup: use id-property access macros
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/layer.c12
1 files changed, 6 insertions, 6 deletions
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 */