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_modal.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_modal.py')
-rw-r--r-- | release/scripts/templates_py/operator_modal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/templates_py/operator_modal.py b/release/scripts/templates_py/operator_modal.py index 88e5ee80590..c242e3b67b9 100644 --- a/release/scripts/templates_py/operator_modal.py +++ b/release/scripts/templates_py/operator_modal.py @@ -7,8 +7,8 @@ class ModalOperator(bpy.types.Operator): bl_idname = "object.modal_operator" bl_label = "Simple Modal Operator" - first_mouse_x = IntProperty() - first_value = FloatProperty() + first_mouse_x: IntProperty() + first_value: FloatProperty() def modal(self, context, event): if event.type == 'MOUSEMOVE': |