Fix T65878: "Bpy.ops.object.camera_add" doesn't take the rotation

argument into account

- if a rotation is given, always take it into account [which means
setting alignment to ALIGN_WORLD prior]
- caused by recent rB06fe2a5e0c5d

Reviewers: brecht

Maniphest Tasks: T65878

Differential Revision: https://developer.blender.org/D5085
This commit is contained in:
2019-06-17 15:21:36 +02:00
parent e52d78978a
commit 3b8a14a3c0

View File

@@ -423,6 +423,8 @@ bool ED_object_add_generic_get_opts(bContext *C,
if (RNA_struct_property_is_set(op->ptr, "rotation")) {
*is_view_aligned = false;
RNA_property_enum_set(op->ptr, prop, ALIGN_WORLD);
alignment = ALIGN_WORLD;
}
else if (alignment_set) {
*is_view_aligned = alignment == ALIGN_VIEW;