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:
Diffstat (limited to 'doc/python_api/examples/bpy.props.1.py')
-rw-r--r--doc/python_api/examples/bpy.props.1.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/python_api/examples/bpy.props.1.py b/doc/python_api/examples/bpy.props.1.py
index dd3a3ebc432..e442faf245b 100644
--- a/doc/python_api/examples/bpy.props.1.py
+++ b/doc/python_api/examples/bpy.props.1.py
@@ -15,13 +15,15 @@ class OBJECT_OT_property_example(bpy.types.Operator):
bl_label = "Property Example"
bl_options = {'REGISTER', 'UNDO'}
- my_float = bpy.props.FloatProperty(name="Some Floating Point")
- my_bool = bpy.props.BoolProperty(name="Toggle Option")
- my_string = bpy.props.StringProperty(name="String Value")
+ my_float: bpy.props.FloatProperty(name="Some Floating Point")
+ my_bool: bpy.props.BoolProperty(name="Toggle Option")
+ my_string: bpy.props.StringProperty(name="String Value")
def execute(self, context):
- self.report({'INFO'}, 'F: %.2f B: %s S: %r' %
- (self.my_float, self.my_bool, self.my_string))
+ self.report(
+ {'INFO'}, 'F: %.2f B: %s S: %r' %
+ (self.my_float, self.my_bool, self.my_string)
+ )
print('My float:', self.my_float)
print('My bool:', self.my_bool)
print('My string:', self.my_string)
@@ -53,5 +55,8 @@ bpy.utils.register_class(OBJECT_OT_property_example)
bpy.utils.register_class(OBJECT_PT_property_example)
# Demo call. Be sure to also test in the 3D Viewport.
-bpy.ops.object.property_example(my_float=47, my_bool=True,
- my_string="Shouldn't that be 327?")
+bpy.ops.object.property_example(
+ my_float=47,
+ my_bool=True,
+ my_string="Shouldn't that be 327?",
+)