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 'release/scripts/templates/operator_export.py')
-rw-r--r--release/scripts/templates/operator_export.py28
1 files changed, 18 insertions, 10 deletions
diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py
index 4cf943a53b7..b1d53e6ee0c 100644
--- a/release/scripts/templates/operator_export.py
+++ b/release/scripts/templates/operator_export.py
@@ -24,22 +24,30 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
# ExportHelper mixin class uses this
filename_ext = ".txt"
- filter_glob = StringProperty(default="*.txt", options={'HIDDEN'})
+ filter_glob = StringProperty(
+ default="*.txt",
+ options={'HIDDEN'},
+ )
# List of operator properties, the attributes will be assigned
# to the class instance from the operator settings before calling.
- use_setting = BoolProperty(name="Example Boolean", description="Example Tooltip", default=True)
-
- type = EnumProperty(items=(('OPT_A', "First Option", "Description one"),
- ('OPT_B', "Second Option", "Description two."),
- ),
- name="Example Enum",
- description="Choose between two items",
- default='OPT_A')
+ use_setting = BoolProperty(
+ name="Example Boolean",
+ description="Example Tooltip",
+ default=True,
+ )
+
+ type = EnumProperty(
+ name="Example Enum",
+ description="Choose between two items",
+ items=(('OPT_A', "First Option", "Description one"),
+ ('OPT_B', "Second Option", "Description two.")),
+ default='OPT_A',
+ )
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
return write_some_data(context, self.filepath, self.use_setting)