From c2f36a4d6abf829f28079c80e7e9dae6b80251cc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 14 Jun 2010 03:52:10 +0000 Subject: 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) --- release/scripts/io/export_3ds.py | 6 +- release/scripts/io/export_fbx.py | 12 +-- release/scripts/io/export_mdd.py | 8 +- release/scripts/io/export_obj.py | 12 +-- release/scripts/io/export_ply.py | 8 +- release/scripts/io/export_x3d.py | 6 +- release/scripts/io/import_anim_bvh.py | 4 +- release/scripts/io/import_scene_3ds.py | 4 +- release/scripts/io/import_scene_obj.py | 23 ++---- release/scripts/io/import_shape_mdd.py | 6 +- release/scripts/io/netrender/operators.py | 2 +- release/scripts/io/netrender/utils.py | 2 +- release/scripts/modules/bpy_types.py | 10 +-- release/scripts/modules/graphviz_export.py | 6 +- release/scripts/modules/rna_prop_ui.py | 28 +++---- release/scripts/op/image.py | 24 +++--- release/scripts/op/presets.py | 12 +-- release/scripts/op/uv.py | 6 +- release/scripts/op/wm.py | 96 +++++++++++----------- release/scripts/templates/operator.py | 10 +-- .../scripts/ui/properties_data_armature_rigify.py | 6 +- release/scripts/ui/properties_data_modifier.py | 4 +- release/scripts/ui/properties_object.py | 2 +- release/scripts/ui/properties_scene.py | 12 +-- release/scripts/ui/space_info.py | 8 +- release/scripts/ui/space_userpref.py | 10 +-- release/scripts/ui/space_userpref_keymap.py | 22 ++--- release/scripts/ui/space_view3d.py | 22 ++--- release/scripts/ui/space_view3d_toolbar.py | 4 +- source/blender/blenkernel/intern/anim.c | 2 +- source/blender/editors/curve/editfont.c | 10 +-- source/blender/editors/mesh/mesh_data.c | 6 +- source/blender/editors/object/object_modifier.c | 6 +- source/blender/editors/object/object_ops.c | 6 +- source/blender/editors/render/render_shading.c | 6 +- source/blender/editors/screen/screendump.c | 8 +- source/blender/editors/sculpt_paint/paint_ops.c | 50 +++++------ source/blender/editors/sound/sound_ops.c | 4 +- source/blender/editors/space_buttons/buttons_ops.c | 6 +- .../blender/editors/space_console/space_console.c | 8 +- source/blender/editors/space_file/file_ops.c | 2 +- source/blender/editors/space_file/file_panels.c | 2 +- source/blender/editors/space_file/filesel.c | 4 +- source/blender/editors/space_graph/graph_edit.c | 2 +- source/blender/editors/space_image/image_ops.c | 14 ++-- source/blender/editors/space_image/space_image.c | 2 +- source/blender/editors/space_info/info_ops.c | 2 +- source/blender/editors/space_node/node_edit.c | 6 +- source/blender/editors/space_node/space_node.c | 2 +- source/blender/editors/space_script/script_edit.c | 4 +- source/blender/editors/space_script/script_ops.c | 2 +- .../editors/space_sequencer/sequencer_add.c | 4 +- .../editors/space_sequencer/space_sequencer.c | 2 +- source/blender/editors/space_text/space_text.c | 10 +-- source/blender/editors/space_text/text_ops.c | 12 +-- source/blender/editors/space_view3d/space_view3d.c | 2 +- source/blender/editors/space_view3d/view3d_ops.c | 18 ++-- source/blender/editors/transform/transform_ops.c | 4 +- source/blender/makesrna/intern/rna_image_api.c | 2 +- source/blender/makesrna/intern/rna_main_api.c | 2 +- source/blender/makesrna/intern/rna_modifier.c | 2 +- source/blender/python/intern/bpy_rna.c | 14 ++-- source/blender/windowmanager/WM_api.h | 2 +- source/blender/windowmanager/WM_types.h | 2 +- .../blender/windowmanager/intern/wm_event_system.c | 2 +- source/blender/windowmanager/intern/wm_files.c | 22 ++--- source/blender/windowmanager/intern/wm_init_exit.c | 2 +- source/blender/windowmanager/intern/wm_operators.c | 60 +++++++------- source/blender/windowmanager/intern/wm_window.c | 2 +- 69 files changed, 340 insertions(+), 353 deletions(-) diff --git a/release/scripts/io/export_3ds.py b/release/scripts/io/export_3ds.py index 9cb5f3a077b..e234ab8600c 100644 --- a/release/scripts/io/export_3ds.py +++ b/release/scripts/io/export_3ds.py @@ -1123,11 +1123,11 @@ class Export3DS(bpy.types.Operator): # filename = StringProperty(name="File Name", description="File name used for exporting the 3DS file", maxlen= 1024, default= ""), - path = StringProperty(name="File Path", description="File path used for exporting the 3DS file", maxlen= 1024, default= "") + filepath = StringProperty(name="File Path", description="Filepath used for exporting the 3DS file", maxlen= 1024, default= "") check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) def execute(self, context): - save_3ds(self.properties.path, context) + save_3ds(self.properties.filepath, context) return {'FINISHED'} def invoke(self, context, event): @@ -1142,7 +1142,7 @@ class Export3DS(bpy.types.Operator): # Add to a menu def menu_func(self, context): default_path = bpy.data.filepath.replace(".blend", ".3ds") - self.layout.operator(Export3DS.bl_idname, text="3D Studio (.3ds)").path = default_path + self.layout.operator(Export3DS.bl_idname, text="3D Studio (.3ds)").filepath = default_path def register(): diff --git a/release/scripts/io/export_fbx.py b/release/scripts/io/export_fbx.py index c2a93a5089e..967bbf50307 100644 --- a/release/scripts/io/export_fbx.py +++ b/release/scripts/io/export_fbx.py @@ -3335,7 +3335,7 @@ class ExportFBX(bpy.types.Operator): # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for exporting the FBX file", maxlen= 1024, default="") + filepath = StringProperty(name="File Path", description="Filepath used for exporting the FBX file", maxlen= 1024, default="") check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) EXP_OBS_SELECTED = BoolProperty(name="Selected Objects", description="Export selected objects on visible layers", default=True) @@ -3369,8 +3369,8 @@ class ExportFBX(bpy.types.Operator): return context.active_object def execute(self, context): - if not self.properties.path: - raise Exception("path not set") + if not self.properties.filepath: + raise Exception("filepath not set") GLOBAL_MATRIX = mtx4_identity GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.properties.TX_SCALE @@ -3378,7 +3378,7 @@ class ExportFBX(bpy.types.Operator): if self.properties.TX_YROT90: GLOBAL_MATRIX = mtx4_y90n * GLOBAL_MATRIX if self.properties.TX_ZROT90: GLOBAL_MATRIX = mtx4_z90n * GLOBAL_MATRIX - write(self.properties.path, + write(self.properties.filepath, None, # XXX context, self.properties.EXP_OBS_SELECTED, @@ -3411,7 +3411,7 @@ class ExportFBX(bpy.types.Operator): # if __name__ == "__main__": -# bpy.ops.EXPORT_OT_ply(path="/tmp/test.ply") +# bpy.ops.EXPORT_OT_ply(filepath="/tmp/test.ply") # NOTES (all line numbers correspond to original export_fbx.py (under release/scripts) @@ -3439,7 +3439,7 @@ class ExportFBX(bpy.types.Operator): def menu_func(self, context): default_path = bpy.data.filepath.replace(".blend", ".fbx") - self.layout.operator(ExportFBX.bl_idname, text="Autodesk FBX (.fbx)").path = default_path + self.layout.operator(ExportFBX.bl_idname, text="Autodesk FBX (.fbx)").filepath = default_path def register(): diff --git a/release/scripts/io/export_mdd.py b/release/scripts/io/export_mdd.py index 3ae6ed3de9b..3c82ff5d497 100644 --- a/release/scripts/io/export_mdd.py +++ b/release/scripts/io/export_mdd.py @@ -159,7 +159,7 @@ class ExportMDD(bpy.types.Operator): # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for exporting the MDD file", maxlen=1024) + filepath = StringProperty(name="File Path", description="Filepath used for exporting the MDD file", maxlen=1024) check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) fps = IntProperty(name="Frames Per Second", description="Number of frames/second", min=minfps, max=maxfps, default=25) frame_start = IntProperty(name="Start Frame", description="Start frame for baking", min=minframe, max=maxframe, default=1) @@ -170,9 +170,9 @@ class ExportMDD(bpy.types.Operator): return (ob and ob.type == 'MESH') def execute(self, context): - if not self.properties.path: + if not self.properties.filepath: raise Exception("filename not set") - write(self.properties.path, context.scene, context.active_object, + write(self.properties.filepath, context.scene, context.active_object, self.properties.frame_start, self.properties.frame_end, self.properties.fps) return {'FINISHED'} @@ -184,7 +184,7 @@ class ExportMDD(bpy.types.Operator): def menu_func(self, context): default_path = bpy.data.filepath.replace(".blend", ".mdd") - self.layout.operator(ExportMDD.bl_idname, text="Lightwave Point Cache (.mdd)").path = default_path + self.layout.operator(ExportMDD.bl_idname, text="Lightwave Point Cache (.mdd)").filepath = default_path def register(): diff --git a/release/scripts/io/export_obj.py b/release/scripts/io/export_obj.py index 9c065c6dac9..40ef68041de 100644 --- a/release/scripts/io/export_obj.py +++ b/release/scripts/io/export_obj.py @@ -900,7 +900,7 @@ class ExportOBJ(bpy.types.Operator): # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for exporting the OBJ file", maxlen= 1024, default= "") + filepath = StringProperty(name="File Path", description="Filepath used for exporting the OBJ file", maxlen= 1024, default= "") check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) # context group @@ -932,11 +932,11 @@ class ExportOBJ(bpy.types.Operator): def execute(self, context): - path = self.properties.path - if not path.lower().endswith(".obj"): - path += ".obj" + filepath = self.properties.filepath + if not filepath.lower().endswith(".obj"): + filepath += ".obj" - do_export(path, context, + do_export(filepath, context, EXPORT_TRI=self.properties.use_triangles, EXPORT_EDGES=self.properties.use_edges, EXPORT_NORMALS=self.properties.use_normals, @@ -965,7 +965,7 @@ class ExportOBJ(bpy.types.Operator): def menu_func(self, context): default_path = bpy.data.filepath.replace(".blend", ".obj") - self.layout.operator(ExportOBJ.bl_idname, text="Wavefront (.obj)").path = default_path + self.layout.operator(ExportOBJ.bl_idname, text="Wavefront (.obj)").filepath = default_path def register(): diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py index d0f2fab9c3e..aee56550526 100644 --- a/release/scripts/io/export_ply.py +++ b/release/scripts/io/export_ply.py @@ -267,7 +267,7 @@ class ExportPLY(bpy.types.Operator): # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for exporting the PLY file", maxlen=1024, default="") + filepath = StringProperty(name="File Path", description="Filepath used for exporting the PLY file", maxlen=1024, default="") check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) use_modifiers = BoolProperty(name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default=True) use_normals = BoolProperty(name="Normals", description="Export Normals for smooth and hard shaded faces", default=True) @@ -280,10 +280,10 @@ class ExportPLY(bpy.types.Operator): def execute(self, context): # print("Selected: " + context.active_object.name) - if not self.properties.path: + if not self.properties.filepath: raise Exception("filename not set") - write(self.properties.path, context.scene, context.active_object,\ + write(self.properties.filepath, context.scene, context.active_object,\ EXPORT_APPLY_MODIFIERS=self.properties.use_modifiers, EXPORT_NORMALS=self.properties.use_normals, EXPORT_UV=self.properties.use_uvs, @@ -311,7 +311,7 @@ class ExportPLY(bpy.types.Operator): def menu_func(self, context): default_path = bpy.data.filepath.replace(".blend", ".ply") - self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)").path = default_path + self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)").filepath = default_path def register(): diff --git a/release/scripts/io/export_x3d.py b/release/scripts/io/export_x3d.py index 61f216af833..6dc2340ec93 100644 --- a/release/scripts/io/export_x3d.py +++ b/release/scripts/io/export_x3d.py @@ -1224,7 +1224,7 @@ class ExportX3D(bpy.types.Operator): # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for exporting the X3D file", maxlen= 1024, default= "") + filepath = StringProperty(name="File Path", description="Filepath used for exporting the X3D file", maxlen= 1024, default= "") check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) apply_modifiers = BoolProperty(name="Apply Modifiers", description="Use transformed mesh data from each object", default=True) @@ -1232,7 +1232,7 @@ class ExportX3D(bpy.types.Operator): compress = BoolProperty(name="Compress", description="GZip the resulting file, requires a full python install", default=False) def execute(self, context): - x3d_export(self.properties.path, context, self.properties.apply_modifiers, self.properties.triangulate, self.properties.compress) + x3d_export(self.properties.filepath, context, self.properties.apply_modifiers, self.properties.triangulate, self.properties.compress) return {'FINISHED'} def invoke(self, context, event): @@ -1243,7 +1243,7 @@ class ExportX3D(bpy.types.Operator): def menu_func(self, context): default_path = bpy.data.filepath.replace(".blend", ".x3d") - self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)").path = default_path + self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)").filepath = default_path def register(): diff --git a/release/scripts/io/import_anim_bvh.py b/release/scripts/io/import_anim_bvh.py index 4a708d684c8..d497ac47065 100644 --- a/release/scripts/io/import_anim_bvh.py +++ b/release/scripts/io/import_anim_bvh.py @@ -561,7 +561,7 @@ class BvhImporter(bpy.types.Operator): bl_idname = "import_anim.bvh" bl_label = "Import BVH" - path = StringProperty(name="File Path", description="File path used for importing the OBJ file", maxlen=1024, default="") + filepath = StringProperty(name="File Path", description="Filepath used for importing the OBJ file", maxlen=1024, default="") scale = FloatProperty(name="Scale", description="Scale the BVH by this value", min=0.0001, max=1000000.0, soft_min=0.001, soft_max=100.0, default=0.1) frame_start = IntProperty(name="Start Frame", description="Starting frame for the animation", default=1) loop = BoolProperty(name="Loop", description="Loop the animation playback", default=False) @@ -585,7 +585,7 @@ class BvhImporter(bpy.types.Operator): t1 = time.time() print('\tparsing bvh...', end="") - bvh_nodes = read_bvh(context, self.properties.path, + bvh_nodes = read_bvh(context, self.properties.filepath, ROT_MODE=self.properties.rotate_mode, GLOBAL_SCALE=self.properties.scale) diff --git a/release/scripts/io/import_scene_3ds.py b/release/scripts/io/import_scene_3ds.py index ca7ef774a72..c579f876371 100644 --- a/release/scripts/io/import_scene_3ds.py +++ b/release/scripts/io/import_scene_3ds.py @@ -1012,7 +1012,7 @@ class IMPORT_OT_autodesk_3ds(bpy.types.Operator): # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for importing the 3DS file", maxlen= 1024, default= "") + filepath = StringProperty(name="File Path", description="Filepath used for importing the 3DS file", maxlen= 1024, default= "") filename = StringProperty(name="File Name", description="Name of the file.") directory = StringProperty(name="Directory", description="Directory of the file.") @@ -1021,7 +1021,7 @@ class IMPORT_OT_autodesk_3ds(bpy.types.Operator): # apply_matrix = BoolProperty(name="Transform Fix", description="Workaround for object transformations importing incorrectly", default=False), def execute(self, context): - load_3ds(self.properties.path, context, 0.0, False, False) + load_3ds(self.properties.filepath, context, 0.0, False, False) return {'FINISHED'} def invoke(self, context, event): diff --git a/release/scripts/io/import_scene_obj.py b/release/scripts/io/import_scene_obj.py index 736c8fa91c1..942619c49ee 100644 --- a/release/scripts/io/import_scene_obj.py +++ b/release/scripts/io/import_scene_obj.py @@ -65,19 +65,6 @@ from geometry import PolyFill # try: import os # except: os= False -# Generic path functions -def stripFile(path): - '''Return directory, where the file is''' - lastSlash= max(path.rfind('\\'), path.rfind('/')) - if lastSlash != -1: - path= path[:lastSlash] - return '%s%s' % (path, os.sep) -# return '%s%s' % (path, sys.sep) - -def stripPath(path): - '''Strips the slashes from the back of a string''' - return path.split('/')[-1].split('\\')[-1] - def stripExt(name): # name is a string '''Strips the prefix off the name before writing''' index= name.rfind('.') @@ -360,7 +347,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ Create all the used materials in this obj, assign colors and images to the materials from all referenced material libs ''' - DIR= stripFile(filepath) + DIR= os.path.dirname(filepath) #==================================================================================# # This function sets textures defined in .mtl file # @@ -431,7 +418,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ # Add an MTL with the same name as the obj if no MTLs are spesified. - temp_mtl= stripExt(stripPath(filepath))+ '.mtl' + temp_mtl = os.path.splitext((os.path.basename(filepath)))[0] + '.mtl' if os.path.exists(DIR + temp_mtl) and temp_mtl not in material_libs: # if sys.exists(DIR + temp_mtl) and temp_mtl not in material_libs: @@ -523,7 +510,7 @@ def split_mesh(verts_loc, faces, unique_materials, filepath, SPLIT_OB_OR_GROUP, (verts_loc, faces, unique_materials, dataname) ''' - filename = stripExt(stripPath(filepath)) + filename = os.path.splitext((os.path.basename(filepath)))[0] if not SPLIT_OB_OR_GROUP and not SPLIT_MATERIALS: # use the filename for the object name since we arnt chopping up the mesh. @@ -1576,7 +1563,7 @@ class IMPORT_OT_obj(bpy.types.Operator): # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for importing the OBJ file", maxlen= 1024, default= "") + filepath = StringProperty(name="File Path", description="Filepath used for importing the OBJ file", maxlen= 1024, default= "") CREATE_SMOOTH_GROUPS = BoolProperty(name="Smooth Groups", description="Surround smooth groups by sharp edges", default= True) CREATE_FGONS = BoolProperty(name="NGons as FGons", description="Import faces with more then 4 verts as fgons", default= True) @@ -1596,7 +1583,7 @@ class IMPORT_OT_obj(bpy.types.Operator): def execute(self, context): # print("Selected: " + context.active_object.name) - load_obj(self.properties.path, + load_obj(self.properties.filepath, context, self.properties.CLAMP_SIZE, self.properties.CREATE_FGONS, diff --git a/release/scripts/io/import_shape_mdd.py b/release/scripts/io/import_shape_mdd.py index 8fef7672912..ec0e7696630 100644 --- a/release/scripts/io/import_shape_mdd.py +++ b/release/scripts/io/import_shape_mdd.py @@ -116,7 +116,7 @@ class importMDD(bpy.types.Operator): # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. - path = StringProperty(name="File Path", description="File path used for importing the MDD file", maxlen=1024) + filepath = StringProperty(name="File Path", description="Filepath used for importing the MDD file", maxlen=1024) #fps = IntProperty(name="Frames Per Second", description="Number of frames/second", min=minfps, max=maxfps, default=25) frame_start = IntProperty(name="Start Frame", description="Start frame for inserting animation", min=minframe, max=maxframe, default=0) @@ -125,10 +125,10 @@ class importMDD(bpy.types.Operator): return (ob and ob.type == 'MESH') def execute(self, context): - if not self.properties.path: + if not self.properties.filepath: raise Exception("filename not set") - mdd_import(self.properties.path, bpy.context.active_object, context.scene, self.properties.frame_start, 1) + mdd_import(self.properties.filepath, bpy.context.active_object, context.scene, self.properties.frame_start, 1) return {'FINISHED'} diff --git a/release/scripts/io/netrender/operators.py b/release/scripts/io/netrender/operators.py index 02cb864cd1a..858ec800dbc 100644 --- a/release/scripts/io/netrender/operators.py +++ b/release/scripts/io/netrender/operators.py @@ -77,7 +77,7 @@ class RENDER_OT_netslave_bake(bpy.types.Operator): bpy.ops.ptcache.bake_all() - #bpy.ops.wm.save_mainfile(path = path + os.sep + root + "_baked.blend") + #bpy.ops.wm.save_mainfile(filepath = path + os.sep + root + "_baked.blend") return {'FINISHED'} diff --git a/release/scripts/io/netrender/utils.py b/release/scripts/io/netrender/utils.py index f194cdc9559..6288b9747c0 100644 --- a/release/scripts/io/netrender/utils.py +++ b/release/scripts/io/netrender/utils.py @@ -215,7 +215,7 @@ def thumbnail(filename): scene = bpy.data.scenes[0] # FIXME, this is dodgy! scene.render.file_format = "JPEG" scene.render.file_quality = 90 - bpy.ops.image.open(path = filename) + bpy.ops.image.open(filepath=filename) img = bpy.data.images[imagename] img.save_render(thumbname, scene=scene) diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 0ba36a7c092..2fd4568b59d 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -614,7 +614,7 @@ class Menu(StructRNA, _GenericUI): def path_menu(self, searchpaths, operator, props_default={}): layout = self.layout - # hard coded to set the operators 'path' to the filename. + # hard coded to set the operators 'filepath' to the filename. import os import bpy.utils @@ -623,12 +623,12 @@ class Menu(StructRNA, _GenericUI): # collect paths files = [] - for path in searchpaths: - files.extend([(f, os.path.join(path, f)) for f in os.listdir(path)]) + for directory in searchpaths: + files.extend([(f, os.path.join(directory, f)) for f in os.listdir(directory)]) files.sort() - for f, path in files: + for f, filepath in files: if f.startswith("."): continue @@ -639,7 +639,7 @@ class Menu(StructRNA, _GenericUI): for attr, value in props_default.items(): setattr(props, attr, value) - props.path = path + props.filepath = filepath if operator == "script.execute_preset": props.menu_idname = self.bl_idname props.preset_name = preset_name diff --git a/release/scripts/modules/graphviz_export.py b/release/scripts/modules/graphviz_export.py index 874b79d8ea2..900d69670d5 100644 --- a/release/scripts/modules/graphviz_export.py +++ b/release/scripts/modules/graphviz_export.py @@ -51,10 +51,10 @@ def compat_str(text, line_length=0): return text -def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True, XTRA_INFO=True): +def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True, XTRA_INFO=True): CONSTRAINTS = DRIVERS = True - fileobject = open(path, "w") + fileobject = open(filepath, "w") fw = fileobject.write fw(header) fw('label = "%s::%s" ;' % (bpy.data.filepath.split("/")[-1].split("\\")[-1], obj.name)) @@ -178,7 +178,7 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True, import sys sys.stdout.flush() ''' - print("\nSaved:", path) + print("\nSaved:", filepath) return True if __name__ == "__main__": diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index 7af57d265b9..3e8662c275f 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -61,7 +61,7 @@ def rna_idprop_ui_prop_clear(item, prop): def draw(layout, context, context_member, use_edit=True): def assign_props(prop, val, key): - prop.path = context_member + prop.data_path = context_member prop.property = key try: @@ -81,7 +81,7 @@ def draw(layout, context, context_member, use_edit=True): if use_edit: row = layout.row() props = row.operator("wm.properties_add", text="Add") - props.path = context_member + props.data_path = context_member del row for key, val in items: @@ -140,7 +140,7 @@ from bpy.props import * rna_path = StringProperty(name="Property Edit", - description="Property path edit", maxlen=1024, default="", options={'HIDDEN'}) + description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'}) rna_value = StringProperty(name="Property Value", description="Property value edit", maxlen=1024, default="") @@ -153,11 +153,11 @@ rna_max = FloatProperty(name="Max", default=1.0, precision=3) class WM_OT_properties_edit(bpy.types.Operator): - '''Internal use (edit a property path)''' + '''Internal use (edit a property data_path)''' bl_idname = "wm.properties_edit" bl_label = "Edit Property" - path = rna_path + data_path = rna_path property = rna_property value = rna_value min = rna_min @@ -165,7 +165,7 @@ class WM_OT_properties_edit(bpy.types.Operator): description = StringProperty(name="Tip", default="") def execute(self, context): - path = self.properties.path + data_path = self.properties.data_path value = self.properties.value prop = self.properties.property prop_old = self._last_prop[0] @@ -176,7 +176,7 @@ class WM_OT_properties_edit(bpy.types.Operator): value_eval = value # First remove - item = eval("context.%s" % path) + item = eval("context.%s" % data_path) rna_idprop_ui_prop_clear(item, prop_old) exec_str = "del item['%s']" % prop_old @@ -207,7 +207,7 @@ class WM_OT_properties_edit(bpy.types.Operator): self._last_prop = [self.properties.property] - item = eval("context.%s" % self.properties.path) + item = eval("context.%s" % self.properties.data_path) # setup defaults prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create @@ -225,14 +225,14 @@ class WM_OT_properties_edit(bpy.types.Operator): class WM_OT_properties_add(bpy.types.Operator): - '''Internal use (edit a property path)''' + '''Internal use (edit a property data_path)''' bl_idname = "wm.properties_add" bl_label = "Add Property" - path = rna_path + data_path = rna_path def execute(self, context): - item = eval("context.%s" % self.properties.path) + item = eval("context.%s" % self.properties.data_path) def unique_name(names): prop = 'prop' @@ -251,14 +251,14 @@ class WM_OT_properties_add(bpy.types.Operator): class WM_OT_properties_remove(bpy.types.Operator): - '''Internal use (edit a property path)''' + '''Internal use (edit a property data_path)''' bl_idname = "wm.properties_remove" bl_label = "Remove Property" - path = rna_path + data_path = rna_path property = rna_property def execute(self, context): - item = eval("context.%s" % self.properties.path) + item = eval("context.%s" % self.properties.data_path) del item[self.properties.property] return {'FINISHED'} diff --git a/release/scripts/op/image.py b/release/scripts/op/image.py index 873500d8343..be583012d7a 100644 --- a/release/scripts/op/image.py +++ b/release/scripts/op/image.py @@ -28,7 +28,7 @@ class EditExternally(bpy.types.Operator): bl_label = "Image Edit Externally" bl_options = {'REGISTER'} - path = StringProperty(name="File Path", description="Path to an image file", maxlen=1024, default="") + filepath = StringProperty(name="File Path", description="Path to an image file", maxlen=1024, default="") def _editor_guess(self, context): import platform @@ -57,12 +57,12 @@ class EditExternally(bpy.types.Operator): def execute(self, context): import subprocess - path = self.properties.path + filepath = self.properties.filepath image_editor = self._editor_guess(context) cmd = [] cmd.extend(image_editor) - cmd.append(bpy.utils.expandpath(path)) + cmd.append(bpy.utils.expandpath(filepath)) subprocess.Popen(cmd) @@ -70,12 +70,12 @@ class EditExternally(bpy.types.Operator): def invoke(self, context, event): try: - path = context.space_data.image.filepath + filepath = context.space_data.image.filepath except: self.report({'ERROR'}, "Image not found on disk") return {'CANCELLED'} - self.properties.path = path + self.properties.filepath = filepath self.execute(context) return {'FINISHED'} @@ -91,13 +91,13 @@ class SaveDirty(bpy.types.Operator): unique_paths = set() for image in bpy.data.images: if image.dirty: - path = bpy.utils.expandpath(image.filepath) - if "\\" not in path and "/" not in path: - self.report({'WARNING'}, "Invalid path: " + path) - elif path in unique_paths: - self.report({'WARNING'}, "Path used by more then one image: " + path) + filepath = bpy.utils.expandpath(image.filepath) + if "\\" not in filepath and "/" not in filepath: + self.report({'WARNING'}, "Invalid path: " + filepath) + elif filepath in unique_paths: + self.report({'WARNING'}, "Path used by more then one image: " + filepath) else: - unique_paths.add(path) + unique_paths.add(filepath) image.save() return {'FINISHED'} @@ -161,7 +161,7 @@ class ProjectEdit(bpy.types.Operator): image_new.file_format = 'PNG' image_new.save() - bpy.ops.image.external_edit(path=filepath_final) + bpy.ops.image.external_edit(filepath=filepath_final) return {'FINISHED'} diff --git a/release/scripts/op/presets.py b/release/scripts/op/presets.py index 03d70afc43b..a813cb5339d 100644 --- a/release/scripts/op/presets.py +++ b/release/scripts/op/presets.py @@ -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'} diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py index cd0b7086a70..b9bc54bf264 100644 --- a/release/scripts/op/uv.py +++ b/release/scripts/op/uv.py @@ -29,7 +29,7 @@ class ExportUVLayout(bpy.types.Operator): bl_label = "Export UV Layout" bl_options = {'REGISTER', 'UNDO'} - path = StringProperty(name="File Path", description="File path used for exporting the SVG file", maxlen=1024, default="") + filepath = StringProperty(name="File Path", description="File path used for exporting the SVG file", maxlen=1024, default="") check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) export_all = BoolProperty(name="All UV's", description="Export all UVs in this mesh (not just the visible ones)", default=False) mode = EnumProperty(items=( @@ -113,7 +113,7 @@ class ExportUVLayout(bpy.types.Operator): mode = self.properties.mode - file = open(self.properties.path, "w") + file = open(self.properties.filepath, "w") fw = file.write if mode == 'SVG': @@ -211,7 +211,7 @@ class ExportUVLayout(bpy.types.Operator): def menu_func(self, context): default_path = bpy.data.filepath.replace(".blend", ".svg") - self.layout.operator(ExportUVLayout.bl_idname).path = default_path + self.layout.operator(ExportUVLayout.bl_idname).filepath = default_path def register(): diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py index 4a587f41aa7..5ef79887228 100644 --- a/release/scripts/op/wm.py +++ b/release/scripts/op/wm.py @@ -46,10 +46,10 @@ rna_relative_prop = BoolProperty(name="Relative", default=False) -def context_path_validate(context, path): +def context_path_validate(context, data_path): import sys try: - value = eval("context.%s" % path) + value = eval("context.%s" % data_path) except AttributeError: if "'NoneType'" in str(sys.exc_info()[1]): # One of the items in the rna path is None, just ignore this @@ -62,13 +62,13 @@ def context_path_validate(context, path): def execute_context_assign(self, context): - if context_path_validate(context, self.properties.path) is Ellipsis: + if context_path_validate(context, self.properties.data_path) is Ellipsis: return {'PASS_THROUGH'} if getattr(self.properties, "relative", False): - exec("context.%s+=self.properties.value" % self.properties.path) + exec("context.%s+=self.properties.value" % self.properties.data_path) else: - exec("context.%s=self.properties.value" % self.properties.path) + exec("context.%s=self.properties.value" % self.properties.data_path) return {'FINISHED'} @@ -79,7 +79,7 @@ class WM_OT_context_set_boolean(bpy.types.Operator): bl_label = "Context Set Boolean" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value = BoolProperty(name="Value", description="Assignment value", default=True) @@ -92,7 +92,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum bl_label = "Context Set" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value = IntProperty(name="Value", description="Assign value", default=0) relative = rna_relative_prop @@ -105,18 +105,18 @@ class WM_OT_context_scale_int(bpy.types.Operator): # same as enum bl_label = "Context Set" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value = FloatProperty(name="Value", description="Assign value", default=1.0) always_step = BoolProperty(name="Always Step", description="Always adjust the value by a minimum of 1 when 'value' is not 1.0.", default=True) def execute(self, context): - if context_path_validate(context, self.properties.path) is Ellipsis: + if context_path_validate(context, self.properties.data_path) is Ellipsis: return {'PASS_THROUGH'} value = self.properties.value - path = self.properties.path + data_path = self.properties.data_path if value == 1.0: # nothing to do return {'CANCELLED'} @@ -128,9 +128,9 @@ class WM_OT_context_scale_int(bpy.types.Operator): # same as enum else: add = "-1" func = "min" - exec("context.%s = %s(round(context.%s * value), context.%s + %s)" % (path, func, path, path, add)) + exec("context.%s = %s(round(context.%s * value), context.%s + %s)" % (data_path, func, data_path, data_path, add)) else: - exec("context.%s *= value" % self.properties.path) + exec("context.%s *= value" % self.properties.data_path) return {'FINISHED'} @@ -141,7 +141,7 @@ class WM_OT_context_set_float(bpy.types.Operator): # same as enum bl_label = "Context Set Float" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value = FloatProperty(name="Value", description="Assignment value", default=0.0) relative = rna_relative_prop @@ -155,7 +155,7 @@ class WM_OT_context_set_string(bpy.types.Operator): # same as enum bl_label = "Context Set String" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value = StringProperty(name="Value", description="Assign value", maxlen=1024, default="") @@ -168,7 +168,7 @@ class WM_OT_context_set_enum(bpy.types.Operator): bl_label = "Context Set Enum" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value = StringProperty(name="Value", description="Assignment value (as a string)", maxlen=1024, default="") @@ -182,15 +182,15 @@ class WM_OT_context_set_value(bpy.types.Operator): bl_label = "Context Set Value" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value = StringProperty(name="Value", description="Assignment value (as a string)", maxlen=1024, default="") def execute(self, context): - if context_path_validate(context, self.properties.path) is Ellipsis: + if context_path_validate(context, self.properties.data_path) is Ellipsis: return {'PASS_THROUGH'} - exec("context.%s=%s" % (self.properties.path, self.properties.value)) + exec("context.%s=%s" % (self.properties.data_path, self.properties.value)) return {'FINISHED'} @@ -200,15 +200,15 @@ class WM_OT_context_toggle(bpy.types.Operator): bl_label = "Context Toggle" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop def execute(self, context): - if context_path_validate(context, self.properties.path) is Ellipsis: + if context_path_validate(context, self.properties.data_path) is Ellipsis: return {'PASS_THROUGH'} exec("context.%s=not (context.%s)" % - (self.properties.path, self.properties.path)) + (self.properties.data_path, self.properties.data_path)) return {'FINISHED'} @@ -219,7 +219,7 @@ class WM_OT_context_toggle_enum(bpy.types.Operator): bl_label = "Context Toggle Values" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop value_1 = StringProperty(name="Value", \ description="Toggle enum", maxlen=1024, default="") @@ -228,12 +228,12 @@ class WM_OT_context_toggle_enum(bpy.types.Operator): def execute(self, context): - if context_path_validate(context, self.properties.path) is Ellipsis: + if context_path_validate(context, self.properties.data_path) is Ellipsis: return {'PASS_THROUGH'} exec("context.%s = ['%s', '%s'][context.%s!='%s']" % \ - (self.properties.path, self.properties.value_1,\ - self.properties.value_2, self.properties.path, + (self.properties.data_path, self.properties.value_1,\ + self.properties.value_2, self.properties.data_path, self.properties.value_2)) return {'FINISHED'} @@ -246,12 +246,12 @@ class WM_OT_context_cycle_int(bpy.types.Operator): bl_label = "Context Int Cycle" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop reverse = rna_reverse_prop def execute(self, context): - path = self.properties.path - value = context_path_validate(context, path) + data_path = self.properties.data_path + value = context_path_validate(context, data_path) if value is Ellipsis: return {'PASS_THROUGH'} @@ -260,16 +260,16 @@ class WM_OT_context_cycle_int(bpy.types.Operator): else: value += 1 - exec("context.%s=value" % path) + exec("context.%s=value" % data_path) - if value != eval("context.%s" % path): + if value != eval("context.%s" % data_path): # relies on rna clamping int's out of the range if self.properties.reverse: value = (1 << 32) else: value = - (1 << 32) - exec("context.%s=value" % path) + exec("context.%s=value" % data_path) return {'FINISHED'} @@ -280,19 +280,19 @@ class WM_OT_context_cycle_enum(bpy.types.Operator): bl_label = "Context Enum Cycle" bl_options = {'UNDO'} - path = rna_path_prop + data_path = rna_path_prop reverse = rna_reverse_prop def execute(self, context): - value = context_path_validate(context, self.properties.path) + value = context_path_validate(context, self.properties.data_path) if value is Ellipsis: return {'PASS_THROUGH'} orig_value = value # Have to get rna enum values - rna_struct_str, rna_prop_str = self.properties.path.rsplit('.', 1) + rna_struct_str, rna_prop_str = self.properties.data_path.rsplit('.', 1) i = rna_prop_str.find('[') # just incse we get "context.foo.bar[0]" @@ -322,7 +322,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator): advance_enum = enums[orig_index + 1] # set the new value - exec("context.%s=advance_enum" % self.properties.path) + exec("context.%s=advance_enum" % self.properties.data_path) return {'FINISHED'} doc_id = StringProperty(name="Doc ID", @@ -337,27 +337,27 @@ class WM_OT_context_modal_mouse(bpy.types.Operator): bl_idname = "wm.context_modal_mouse" bl_label = "Context Modal Mouse" - path_iter = StringProperty(description="The path relative to the context, must point to an iterable.") - path_item = StringProperty(description="The path from each iterable to the value (int or float)") + data_path_iter = StringProperty(description="The data path relative to the context, must point to an iterable.") + data_path_item = StringProperty(description="The data path from each iterable to the value (int or float)") input_scale = FloatProperty(default=0.01, description="Scale the mouse movement by this value before applying the delta") invert = BoolProperty(default=False, description="Invert the mouse input") initial_x = IntProperty(options={'HIDDEN'}) def _values_store(self, context): - path_iter = self.properties.path_iter - path_item = self.properties.path_item + data_path_iter = self.properties.data_path_iter + data_path_item = self.properties.data_path_item self._values = values = {} - for item in getattr(context, path_iter): + for item in getattr(context, data_path_iter): try: - value_orig = eval("item." + path_item) + value_orig = eval("item." + data_path_item) except: continue # check this can be set, maybe this is library data. try: - exec("item.%s = %s" % (path_item, value_orig)) + exec("item.%s = %s" % (data_path_item, value_orig)) except: continue @@ -368,17 +368,17 @@ class WM_OT_context_modal_mouse(bpy.types.Operator): if self.properties.invert: delta = - delta - path_item = self.properties.path_item + data_path_item = self.properties.data_path_item for item, value_orig in self._values.items(): if type(value_orig) == int: - exec("item.%s = int(%d)" % (path_item, round(value_orig + delta))) + exec("item.%s = int(%d)" % (data_path_item, round(value_orig + delta))) else: - exec("item.%s = %f" % (path_item, value_orig + delta)) + exec("item.%s = %f" % (data_path_item, value_orig + delta)) def _values_restore(self): - path_item = self.properties.path_item + data_path_item = self.properties.data_path_item for item, value_orig in self._values.items(): - exec("item.%s = %s" % (path_item, value_orig)) + exec("item.%s = %s" % (data_path_item, value_orig)) self._values.clear() @@ -407,7 +407,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator): if not self._values: self.report({'WARNING'}, "Nothing to operate on: %s[ ].%s" % - (self.properties.path_iter, self.properties.path_item)) + (self.properties.data_path_iter, self.properties.data_path_item)) return {'CANCELLED'} else: 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") diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py index 0eba1fb045b..43021858f9f 100644 --- a/release/scripts/ui/properties_data_armature_rigify.py +++ b/release/scripts/ui/properties_data_armature_rigify.py @@ -232,14 +232,14 @@ class AsScript(bpy.types.Operator): bl_label = "Write Metarig to Script" bl_options = {'REGISTER', 'UNDO'} - path = StringProperty(name="File Path", description="File path used for exporting the Armature file", maxlen=1024, default="") + filepath = StringProperty(name="File Path", description="File path used for exporting the Armature file", maxlen=1024, default="") def execute(self, context): import rigify_utils reload(rigify_utils) obj = context.object code = rigify_utils.write_meta_rig(obj) - path = self.properties.path + path = self.properties.filepath file = open(path, "w") file.write(code) file.close() @@ -249,7 +249,7 @@ class AsScript(bpy.types.Operator): def invoke(self, context, event): import os obj = context.object - self.properties.path = os.path.splitext(bpy.data.filepath)[0] + "-" + bpy.utils.clean_name(obj.name) + ".py" + self.properties.filepath = os.path.splitext(bpy.data.filepath)[0] + "-" + bpy.utils.clean_name(obj.name) + ".py" wm = context.manager wm.add_fileselect(self) return {'RUNNING_MODAL'} diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index c93b4289116..37764e20854 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -480,10 +480,10 @@ class DATA_PT_modifiers(DataButtonsPanel): layout.separator() - layout.prop(md, "path", text="Create Along Paths") + layout.prop(md, "use_path", text="Create Along Paths") split = layout.split() - split.active = md.path + split.active = md.use_path col = split.column() col.row().prop(md, "axis", expand=True) col.prop(md, "keep_shape") diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index f1b3e63f7ab..a2637f7924b 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -182,7 +182,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel): col.prop(group, "dupli_offset", text="") prop = col.operator("wm.context_set_value", text="From Cursor") - prop.path = "object.users_group[%d].dupli_offset" % index + prop.data_path = "object.users_group[%d].dupli_offset" % index prop.value = value index += 1 diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index 5e83fad38a0..4319711d05e 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -105,7 +105,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel): subcol = col.column() subcol.operator_context = 'INVOKE_DEFAULT' op = subcol.operator("anim.keying_set_export", text="Export to File") - op.path = "keyingset.py" + op.filepath = "keyingset.py" if wide_ui: col = row.column() @@ -229,7 +229,7 @@ class ANIM_OT_keying_set_export(bpy.types.Operator): bl_idname = "anim.keying_set_export" bl_label = "Export Keying Set..." - path = bpy.props.StringProperty(name="File Path", description="File path to write file to.") + filepath = bpy.props.StringProperty(name="File Path", description="Filepath to write file to.") filename = bpy.props.StringProperty(name="File Name", description="Name of the file.") directory = bpy.props.StringProperty(name="Directory", description="Directory of the file.") filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) @@ -237,10 +237,10 @@ class ANIM_OT_keying_set_export(bpy.types.Operator): filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'}) def execute(self, context): - if not self.properties.path: - raise Exception("File path not set.") + if not self.properties.filepath: + raise Exception("Filepath not set.") - f = open(self.properties.path, "w") + f = open(self.properties.filepath, "w") if not f: raise Exception("Could not open file.") @@ -301,7 +301,7 @@ class ANIM_OT_keying_set_export(bpy.types.Operator): for ksp in ks.paths: f.write("ksp = ks.paths.add(") - # id-block + RNA-path + # id-block + data_path if ksp.id: # find the relevant shorthand from the cache id_bpy_path = id_to_paths_cache[ksp.id][0] diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index 702dc97f3fc..5ed6043cbe7 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -133,13 +133,13 @@ class INFO_MT_file_open_recent(bpy.types.Menu): layout = self.layout layout.operator_context = 'EXEC_AREA' - path = os.path.join(bpy.app.home, ".Blog") + filepath = os.path.join(bpy.app.home, ".Blog") - if os.path.isfile(path): - file = open(path, "rU") + if os.path.isfile(filepath): + file = open(filepath, "rU") for line in file: line = line.rstrip() - layout.operator("wm.open_mainfile", text=line, icon='FILE_BLEND').path = line + layout.operator("wm.open_mainfile", text=line, icon='FILE_BLEND').filepath = line file.close() else: layout.label(text='No recent files') diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index a55d60eb55c..066c0f2f60a 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -83,12 +83,12 @@ class USERPREF_HT_header(bpy.types.Header): if userpref.active_section == 'INPUT': op = layout.operator("wm.keyconfig_export") - op.path = "keymap.py" + op.filepath = "keymap.py" op = layout.operator("wm.keyconfig_import") - op.path = "keymap.py" + op.filepath = "keymap.py" elif userpref.active_section == 'ADDONS': op = layout.operator("wm.addon_install") - op.path = "*.py" + op.filepath = "*.py" elif userpref.active_section == 'THEMES': op = layout.operator("ui.reset_default_theme") @@ -1343,7 +1343,7 @@ class WM_OT_addon_install(bpy.types.Operator): module = StringProperty(name="Module", description="Module name of the addon to disable") - path = StringProperty(name="File Path", description="File path to write file to") + filepath = StringProperty(name="File Path", description="File path to write file to") filename = StringProperty(name="File Name", description="Name of the file") directory = StringProperty(name="Directory", description="Directory of the file") filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) @@ -1352,7 +1352,7 @@ class WM_OT_addon_install(bpy.types.Operator): def execute(self, context): import traceback import zipfile - pyfile = self.properties.path + pyfile = self.properties.filepath path_addons = bpy.utils.script_paths("addons")[-1] diff --git a/release/scripts/ui/space_userpref_keymap.py b/release/scripts/ui/space_userpref_keymap.py index 961b138ab7e..37007c65f7a 100644 --- a/release/scripts/ui/space_userpref_keymap.py +++ b/release/scripts/ui/space_userpref_keymap.py @@ -508,7 +508,7 @@ class WM_OT_keyconfig_import(bpy.types.Operator): bl_idname = "wm.keyconfig_import" bl_label = "Import Key Configuration..." - path = StringProperty(name="File Path", description="File path to write file to") + filepath = StringProperty(name="File Path", description="Filepath to write file to") filename = StringProperty(name="File Name", description="Name of the file") directory = StringProperty(name="Directory", description="Directory of the file") filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) @@ -518,10 +518,10 @@ class WM_OT_keyconfig_import(bpy.types.Operator): keep_original = BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True) def execute(self, context): - if not self.properties.path: - raise Exception("File path not set") + if not self.properties.filepath: + raise Exception("Filepath not set") - f = open(self.properties.path, "r") + f = open(self.properties.filepath, "r") if not f: raise Exception("Could not open file") @@ -545,9 +545,9 @@ class WM_OT_keyconfig_import(bpy.types.Operator): path = os.path.join(path, config_name + ".py") if self.properties.keep_original: - shutil.copy(self.properties.path, path) + shutil.copy(self.properties.filepath, path) else: - shutil.move(self.properties.path, path) + shutil.move(self.properties.filepath, path) exec("import " + config_name) @@ -569,7 +569,7 @@ class WM_OT_keyconfig_export(bpy.types.Operator): bl_idname = "wm.keyconfig_export" bl_label = "Export Key Configuration..." - path = StringProperty(name="File Path", description="File path to write file to") + filepath = StringProperty(name="File Path", description="Filepath to write file to") filename = StringProperty(name="File Name", description="Name of the file") directory = StringProperty(name="Directory", description="Directory of the file") filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) @@ -578,10 +578,10 @@ class WM_OT_keyconfig_export(bpy.types.Operator): kc_name = StringProperty(name="KeyConfig Name", description="Name to save the key config as") def execute(self, context): - if not self.properties.path: - raise Exception("File path not set") + if not self.properties.filepath: + raise Exception("Filepath not set") - f = open(self.properties.path, "w") + f = open(self.properties.filepath, "w") if not f: raise Exception("Could not open file") @@ -591,7 +591,7 @@ class WM_OT_keyconfig_export(bpy.types.Operator): if self.properties.kc_name != '': name = self.properties.kc_name elif kc.name == 'Blender': - name = os.path.splitext(os.path.basename(self.properties.path))[0] + name = os.path.splitext(os.path.basename(self.properties.filepath))[0] else: name = kc.name diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 8404ee83f16..14312d3c1ad 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -721,23 +721,23 @@ class VIEW3D_MT_object_specials(bpy.types.Menu): layout.operator_context = 'INVOKE_REGION_WIN' props = layout.operator("wm.context_modal_mouse", text="Spot Size") - props.path_iter = "selected_editable_objects" - props.path_item = "data.spot_size" + props.data_path_iter = "selected_editable_objects" + props.data_path_item = "data.spot_size" props.input_scale = 0.01 props = layout.operator("wm.context_modal_mouse", text="Distance") - props.path_iter = "selected_editable_objects" - props.path_item = "data.distance" + props.data_path_iter = "selected_editable_objects" + props.data_path_item = "data.distance" props.input_scale = 0.1 props = layout.operator("wm.context_modal_mouse", text="Clip Start") - props.path_iter = "selected_editable_objects" - props.path_item = "data.shadow_buffer_clip_start" + props.data_path_iter = "selected_editable_objects" + props.data_path_item = "data.shadow_buffer_clip_start" props.input_scale = 0.05 props = layout.operator("wm.context_modal_mouse", text="Clip End") - props.path_iter = "selected_editable_objects" - props.path_item = "data.shadow_buffer_clip_end" + props.data_path_iter = "selected_editable_objects" + props.data_path_item = "data.shadow_buffer_clip_end" props.input_scale = 0.05 layout.separator() @@ -1277,15 +1277,15 @@ class VIEW3D_MT_edit_mesh_selection_mode(bpy.types.Menu): prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL') prop.value = "(True, False, False)" - prop.path = "tool_settings.mesh_selection_mode" + prop.data_path = "tool_settings.mesh_selection_mode" prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL') prop.value = "(False, True, False)" - prop.path = "tool_settings.mesh_selection_mode" + prop.data_path = "tool_settings.mesh_selection_mode" prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL') prop.value = "(False, False, True)" - prop.path = "tool_settings.mesh_selection_mode" + prop.data_path = "tool_settings.mesh_selection_mode" class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu): diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py index 11a7fae894b..6984bbeea41 100644 --- a/release/scripts/ui/space_view3d_toolbar.py +++ b/release/scripts/ui/space_view3d_toolbar.py @@ -948,7 +948,7 @@ class VIEW3D_MT_tools_projectpaint_clone(bpy.types.Menu): layout = self.layout for i, tex in enumerate(context.active_object.data.uv_textures): prop = layout.operator("wm.context_set_int", text=tex.name) - prop.path = "active_object.data.uv_texture_clone_index" + prop.data_path = "active_object.data.uv_texture_clone_index" prop.value = i @@ -959,7 +959,7 @@ class VIEW3D_MT_tools_projectpaint_stencil(bpy.types.Menu): layout = self.layout for i, tex in enumerate(context.active_object.data.uv_textures): prop = layout.operator("wm.context_set_int", text=tex.name) - prop.path = "active_object.data.uv_texture_stencil_index" + prop.data_path = "active_object.data.uv_texture_stencil_index" prop.value = i diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 20afc715c77..6044cfa7692 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -475,7 +475,7 @@ void calc_curvepath(Object *ob) bl= cu->bev.first; if(bl==NULL || !bl->nr) return; - cu->path=path= MEM_callocN(sizeof(Path), "path"); + cu->path=path= MEM_callocN(sizeof(Path), "calc_curvepath"); /* if POLY: last vertice != first vertice */ cycl= (bl->poly!= -1); diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 767c2c82594..46970a401a8 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -384,7 +384,7 @@ static int paste_file_exec(bContext *C, wmOperator *op) char *path; int retval; - path= RNA_string_get_alloc(op->ptr, "path", NULL, 0); + path= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0); retval= paste_file(C, op->reports, path); MEM_freeN(path); @@ -393,7 +393,7 @@ static int paste_file_exec(bContext *C, wmOperator *op) static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return paste_file_exec(C, op); WM_event_add_fileselect(C, op); @@ -1564,7 +1564,7 @@ static int open_exec(bContext *C, wmOperator *op) PointerRNA idptr; char str[FILE_MAX]; - RNA_string_get(op->ptr, "path", str); + RNA_string_get(op->ptr, "filepath", str); font = load_vfont(str); @@ -1613,12 +1613,12 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) } path = (font && font->name)? font->name: U.fontdir; - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return open_exec(C, op); open_init(C, op); - RNA_string_set(op->ptr, "path", path); + RNA_string_set(op->ptr, "filepath", path); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 5b034a5ac54..53da24fa455 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -326,10 +326,10 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* check input variables */ - if(RNA_property_is_set(op->ptr, "path")) { + if(RNA_property_is_set(op->ptr, "filepath")) { char path[FILE_MAX]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); ima= BKE_add_image_file(path, scene ? scene->r.cfra : 1); } @@ -385,7 +385,7 @@ void MESH_OT_drop_named_image(wmOperatorType *ot) /* properties */ RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign."); - RNA_def_string(ot->srna, "path", "Path", FILE_MAX, "Filepath", "Path to image file"); + RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file"); } static int uv_texture_remove_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index c5c7d49d0a4..56742413358 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1022,7 +1022,7 @@ static int multires_external_save_exec(bContext *C, wmOperator *op) if(CustomData_external_test(&me->fdata, CD_MDISPS)) return OPERATOR_CANCELLED; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); if(relative) BLI_path_rel(path, G.sce); @@ -1054,13 +1054,13 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *e if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return multires_external_save_exec(C, op); op->customdata= me; BLI_snprintf(path, sizeof(path), "//%s.btx", me->id.name+2); - RNA_string_set(op->ptr, "path", path); + RNA_string_set(op->ptr, "filepath", path); WM_event_add_fileselect(C, op); diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 6aeaf00ef47..ba706a0d4b9 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -387,17 +387,17 @@ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keym if(do_pet > 0) { /* context ops */ kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_enum", OKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing_falloff"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.proportional_editing_falloff"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.proportional_editing"); RNA_string_set(kmi->ptr, "value_1", "DISABLED"); RNA_string_set(kmi->ptr, "value_2", "ENABLED"); /* for modes/object types that allow 'conencted' mode, add the Alt O key */ if (do_pet > 1) { kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, KM_ALT, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.proportional_editing"); RNA_string_set(kmi->ptr, "value_1", "DISABLED"); RNA_string_set(kmi->ptr, "value_2", "CONNECTED"); } diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 2a12b16be7c..006d98ce8b7 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -847,7 +847,7 @@ static int envmap_save_exec(bContext *C, wmOperator *op) int imtype = scene->r.imtype; char path[FILE_MAX]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); if(scene->r.scemode & R_EXTENSION) { BKE_add_image_extension(path, imtype); @@ -871,12 +871,12 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return envmap_save_exec(C, op); //RNA_enum_set(op->ptr, "file_type", scene->r.imtype); - RNA_string_set(op->ptr, "path", G.sce); + RNA_string_set(op->ptr, "filepath", G.sce); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 141a7c1c050..5f592aeba52 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -75,7 +75,7 @@ static int screenshot_exec(bContext *C, wmOperator *op) ImBuf *ibuf; char path[FILE_MAX]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); strcpy(G.ima, path); BLI_path_abs(path, G.sce); @@ -147,10 +147,10 @@ static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *event) scd->dumprect= dumprect; op->customdata= scd; - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return screenshot_exec(C, op); - RNA_string_set(op->ptr, "path", G.ima); + RNA_string_set(op->ptr, "filepath", G.ima); WM_event_add_fileselect(C, op); @@ -341,7 +341,7 @@ void SCREEN_OT_screencast(wmOperatorType *ot) ot->flag= 0; - RNA_def_property(ot->srna, "path", PROP_STRING, PROP_FILEPATH); + RNA_def_property(ot->srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index abd56babd8d..5470ac83370 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -146,34 +146,34 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *path) wmKeyMapItem *kmi; kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", ONEKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 0); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", TWOKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 1); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", THREEKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 2); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", FOURKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 3); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", FIVEKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 4); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", SIXKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 5); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", SEVENKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 6); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", EIGHTKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 7); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", NINEKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 8); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", ZEROKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_int_set(kmi->ptr, "value", 9); } @@ -182,11 +182,11 @@ static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *path) wmKeyMapItem *kmi; kmi= WM_keymap_add_item(keymap, "WM_OT_context_scale_int", LEFTBRACKETKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_float_set(kmi->ptr, "value", 0.9); kmi= WM_keymap_add_item(keymap, "WM_OT_context_scale_int", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", path); + RNA_string_set(kmi->ptr, "data_path", path); RNA_float_set(kmi->ptr, "value", 10.0/9.0); // 1.1111.... } @@ -223,40 +223,40 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ed_keymap_paint_brush_size(keymap, "tool_settings.sculpt.brush.size"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", AKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_anchor"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.use_anchor"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_smooth_stroke"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.use_smooth_stroke"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", RKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_rake"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.use_rake"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", AKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_airbrush"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.use_airbrush"); /* brush switching */ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", DKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.active_brush_name"); RNA_string_set(kmi->ptr, "value", "Draw"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", SKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.active_brush_name"); RNA_string_set(kmi->ptr, "value", "Smooth"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.active_brush_name"); RNA_string_set(kmi->ptr, "value", "Pinch"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", GKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.active_brush_name"); RNA_string_set(kmi->ptr, "value", "Grab"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", LKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.active_brush_name"); RNA_string_set(kmi->ptr, "value", "Layer"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", TKEY, KM_PRESS, KM_SHIFT, 0); // was just T in 2.4x - RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.active_brush_name"); RNA_string_set(kmi->ptr, "value", "Flatten"); @@ -276,7 +276,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ed_keymap_paint_brush_size(keymap, "tool_settings.vertex_paint.brush.size"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0); /* mask toggle */ - RNA_string_set(kmi->ptr, "path", "vertex_paint_object.data.use_paint_mask"); + RNA_string_set(kmi->ptr, "data_path", "vertex_paint_object.data.use_paint_mask"); /* Weight Paint mode */ keymap= WM_keymap_find(keyconf, "Weight Paint", 0, 0); @@ -294,7 +294,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ed_keymap_paint_brush_size(keymap, "tool_settings.weight_paint.brush.size"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0); /* mask toggle */ - RNA_string_set(kmi->ptr, "path", "weight_paint_object.data.use_paint_mask"); + RNA_string_set(kmi->ptr, "data_path", "weight_paint_object.data.use_paint_mask"); WM_keymap_verify_item(keymap, "PAINT_OT_weight_from_bones", WKEY, KM_PRESS, 0, 0); @@ -314,7 +314,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ed_keymap_paint_brush_size(keymap, "tool_settings.image_paint.brush.size"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0); /* mask toggle */ - RNA_string_set(kmi->ptr, "path", "texture_paint_object.data.use_paint_mask"); + RNA_string_set(kmi->ptr, "data_path", "texture_paint_object.data.use_paint_mask"); /* face-mask mode */ keymap= WM_keymap_find(keyconf, "Face Mask", 0, 0); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index b4109692a4c..f362c584585 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -80,7 +80,7 @@ static int open_exec(bContext *C, wmOperator *op) PointerRNA idptr; AUD_SoundInfo info; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); sound = sound_new_file(CTX_data_main(C), path); if(!op->customdata) @@ -127,7 +127,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return open_exec(C, op); open_init(C, op); diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index ef7b3ce6d2a..36aecd02138 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -88,10 +88,10 @@ static int file_browse_exec(bContext *C, wmOperator *op) FileBrowseOp *fbo= op->customdata; char *str; - if (RNA_property_is_set(op->ptr, "path")==0 || fbo==NULL) + if (RNA_property_is_set(op->ptr, "filepath")==0 || fbo==NULL) return OPERATOR_CANCELLED; - str= RNA_string_get_alloc(op->ptr, "path", 0, 0); + str= RNA_string_get_alloc(op->ptr, "filepath", 0, 0); RNA_property_string_set(&fbo->ptr, fbo->prop, str); RNA_property_update(C, &fbo->ptr, fbo->prop); MEM_freeN(str); @@ -126,7 +126,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) op->customdata= fbo; str= RNA_property_string_get_alloc(&ptr, prop, 0, 0); - RNA_string_set(op->ptr, "path", str); + RNA_string_set(op->ptr, "filepath", str); MEM_freeN(str); WM_event_add_fileselect(C, op); diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 035af229603..c04f8183bee 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -289,19 +289,19 @@ void console_keymap(struct wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 0); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 1); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 0); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 1); RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_CHAR); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index ccecbd61663..9028e5f15c6 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -576,7 +576,7 @@ int file_exec(bContext *C, wmOperator *exec_op) if(RNA_boolean_get(op->ptr, "relative_path")) BLI_path_rel(name, G.sce); - RNA_string_set(op->ptr, "path", name); + RNA_string_set(op->ptr, "filepath", name); /* some ops have multiple files to select */ { diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 637e56459d7..4a505bc022f 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -182,7 +182,7 @@ static void file_panel_operator(const bContext *C, Panel *pa) if(flag & PROP_HIDDEN) continue; - if(strcmp(RNA_property_identifier(prop), "path") == 0) + if(strcmp(RNA_property_identifier(prop), "filepath") == 0) continue; if(strcmp(RNA_property_identifier(prop), "directory") == 0) continue; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index f971e18043c..abb3a6a7a35 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -127,8 +127,8 @@ short ED_fileselect_set_params(SpaceFile *sfile) else params->type = FILE_SPECIAL; - if (RNA_property_is_set(op->ptr, "path")) { - RNA_string_get(op->ptr, "path", name); + if (RNA_property_is_set(op->ptr, "filepath")) { + RNA_string_get(op->ptr, "filepath", name); if (params->type == FILE_LOADLIB) { BLI_strncpy(params->dir, name, sizeof(params->dir)); BLI_cleanup_dir(G.sce, params->dir); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index c59b4783708..eb4be32658d 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1037,7 +1037,7 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op) if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); scene= ac.scene; /* current scene */ diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 3eeeb865ae4..a087351806a 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -654,7 +654,7 @@ static const EnumPropertyItem image_file_type_items[] = { static void image_filesel(bContext *C, wmOperator *op, const char *path) { - RNA_string_set(op->ptr, "path", path); + RNA_string_set(op->ptr, "filepath", path); WM_event_add_fileselect(C, op); } @@ -685,7 +685,7 @@ static int open_exec(bContext *C, wmOperator *op) Image *ima= NULL; char str[FILE_MAX]; - RNA_string_get(op->ptr, "path", str); + RNA_string_get(op->ptr, "filepath", str); /* default to frame 1 if there's no scene in context */ ima= BKE_add_image_file(str, scene ? scene->r.cfra : 1); @@ -729,7 +729,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return open_exec(C, op); open_init(C, op); @@ -767,7 +767,7 @@ static int replace_exec(bContext *C, wmOperator *op) if(!sima->image) return OPERATOR_CANCELLED; - RNA_string_get(op->ptr, "path", str); + RNA_string_get(op->ptr, "filepath", str); BLI_strncpy(sima->image->name, str, sizeof(sima->image->name)-1); /* we cant do much if the str is longer then 240 :/ */ BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_RELOAD); @@ -784,7 +784,7 @@ static int replace_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!sima->image) return OPERATOR_CANCELLED; - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return replace_exec(C, op); image_filesel(C, op, path); @@ -918,7 +918,7 @@ static int save_as_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; sima->imtypenr= RNA_enum_get(op->ptr, "file_type"); - RNA_string_get(op->ptr, "path", str); + RNA_string_get(op->ptr, "filepath", str); save_image_doit(C, sima, scene, op, str); @@ -936,7 +936,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return save_as_exec(C, op); if(!ima) diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 7e3cfcdb6bc..3eae1438517 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -540,7 +540,7 @@ static int image_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) static void image_drop_copy(wmDrag *drag, wmDropBox *drop) { /* copy drag path to properties */ - RNA_string_set(drop->ptr, "path", drag->path); + RNA_string_set(drop->ptr, "filepath", drag->path); } /* area+region dropbox definition */ diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 86d7d6bf014..2a1a20aa0d7 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -271,7 +271,7 @@ static int find_missing_files_exec(bContext *C, wmOperator *op) { char *path; - path= RNA_string_get_alloc(op->ptr, "path", NULL, 0); + path= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0); findMissingFiles(path, G.sce); MEM_freeN(path); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 97e2eba7b64..dd838a67afa 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -2244,10 +2244,10 @@ static int node_add_file_exec(bContext *C, wmOperator *op) int ntype=0; /* check input variables */ - if (RNA_property_is_set(op->ptr, "path")) + if (RNA_property_is_set(op->ptr, "filepath")) { char path[FILE_MAX]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); ima= BKE_add_image_file(path, scene ? scene->r.cfra : 1); } else if(RNA_property_is_set(op->ptr, "name")) @@ -2291,7 +2291,7 @@ static int node_add_file_invoke(bContext *C, wmOperator *op, wmEvent *event) UI_view2d_region_to_view(&ar->v2d, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin, &snode->mx, &snode->my); - if (RNA_property_is_set(op->ptr, "path") || RNA_property_is_set(op->ptr, "name")) + if (RNA_property_is_set(op->ptr, "filepath") || RNA_property_is_set(op->ptr, "name")) return node_add_file_exec(C, op); else return WM_operator_filesel(C, op, event); diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index 6388e68a1f5..5b681958a3a 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -313,7 +313,7 @@ static void node_id_path_drop_copy(wmDrag *drag, wmDropBox *drop) RNA_string_set(drop->ptr, "name", id->name+2); } if (drag->path[0]) { - RNA_string_set(drop->ptr, "path", drag->path); + RNA_string_set(drop->ptr, "filepath", drag->path); } } diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 90867712322..71b37e514d7 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -58,7 +58,7 @@ static int run_pyfile_exec(bContext *C, wmOperator *op) { char path[512]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); #ifndef DISABLE_PYTHON if(BPY_run_python_script(C, path, NULL, op->reports)) { ARegion *ar= CTX_wm_region(C); @@ -81,7 +81,7 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot) ot->exec= run_pyfile_exec; ot->poll= ED_operator_areaactive; - RNA_def_string_file_path(ot->srna, "path", "", 512, "Path", ""); + RNA_def_string_file_path(ot->srna, "filepath", "", 512, "Path", ""); } diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c index 61f7cf425d4..15140f080e7 100644 --- a/source/blender/editors/space_script/script_ops.c +++ b/source/blender/editors/space_script/script_ops.c @@ -63,6 +63,6 @@ void script_keymap(wmKeyConfig *keyconf) wmKeyMap *keymap= WM_keymap_find(keyconf, "Script", SPACE_SCRIPT, 0); /* TODO - this is just while we have no way to load a text datablock */ - RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "path", "test.py"); + RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filepath", "test.py"); } diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 7bd00e6081f..06c7725984a 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -135,7 +135,7 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op) RNA_string_get(op->ptr, "name", seq_load->name+2); - RNA_string_get(op->ptr, "path", seq_load->path); /* full path, file is set by the caller */ + RNA_string_get(op->ptr, "filepath", seq_load->path); /* full path, file is set by the caller */ if (RNA_struct_find_property(op->ptr, "frame_end")) { seq_load->end_frame = RNA_int_get(op->ptr, "frame_end"); @@ -545,7 +545,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) if (seq->type==SEQ_PLUGIN) { char path[FILE_MAX]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); sh.init_plugin(seq, path); diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index b19e8652f7f..81edb6e4dd7 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -322,7 +322,7 @@ static int sound_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) static void sequencer_drop_copy(wmDrag *drag, wmDropBox *drop) { /* copy drag path to properties */ - RNA_string_set(drop->ptr, "path", drag->path); + RNA_string_set(drop->ptr, "filepath", drag->path); } /* this region dropbox definition */ diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 96b38f2e78d..7f3741e8e17 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -215,19 +215,19 @@ static void text_keymap(struct wmKeyConfig *keyconf) #endif kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 0); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 1); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 0); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.font_size"); + RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); RNA_boolean_set(kmi->ptr, "reverse", 1); WM_keymap_add_item(keymap, "TEXT_OT_new", NKEY, KM_PRESS, KM_ALT, 0); @@ -389,7 +389,7 @@ static int text_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) static void text_drop_copy(wmDrag *drag, wmDropBox *drop) { /* copy drag path to properties */ - RNA_string_set(drop->ptr, "path", drag->path); + RNA_string_set(drop->ptr, "filepath", drag->path); } /* this region dropbox definition */ diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index d3c197506b9..c90d257ee43 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -220,7 +220,7 @@ static int open_exec(bContext *C, wmOperator *op) char str[FILE_MAX]; short internal = RNA_int_get(op->ptr, "internal"); - RNA_string_get(op->ptr, "path", str); + RNA_string_get(op->ptr, "filepath", str); text= add_text(str, G.sce); @@ -268,11 +268,11 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) Text *text= CTX_data_edit_text(C); char *path= (text && text->name)? text->name: G.sce; - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return open_exec(C, op); open_init(C, op); - RNA_string_set(op->ptr, "path", path); + RNA_string_set(op->ptr, "filepath", path); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -494,7 +494,7 @@ static int save_as_exec(bContext *C, wmOperator *op) if(!text) return OPERATOR_CANCELLED; - RNA_string_get(op->ptr, "path", str); + RNA_string_get(op->ptr, "filepath", str); if(text->name) MEM_freeN(text->name); text->name= BLI_strdup(str); @@ -513,7 +513,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) Text *text= CTX_data_edit_text(C); char *str; - if(RNA_property_is_set(op->ptr, "path")) + if(RNA_property_is_set(op->ptr, "filepath")) return save_as_exec(C, op); if(text->name) @@ -523,7 +523,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) else str= G.sce; - RNA_string_set(op->ptr, "path", str); + RNA_string_set(op->ptr, "filepath", str); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 78ae13d255e..8d6b731e850 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -454,7 +454,7 @@ static void view3d_id_path_drop_copy(wmDrag *drag, wmDropBox *drop) if(id) RNA_string_set(drop->ptr, "name", id->name+2); if(drag->path[0]) - RNA_string_set(drop->ptr, "path", drag->path); + RNA_string_set(drop->ptr, "filepath", drag->path); } diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index da4395e2309..08658cd752d 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -220,12 +220,12 @@ void view3d_keymap(wmKeyConfig *keyconf) /* drawtype */ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", ZKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "space_data.viewport_shading"); + RNA_string_set(kmi->ptr, "data_path", "space_data.viewport_shading"); RNA_string_set(kmi->ptr, "value_1", "SOLID"); RNA_string_set(kmi->ptr, "value_2", "WIREFRAME"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", ZKEY, KM_PRESS, KM_ALT, 0); - RNA_string_set(kmi->ptr, "path", "space_data.viewport_shading"); + RNA_string_set(kmi->ptr, "data_path", "space_data.viewport_shading"); RNA_string_set(kmi->ptr, "value_1", "TEXTURED"); RNA_string_set(kmi->ptr, "value_2", "SOLID"); @@ -266,29 +266,29 @@ void view3d_keymap(wmKeyConfig *keyconf) /* context ops */ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", COMMAKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "space_data.pivot_point"); + RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point"); RNA_string_set(kmi->ptr, "value", "BOUNDING_BOX_CENTER"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", COMMAKEY, KM_PRESS, KM_CTRL, 0); /* 2.4x allowed Comma+Shift too, rather not use both */ - RNA_string_set(kmi->ptr, "path", "space_data.pivot_point"); + RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point"); RNA_string_set(kmi->ptr, "value", "MEDIAN_POINT"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", COMMAKEY, KM_PRESS, KM_ALT, 0); /* new in 2.5 */ - RNA_string_set(kmi->ptr, "path", "space_data.pivot_point_align"); + RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point_align"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SPACEKEY, KM_PRESS, KM_CTRL, 0); /* new in 2.5 */ - RNA_string_set(kmi->ptr, "path", "space_data.manipulator"); + RNA_string_set(kmi->ptr, "data_path", "space_data.manipulator"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "path", "space_data.pivot_point"); + RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point"); RNA_string_set(kmi->ptr, "value", "CURSOR"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "path", "space_data.pivot_point"); + RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point"); RNA_string_set(kmi->ptr, "value", "INDIVIDUAL_ORIGINS"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, KM_ALT, 0); - RNA_string_set(kmi->ptr, "path", "space_data.pivot_point"); + RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point"); RNA_string_set(kmi->ptr, "value", "ACTIVE_ELEMENT"); transform_keymap_for_space(keyconf, keymap, SPACE_VIEW3D); diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 9f21662398a..85e13879367 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -848,7 +848,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac km = WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(km->ptr, "path", "tool_settings.snap"); + RNA_string_set(km->ptr, "data_path", "tool_settings.snap"); km = WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); @@ -926,7 +926,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac km = WM_keymap_add_item(keymap, "TRANSFORM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(km->ptr, "path", "tool_settings.snap"); + RNA_string_set(km->ptr, "data_path", "tool_settings.snap"); break; default: break; diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index e5fb130a7b7..289530d4f32 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -186,7 +186,7 @@ void RNA_api_image(StructRNA *srna) func= RNA_def_function(srna, "save_render", "rna_Image_save_render"); RNA_def_function_ui_description(func, "Save image to a specific path using a scenes render settings"); RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); - parm= RNA_def_string(func, "path", "", 0, "", "Save path."); + parm= RNA_def_string(func, "filepath", "", 0, "", "Save path."); RNA_def_property_flag(parm, PROP_REQUIRED); parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from"); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index c9e17a562af..0dbaaa87a99 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -929,7 +929,7 @@ void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "load", "rna_Main_texts_load"); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_function_ui_description(func, "Add a new text to the main database from a file"); - parm= RNA_def_string(func, "path", "Path", FILE_MAXDIR + FILE_MAXFILE, "", "path for the datablock."); + parm= RNA_def_string(func, "filepath", "Path", FILE_MAXDIR + FILE_MAXFILE, "", "path for the datablock."); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm= RNA_def_pointer(func, "text", "Text", "", "New text datablock."); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 05088da56a6..2d973d9a32d 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1605,7 +1605,7 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Children", "Create instances from child particles"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Path); RNA_def_property_ui_text(prop, "Path", "Create instances along particle paths"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 31057dfd58b..52d129f04ac 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1854,7 +1854,7 @@ static int pyrna_struct_anim_args_parse(PointerRNA *ptr, const char *error_prefi static int pyrna_struct_keyframe_parse(PointerRNA *ptr, PyObject *args, PyObject *kw, const char *parse_str, const char *error_prefix, char **path_full, int *index, float *cfra, char **group_name) /* return values */ { - static char *kwlist[] = {"path", "index", "frame", "group", NULL}; + static char *kwlist[] = {"datapath", "index", "frame", "group", NULL}; char *path; /* note, parse_str MUST start with 's|ifs' */ @@ -1871,12 +1871,12 @@ static int pyrna_struct_keyframe_parse(PointerRNA *ptr, PyObject *args, PyObject } static char pyrna_struct_keyframe_insert_doc[] = -".. method:: keyframe_insert(path, index=-1, frame=bpy.context.scene.frame_current, group=\"\")\n" +".. method:: keyframe_insert(datapath, index=-1, frame=bpy.context.scene.frame_current, group=\"\")\n" "\n" " Insert a keyframe on the property given, adding fcurves and animation data when necessary.\n" "\n" -" :arg path: path to the property to key, analogous to the fcurve's data path.\n" -" :type path: string\n" +" :arg datapath: path to the property to key, analogous to the fcurve's data path.\n" +" :type datapath: string\n" " :arg index: array index of the property to key. Defaults to -1 which will key all indicies or a single channel if the property is not an array.\n" " :type index: int\n" " :arg frame: The frame on which the keyframe is inserted, defaulting to the current frame.\n" @@ -1905,12 +1905,12 @@ static PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *arg } static char pyrna_struct_keyframe_delete_doc[] = -".. method:: keyframe_delete(path, index=-1, frame=bpy.context.scene.frame_current, group=\"\")\n" +".. method:: keyframe_delete(datapath, index=-1, frame=bpy.context.scene.frame_current, group=\"\")\n" "\n" " Remove a keyframe from this properties fcurve.\n" "\n" -" :arg path: path to the property to remove a key, analogous to the fcurve's data path.\n" -" :type path: string\n" +" :arg datapath: path to the property to remove a key, analogous to the fcurve's data path.\n" +" :type datapath: string\n" " :arg index: array index of the property to remove a key. Defaults to -1 removing all indicies or a single channel if the property is not an array.\n" " :type index: int\n" " :arg frame: The frame on which the keyframe is deleted, defaulting to the current frame.\n" diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 6668cbf5dd8..dbbe1312f0a 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -184,7 +184,7 @@ int WM_menu_invoke (struct bContext *C, struct wmOperator *op, struct wmEven int WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); /* invoke callback, confirm menu + exec */ int WM_operator_confirm (struct bContext *C, struct wmOperator *op, struct wmEvent *event); - /* invoke callback, file selector "path" unset + exec */ + /* invoke callback, file selector "filepath" unset + exec */ int WM_operator_filesel (struct bContext *C, struct wmOperator *op, struct wmEvent *event); /* poll callback, context checks */ int WM_operator_winactive (struct bContext *C); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 2769f550f9a..3b83e4b760b 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -498,7 +498,7 @@ typedef struct wmDropBox { typedef struct RecentFile { struct RecentFile *next, *prev; - char *filename; + char *filepath; } RecentFile; diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index dc81dc39488..15852941ca6 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1212,7 +1212,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa { /* XXX validate area and region? */ bScreen *screen= CTX_wm_screen(C); - char *path= RNA_string_get_alloc(handler->op->ptr, "path", NULL, 0); + char *path= RNA_string_get_alloc(handler->op->ptr, "filepath", NULL, 0); if(screen != handler->filescreen) ED_screen_full_prevspace(C, CTX_wm_area(C)); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 44768116c7c..17a04cab7be 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -407,10 +407,10 @@ void read_Blog(void) recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile"); BLI_addtail(&(G.recent_files), recent); - recent->filename = (char*)MEM_mallocN(sizeof(char)*(strlen(line)+1), "name of file"); - recent->filename[0] = '\0'; + recent->filepath = (char*)MEM_mallocN(sizeof(char)*(strlen(line)+1), "name of file"); + recent->filepath[0] = '\0'; - strcpy(recent->filename, line); + strcpy(recent->filepath, line); num++; } } @@ -433,29 +433,29 @@ static void writeBlog(void) recent = G.recent_files.first; /* refresh .Blog of recent opened files, when current file was changed */ - if(!(recent) || (strcmp(recent->filename, G.sce)!=0)) { + if(!(recent) || (strcmp(recent->filepath, G.sce)!=0)) { fp= fopen(name, "w"); if (fp) { /* add current file to the beginning of list */ recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile"); - recent->filename = (char*)MEM_mallocN(sizeof(char)*(strlen(G.sce)+1), "name of file"); - recent->filename[0] = '\0'; - strcpy(recent->filename, G.sce); + recent->filepath = (char*)MEM_mallocN(sizeof(char)*(strlen(G.sce)+1), "name of file"); + recent->filepath[0] = '\0'; + strcpy(recent->filepath, G.sce); BLI_addhead(&(G.recent_files), recent); /* write current file to .Blog */ - fprintf(fp, "%s\n", recent->filename); + fprintf(fp, "%s\n", recent->filepath); recent = recent->next; i=1; /* write rest of recent opened files to .Blog */ while((ifilename, G.sce)!=0) { - fprintf(fp, "%s\n", recent->filename); + if (strcmp(recent->filepath, G.sce)!=0) { + fprintf(fp, "%s\n", recent->filepath); recent = recent->next; } else { next_recent = recent->next; - MEM_freeN(recent->filename); + MEM_freeN(recent->filepath); BLI_freelinkN(&(G.recent_files), recent); recent = next_recent; } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index ed2ba460e9d..02e645ef635 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -202,7 +202,7 @@ static void free_openrecent(void) struct RecentFile *recent; for(recent = G.recent_files.first; recent; recent=recent->next) - MEM_freeN(recent->filename); + MEM_freeN(recent->filepath); BLI_freelistN(&(G.recent_files)); } diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index c43f362ceaa..355be67f2cd 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -774,7 +774,7 @@ int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event) /* op->invoke, opens fileselect if path property not set, otherwise executes */ int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event) { - if (RNA_property_is_set(op->ptr, "path")) { + if (RNA_property_is_set(op->ptr, "filepath")) { return WM_operator_call(C, op); } else { @@ -788,7 +788,7 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, { PropertyRNA *prop; - RNA_def_string_file_path(ot->srna, "path", "", FILE_MAX, "File Path", "Path to file"); + RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, "File Path", "Path to file"); RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, "File Name", "Name of the file"); RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Directory of the file"); @@ -1215,7 +1215,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse col = uiLayoutColumn(split, 0); uiItemL(col, "Recent", 0); for(recent = G.recent_files.first, i=0; (i<5) && (recent); recent = recent->next, i++) { - uiItemStringO(col, BLI_path_basename(recent->filename), ICON_FILE_BLEND, "WM_OT_open_mainfile", "path", recent->filename); + uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath); } uiItemS(col); uiItemO(col, NULL, ICON_RECOVER_LAST, "WM_OT_recover_last_session"); @@ -1429,7 +1429,7 @@ static void open_set_use_scripts(wmOperator *op) static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) { - RNA_string_set(op->ptr, "path", G.sce); + RNA_string_set(op->ptr, "filepath", G.sce); open_set_load_ui(op); open_set_use_scripts(op); @@ -1442,7 +1442,7 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op) { char path[FILE_MAX]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); open_set_load_ui(op); open_set_use_scripts(op); @@ -1488,12 +1488,12 @@ static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *event) if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - if(RNA_property_is_set(op->ptr, "path")) { + if(RNA_property_is_set(op->ptr, "filepath")) { return WM_operator_call(C, op); } else { /* XXX TODO solve where to get last linked library from */ - RNA_string_set(op->ptr, "path", G.lib); + RNA_string_set(op->ptr, "filepath", G.lib); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; } @@ -1693,7 +1693,7 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op) { char path[FILE_MAX]; - RNA_string_get(op->ptr, "path", path); + RNA_string_get(op->ptr, "filepath", path); G.fileflags |= G_FILE_RECOVER; @@ -1714,7 +1714,7 @@ static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *eve char filename[FILE_MAX]; wm_autosave_location(filename); - RNA_string_set(op->ptr, "path", filename); + RNA_string_set(op->ptr, "filepath", filename); WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -1765,7 +1765,7 @@ static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *even BLI_strncpy(name, G.sce, FILE_MAX); untitled(name); - RNA_string_set(op->ptr, "path", name); + RNA_string_set(op->ptr, "filepath", name); WM_event_add_fileselect(C, op); @@ -1780,8 +1780,8 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) save_set_compress(op); - if(RNA_property_is_set(op->ptr, "path")) - RNA_string_get(op->ptr, "path", path); + if(RNA_property_is_set(op->ptr, "filepath")) + RNA_string_get(op->ptr, "filepath", path); else { BLI_strncpy(path, G.sce, FILE_MAX); untitled(path); @@ -1833,7 +1833,7 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) BLI_strncpy(name, G.sce, FILE_MAX); untitled(name); - RNA_string_set(op->ptr, "path", name); + RNA_string_set(op->ptr, "filepath", name); if (RNA_struct_find_property(op->ptr, "check_existing")) if (RNA_boolean_get(op->ptr, "check_existing")==0) @@ -1875,9 +1875,9 @@ static void WM_OT_save_mainfile(wmOperatorType *ot) static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(!RNA_property_is_set(op->ptr, "path")) { + if(!RNA_property_is_set(op->ptr, "filepath")) { char *path = BLI_replacestr(G.sce, ".blend", ".dae"); - RNA_string_set(op->ptr, "path", path); + RNA_string_set(op->ptr, "filepath", path); MEM_freeN(path); } @@ -1891,12 +1891,12 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) { char filename[FILE_MAX]; - if(!RNA_property_is_set(op->ptr, "path")) { + if(!RNA_property_is_set(op->ptr, "filepath")) { BKE_report(op->reports, RPT_ERROR, "No filename given"); return OPERATOR_CANCELLED; } - RNA_string_get(op->ptr, "path", filename); + RNA_string_get(op->ptr, "filepath", filename); collada_export(CTX_data_scene(C), filename); return OPERATOR_FINISHED; @@ -1919,12 +1919,12 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) { char filename[FILE_MAX]; - if(!RNA_property_is_set(op->ptr, "path")) { + if(!RNA_property_is_set(op->ptr, "filepath")) { BKE_report(op->reports, RPT_ERROR, "No filename given"); return OPERATOR_CANCELLED; } - RNA_string_get(op->ptr, "path", filename); + RNA_string_get(op->ptr, "filepath", filename); collada_import(C, filename); return OPERATOR_FINISHED; @@ -3201,47 +3201,47 @@ void wm_window_keymap(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F2KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was DXF export */ - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "LOGIC_EDITOR"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F3KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "NODE_EDITOR"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F4KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was data browser */ - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "CONSOLE"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F5KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "VIEW_3D"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F6KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "GRAPH_EDITOR"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F7KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "PROPERTIES"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F8KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "SEQUENCE_EDITOR"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F9KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "OUTLINER"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F10KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "IMAGE_EDITOR"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F11KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "TEXT_EDITOR"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F12KEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "path", "area.type"); + RNA_string_set(kmi->ptr, "data_path", "area.type"); RNA_string_set(kmi->ptr, "value", "DOPESHEET_EDITOR"); gesture_circle_modal_keymap(keyconf); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index b730d1a6483..6d01620dae8 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -729,7 +729,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) CTX_wm_window_set(C, win); WM_operator_properties_create(&props_ptr, "WM_OT_open_mainfile"); - RNA_string_set(&props_ptr, "path", path); + RNA_string_set(&props_ptr, "filepath", path); WM_operator_name_call(C, "WM_OT_open_mainfile", WM_OP_EXEC_DEFAULT, &props_ptr); WM_operator_properties_free(&props_ptr); -- cgit v1.2.3