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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-18 16:09:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-18 16:09:53 +0400
commit83c090a555af97ae7f2f08595298d5b2e6266e85 (patch)
tree3bdfcea64abf6aec41187a2435f52fb03931f1e2 /source
parent591b087204b1bc9372d8c87d5bdf28a55f3ae13a (diff)
fix for bad array access in transform operator, was assigning an array to a single float operator value.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/transform/transform.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index c1c812e8c68..03a98bf30d8 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1356,16 +1356,15 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
ToolSettings *ts = CTX_data_tool_settings(C);
int constraint_axis[3] = {0, 0, 0};
int proportional = 0;
+ PropertyRNA *prop;
- if (RNA_struct_find_property(op->ptr, "value"))
- {
- if (t->flag & T_AUTOVALUES)
- {
- RNA_float_set_array(op->ptr, "value", t->auto_values);
+ if ((prop= RNA_struct_find_property(op->ptr, "value"))) {
+ float *values= (t->flag & T_AUTOVALUES) ? t->auto_values : t->values;
+ if (RNA_property_array_check(prop)) {
+ RNA_property_float_set_array(op->ptr, prop, values);
}
- else
- {
- RNA_float_set_array(op->ptr, "value", t->values);
+ else {
+ RNA_property_float_set(op->ptr, prop, values[0]);
}
}