From 3b8a14a3c072b01c833c18781612960fc9e78cc3 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 17 Jun 2019 15:21:36 +0200 Subject: 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 --- source/blender/editors/object/object_add.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/object/object_add.c') diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 99c3d7da2a2..a7b4a18169b 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -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; -- cgit v1.2.3