[Bf-blender-cvs] [3b8a14a3c07] master: Fix T65878: "Bpy.ops.object.camera_add" doesn't take the rotation argument into account

Philipp Oeser noreply at git.blender.org
Mon Jun 17 16:09:32 CEST 2019


Commit: 3b8a14a3c072b01c833c18781612960fc9e78cc3
Author: Philipp Oeser
Date:   Mon Jun 17 15:21:36 2019 +0200
Branches: master
https://developer.blender.org/rB3b8a14a3c072b01c833c18781612960fc9e78cc3

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

===================================================================

M	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;



More information about the Bf-blender-cvs mailing list