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)
This commit is contained in:
2010-06-14 03:52:10 +00:00
parent aa97b4362b
commit c2f36a4d6a
69 changed files with 340 additions and 353 deletions

View File

@@ -46,13 +46,13 @@ class AddPresetBase(bpy.types.Operator):
target_path = bpy.utils.preset_paths(self.preset_subdir)[0] # we need some way to tell the user and system preset path
path = os.path.join(target_path, filename)
filepath = os.path.join(target_path, filename)
if getattr(self, "save_keyconfig", True):
bpy.ops.wm.keyconfig_export(path=path, kc_name=self.properties.name)
file_preset = open(path, 'a')
bpy.ops.wm.keyconfig_export(filepath=filepath, kc_name=self.properties.name)
file_preset = open(filepath, 'a')
file_preset.write("wm.active_keyconfig = kc\n\n")
else:
file_preset = open(path, 'w')
file_preset = open(filepath, 'w')
for rna_path in self.preset_values:
value = eval(rna_path)
@@ -79,7 +79,7 @@ class ExecutePreset(bpy.types.Operator):
bl_idname = "script.execute_preset"
bl_label = "Execute a Python Preset"
path = bpy.props.StringProperty(name="Path", description="Path of the Python file to execute", maxlen=512, default="")
filepath = bpy.props.StringProperty(name="Path", description="Path of the Python file to execute", maxlen=512, default="")
preset_name = bpy.props.StringProperty(name="Preset Name", description="Name of the Preset being executed", default="")
menu_idname = bpy.props.StringProperty(name="Menu ID Name", description="ID name of the menu this was called from", default="")
@@ -89,7 +89,7 @@ class ExecutePreset(bpy.types.Operator):
preset_class.bl_label = self.properties.preset_name
# execute the preset using script.python_file_run
bpy.ops.script.python_file_run(path=self.properties.path)
bpy.ops.script.python_file_run(filepath=self.properties.filepath)
return {'FINISHED'}