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>2010-06-14 07:52:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-14 07:52:10 +0400
commitc2f36a4d6abf829f28079c80e7e9dae6b80251cc (patch)
tree0c85ad35fca0cadbb997a098244debab62a6167a /release/scripts/templates
parentaa97b4362be6015b3e7e1d5c72bd5245cfb0960a (diff)
naming changes
path -> filepath (for rna and operators, as agreed on with elubie) path -> data_path (for windowmanager context functions, this was alredy used in many places)
Diffstat (limited to 'release/scripts/templates')
-rw-r--r--release/scripts/templates/operator.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/templates/operator.py b/release/scripts/templates/operator.py
index 23d75607ba3..de181a13c25 100644
--- a/release/scripts/templates/operator.py
+++ b/release/scripts/templates/operator.py
@@ -1,7 +1,7 @@
import bpy
-def write_some_data(context, path, use_some_setting):
+def write_some_data(context, filepath, use_some_setting):
print("running write_some_data...")
pass
@@ -16,7 +16,7 @@ class ExportSomeData(bpy.types.Operator):
# to the class instance from the operator settings before calling.
# TODO, add better example props
- path = StringProperty(name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= "")
+ filepath = StringProperty(name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= "")
use_setting = BoolProperty(name="Example Boolean", description="Example Tooltip", default= True)
type = bpy.props.EnumProperty(items=(('OPT_A', "First Option", "Description one"), ('OPT_B', "Second Option", "Description two.")),
@@ -30,10 +30,10 @@ class ExportSomeData(bpy.types.Operator):
def execute(self, context):
# # Bug, currently isnt working
- #if not self.is_property_set("path"):
+ #if not self.is_property_set("filepath"):
# raise Exception("filename not set")
- write_some_data(self.properties.path, context, self.properties.use_setting)
+ write_some_data(self.properties.filepath, context, self.properties.use_setting)
return {'FINISHED'}
@@ -63,4 +63,4 @@ menu_func = lambda self, context: self.layout.operator("export.some_data", text=
bpy.types.INFO_MT_file_export.append(menu_func)
if __name__ == "__main__":
- bpy.ops.export.some_data('INVOKE_DEFAULT', path="/tmp/test.ply")
+ bpy.ops.export.some_data('INVOKE_DEFAULT', filepath="/tmp/test.ply")