Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-11 23:18:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-11 23:18:09 +0300
commit09aa799e5331a9da666f8a6325b038a866b1f35d (patch)
treeccff0086f70ea7929554a7e4c90bd1182f125ba6 /release/scripts/startup/bl_operators/object.py
parente3c85aaca74fc7bd2a9da43a0396a886363bc93d (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/startup/bl_operators/object.py')
-rw-r--r--release/scripts/startup/bl_operators/object.py29
1 files changed, 14 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index fb321463d33..be379ec6089 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -35,19 +35,19 @@ class SelectPattern(Operator):
bl_label = "Select Pattern"
bl_options = {'REGISTER', 'UNDO'}
- pattern = StringProperty(
+ pattern: StringProperty(
name="Pattern",
description="Name filter using '*', '?' and "
"'[abc]' unix style wildcards",
maxlen=64,
default="*",
)
- case_sensitive = BoolProperty(
+ case_sensitive: BoolProperty(
name="Case Sensitive",
description="Do a case sensitive compare",
default=False,
)
- extend = BoolProperty(
+ extend: BoolProperty(
name="Extend",
description="Extend the existing selection",
default=True,
@@ -115,7 +115,7 @@ class SelectCamera(Operator):
bl_label = "Select Camera"
bl_options = {'REGISTER', 'UNDO'}
- extend = BoolProperty(
+ extend: BoolProperty(
name="Extend",
description="Extend the selection",
default=False
@@ -152,15 +152,15 @@ class SelectHierarchy(Operator):
bl_label = "Select Hierarchy"
bl_options = {'REGISTER', 'UNDO'}
- direction = EnumProperty(
+ direction: EnumProperty(
items=(('PARENT', "Parent", ""),
('CHILD', "Child", ""),
),
name="Direction",
description="Direction to select in the hierarchy",
- default='PARENT')
-
- extend = BoolProperty(
+ default='PARENT',
+ )
+ extend: BoolProperty(
name="Extend",
description="Extend the existing selection",
default=False,
@@ -221,14 +221,13 @@ class SubdivisionSet(Operator):
bl_label = "Subdivision Set"
bl_options = {'REGISTER', 'UNDO'}
- level = IntProperty(
+ level: IntProperty(
name="Level",
min=-100, max=100,
soft_min=-6, soft_max=6,
default=1,
)
-
- relative = BoolProperty(
+ relative: BoolProperty(
name="Relative",
description=("Apply the subsurf level as an offset "
"relative to the current level"),
@@ -312,7 +311,7 @@ class ShapeTransfer(Operator):
bl_label = "Transfer Shape Key"
bl_options = {'REGISTER', 'UNDO'}
- mode = EnumProperty(
+ mode: EnumProperty(
items=(('OFFSET',
"Offset",
"Apply the relative positional offset",
@@ -330,7 +329,7 @@ class ShapeTransfer(Operator):
description="Relative shape positions to the new shape method",
default='OFFSET',
)
- use_clamp = BoolProperty(
+ use_clamp: BoolProperty(
name="Clamp Offset",
description=("Clamp the transformation to the distance each "
"vertex moves in the original shape"),
@@ -696,7 +695,7 @@ class TransformsToDeltas(Operator):
bl_label = "Transforms to Deltas"
bl_options = {'REGISTER', 'UNDO'}
- mode = EnumProperty(
+ mode: EnumProperty(
items=(
('ALL', "All Transforms", "Transfer location, rotation, and scale transforms"),
('LOC', "Location", "Transfer location transforms only"),
@@ -707,7 +706,7 @@ class TransformsToDeltas(Operator):
description="Which transforms to transfer",
default='ALL',
)
- reset_values = BoolProperty(
+ reset_values: BoolProperty(
name="Reset Values",
description=("Clear transform values after transferring to deltas"),
default=True,