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:
parent
e52d78978a
commit
3b8a14a3c0
Notes:
blender-bot
2023-02-14 19:14:21 +01:00
Referenced by issue #69576, location and rotation with align to 3d cursor Referenced by issue blender/blender-addons#65878, "Bpy.ops.object.camera_add" doesn't take the rotation argument into account
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue