diff options
author | Hans Goudey <h.goudey@me.com> | 2019-05-15 17:56:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-15 19:10:58 +0300 |
commit | 06fe2a5e0c5d6202864701cf7fd800e4906057c9 (patch) | |
tree | 020910555116b6f002e87e52bb1f50a49e5967ef /release/scripts/templates_py | |
parent | ddae9c92326486c5c95613bc0b7bb46e2d9bc261 (diff) |
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
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r-- | release/scripts/templates_py/operator_mesh_add.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/release/scripts/templates_py/operator_mesh_add.py b/release/scripts/templates_py/operator_mesh_add.py index 5a9acce3026..39402ab1c6b 100644 --- a/release/scripts/templates_py/operator_mesh_add.py +++ b/release/scripts/templates_py/operator_mesh_add.py @@ -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', |