Fix T77942: Add Cube scales immediately upon creation after changing Size attribute on prior Add Cube command

Always use the default size here, since desired bounds have been set
interactively, it does not make sense to use a different size from a
previous command.

Maniphest Tasks: T77942

Differential Revision: https://developer.blender.org/D8056
This commit is contained in:
Philipp Oeser
2020-06-17 13:05:44 +02:00
parent 19c7b5f45a
commit 26e5718e29

View File

@@ -936,6 +936,8 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve
RNA_float_set_array(&op_props, "rotation", rotation);
RNA_float_set_array(&op_props, "location", location);
RNA_float_set_array(&op_props, "scale", scale);
/* Always use default size here. */
RNA_float_set(&op_props, "size", 2.0f);
WM_operator_name_call_ptr(C, ot, WM_OP_EXEC_DEFAULT, &op_props);
WM_operator_properties_free(&op_props);
}