Add Object Tool: quiet warning setting size

The size property was only used for the cube
This commit is contained in:
Campbell Barton 2021-01-16 11:29:55 +11:00
parent 8fd3ffcb31
commit 2f0d919f89
Notes: blender-bot 2023-02-14 11:18:07 +01:00
Referenced by issue #57210, Add Object Tools Todo
1 changed files with 3 additions and 1 deletions

View File

@ -1354,7 +1354,9 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve
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);
if (ipd->primitive_type == PLACE_PRIMITIVE_TYPE_CUBE) {
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);
}