Objects: new 3D cursor alignment option when adding objects

The choices are now World, View and 3D Cursor.

This breaks Python API compatibility, add-ons that add objects with this
parameter will need to be updated.

Differential Revision: https://developer.blender.org/D4706
This commit is contained in:
Hans Goudey
2019-05-15 16:56:22 +02:00
committed by Brecht Van Lommel
parent ddae9c9232
commit 06fe2a5e0c
8 changed files with 99 additions and 54 deletions

View File

@@ -75,10 +75,17 @@ class AddBox(bpy.types.Operator):
)
# generic transform props
view_align: BoolProperty(
name="Align to View",
default=False,
align_items = (
('WORLD', "World", "Align the new object to the world"),
('VIEW', "View", "Align the new object to the view"),
('CURSOR', "3D Cursor", "Use the 3D cursor orientation for the new object")
)
align: EnumProperty(
name="Align",
items=align_items,
default='WORLD',
update=AddObjectHelper.align_update_callback,
)
location: FloatVectorProperty(
name="Location",
subtype='TRANSLATION',