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>2011-11-15 13:22:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-15 13:22:52 +0400
commit8623935aa838a168f64b54f4fefe472444db72fc (patch)
treeb2113b2d6b4ce0c9818d7270d7909f04fd3a8dbb /source/blender/makesrna/intern/rna_access.c
parentdf6aa48eb98da2637982e1a3d086a2e225815e13 (diff)
pass a pointer to IDP_New's IDPropertyTemplate rather then a copy.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 47a7420cb7f..2b31f7184b6 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1617,7 +1617,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_INT, &val, prop->identifier));
}
}
@@ -1696,7 +1696,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
group= RNA_struct_idprops(ptr, 1);
if(group) {
- idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
+ idprop= IDP_New(IDP_ARRAY, &val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
@@ -1814,7 +1814,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_INT, &val, prop->identifier));
}
}
@@ -1930,7 +1930,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
group= RNA_struct_idprops(ptr, 1);
if(group) {
- idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
+ idprop= IDP_New(IDP_ARRAY, &val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
@@ -2050,7 +2050,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_FLOAT, val, prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_FLOAT, &val, prop->identifier));
}
}
@@ -2184,7 +2184,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
group= RNA_struct_idprops(ptr, 1);
if(group) {
- idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
+ idprop= IDP_New(IDP_ARRAY, &val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
}
@@ -2439,7 +2439,7 @@ void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_INT, &val, prop->identifier));
}
}
@@ -2535,7 +2535,7 @@ void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
group= RNA_struct_idprops(ptr, 1);
if(group)
- IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, prop->identifier));
+ IDP_AddToGroup(group, IDP_New(IDP_GROUP, &val, prop->identifier));
}
else
printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);
@@ -2658,7 +2658,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
IDPropertyTemplate val = {0};
IDProperty *item;
- item= IDP_New(IDP_GROUP, val, "");
+ item= IDP_New(IDP_GROUP, &val, "");
IDP_AppendArray(idprop, item);
// IDP_FreeProperty(item); // IDP_AppendArray does a shallow copy (memcpy), only free memory
MEM_freeN(item);
@@ -2672,7 +2672,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
idprop= IDP_NewIDPArray(prop->identifier);
IDP_AddToGroup(group, idprop);
- item= IDP_New(IDP_GROUP, val, "");
+ item= IDP_New(IDP_GROUP, &val, "");
IDP_AppendArray(idprop, item);
// IDP_FreeProperty(item); // IDP_AppendArray does a shallow copy (memcpy), only free memory
MEM_freeN(item);