diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 23:18:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 23:18:09 +0300 |
commit | 09aa799e5331a9da666f8a6325b038a866b1f35d (patch) | |
tree | ccff0086f70ea7929554a7e4c90bd1182f125ba6 /release/scripts/templates_py/operator_mesh_add.py | |
parent | e3c85aaca74fc7bd2a9da43a0396a886363bc93d (diff) |
PyAPI: Use annotations for RNA definitions
- Logical use of fields since they define type information.
- Avoids using ordered-dict metaclass.
Properties using regular assignments will print a warning and load,
however the order is undefined.
Diffstat (limited to 'release/scripts/templates_py/operator_mesh_add.py')
-rw-r--r-- | release/scripts/templates_py/operator_mesh_add.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/release/scripts/templates_py/operator_mesh_add.py b/release/scripts/templates_py/operator_mesh_add.py index 407956a0fda..6b39ef7bbba 100644 --- a/release/scripts/templates_py/operator_mesh_add.py +++ b/release/scripts/templates_py/operator_mesh_add.py @@ -49,25 +49,25 @@ class AddBox(bpy.types.Operator): bl_label = "Add Box" bl_options = {'REGISTER', 'UNDO'} - width = FloatProperty( + width: FloatProperty( name="Width", description="Box Width", min=0.01, max=100.0, default=1.0, ) - height = FloatProperty( + height: FloatProperty( name="Height", description="Box Height", min=0.01, max=100.0, default=1.0, ) - depth = FloatProperty( + depth: FloatProperty( name="Depth", description="Box Depth", min=0.01, max=100.0, default=1.0, ) - layers = BoolVectorProperty( + layers: BoolVectorProperty( name="Layers", description="Object Layers", size=20, @@ -75,15 +75,15 @@ class AddBox(bpy.types.Operator): ) # generic transform props - view_align = BoolProperty( + view_align: BoolProperty( name="Align to View", default=False, ) - location = FloatVectorProperty( + location: FloatVectorProperty( name="Location", subtype='TRANSLATION', ) - rotation = FloatVectorProperty( + rotation: FloatVectorProperty( name="Rotation", subtype='EULER', ) |