fix for bad array access in transform operator, was assigning an array to a single float operator value.

This commit is contained in:
Campbell Barton 2011-08-18 12:09:53 +00:00
parent 591b087204
commit 83c090a555

@ -1356,16 +1356,15 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
ToolSettings *ts = CTX_data_tool_settings(C); ToolSettings *ts = CTX_data_tool_settings(C);
int constraint_axis[3] = {0, 0, 0}; int constraint_axis[3] = {0, 0, 0};
int proportional = 0; int proportional = 0;
PropertyRNA *prop;
if (RNA_struct_find_property(op->ptr, "value")) if ((prop= RNA_struct_find_property(op->ptr, "value"))) {
{ float *values= (t->flag & T_AUTOVALUES) ? t->auto_values : t->values;
if (t->flag & T_AUTOVALUES) if (RNA_property_array_check(prop)) {
{ RNA_property_float_set_array(op->ptr, prop, values);
RNA_float_set_array(op->ptr, "value", t->auto_values);
} }
else else {
{ RNA_property_float_set(op->ptr, prop, values[0]);
RNA_float_set_array(op->ptr, "value", t->values);
} }
} }