[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [707] trunk/py/scripts/addons: filename --> filepath (changed in trunk/svn)

Campbell Barton ideasman42 at gmail.com
Wed Jun 2 20:01:30 CEST 2010


Revision: 707
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=707
Author:   campbellbarton
Date:     2010-06-02 20:01:30 +0200 (Wed, 02 Jun 2010)

Log Message:
-----------
filename --> filepath (changed in trunk/svn)

Modified Paths:
--------------
    trunk/py/scripts/addons/export_unreal_psk_psa.py
    trunk/py/scripts/addons/import_images_as_planes.py
    trunk/py/scripts/addons/io_anim_camera.py
    trunk/py/scripts/addons/io_mesh_raw/__init__.py
    trunk/py/scripts/addons/io_mesh_stl/__init__.py

Modified: trunk/py/scripts/addons/export_unreal_psk_psa.py
===================================================================
--- trunk/py/scripts/addons/export_unreal_psk_psa.py	2010-05-31 12:17:26 UTC (rev 706)
+++ trunk/py/scripts/addons/export_unreal_psk_psa.py	2010-06-02 18:01:30 UTC (rev 707)
@@ -1502,7 +1502,7 @@
 def menu_func(self, context):
 	bpy.context.scene.unrealexportpsk = True
 	bpy.context.scene.unrealexportpsa = True
-	default_path = bpy.data.filename.replace(".blend", ".psk")
+	default_path = bpy.data.filepath.replace(".blend", ".psk")
 	self.layout.operator ("export.udk_anim_data", text="Skeleton Mesh / Animation Data (.psk/.psa)").path = default_path
 
 class VIEW3D_PT_unrealtools_objectmode(bpy.types.Panel):
@@ -1567,7 +1567,7 @@
 			bpy.context.scene.unrealexportpsk = True
 			bpy.context.scene.unrealexportpsa = True
 			print("Exporting ALL...")
-		default_path = bpy.data.filename.replace(".blend", ".psk")
+		default_path = bpy.data.filepath.replace(".blend", ".psk")
 		fs_callback(default_path, bpy.context, False)
 		self.report({'WARNING', 'INFO'}, exportmessage)
 		return{'FINISHED'}	

Modified: trunk/py/scripts/addons/import_images_as_planes.py
===================================================================
--- trunk/py/scripts/addons/import_images_as_planes.py	2010-05-31 12:17:26 UTC (rev 706)
+++ trunk/py/scripts/addons/import_images_as_planes.py	2010-06-02 18:01:30 UTC (rev 707)
@@ -202,7 +202,7 @@
     # Check every Image if it is already there.
     for image in bpy.data.images:
         # If image with same path exists take that one.
-        if image.filename == path:
+        if image.filepath == path:
             img = image
 
     # Else create new Image and load from path.
@@ -210,7 +210,7 @@
         name = path.rpartition('\\')[2].rpartition('.')[0]
         img = bpy.data.images.new(name)
         img.source = 'FILE'
-        img.filename = path
+        img.filepath = path
 
     return img
 
@@ -247,7 +247,7 @@
         # If an (image)texture with image exists, take that one...
         if (texture.type == 'IMAGE'
             and texture.image
-            and texture.image.filename == path):
+            and texture.image.filepath == path):
             tex = texture
 
     # ... otherwise create a new one and apply mapping.
@@ -303,7 +303,7 @@
     images = []
     scene = bpy.context.scene
 
-    # If "Create from Directory" (no filename or checkbox) ####
+    # If "Create from Directory" (no filepath or checkbox) ####
     if options['dir'] or not filePath[1]:
         imageFiles = getImageFilesInDirectory(filePath[2], options['ext'])
 
@@ -318,7 +318,7 @@
         # Assign/get all things.
         for img in images:
             # Create/get Texture
-            tex = getTexture(img.filename, img)
+            tex = getTexture(img.filepath, img)
 
             # Create/get Material
             mat = getMaterial(tex, mapping)
@@ -338,7 +338,7 @@
             plane.selected = True
             scene.objects.active = plane
 
-    # If "Create Single Plane" (filename and is image)
+    # If "Create Single Plane" (filepath and is image)
     else:
         # Deselect all objects.
         bpy.ops.object.select_all(action='DESELECT')

Modified: trunk/py/scripts/addons/io_anim_camera.py
===================================================================
--- trunk/py/scripts/addons/io_anim_camera.py	2010-05-31 12:17:26 UTC (rev 706)
+++ trunk/py/scripts/addons/io_anim_camera.py	2010-06-02 18:01:30 UTC (rev 707)
@@ -145,7 +145,7 @@
 
 
 def menu_export(self, context):
-    default_path = bpy.data.filename.replace(".blend", ".py")
+    default_path = bpy.data.filepath.replace(".blend", ".py")
     self.layout.operator(CameraExporter.bl_idname, text="Cameras & Markers (.py)").path = default_path
 
 

Modified: trunk/py/scripts/addons/io_mesh_raw/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_raw/__init__.py	2010-05-31 12:17:26 UTC (rev 706)
+++ trunk/py/scripts/addons/io_mesh_raw/__init__.py	2010-06-02 18:01:30 UTC (rev 707)
@@ -39,7 +39,7 @@
 
 def menu_export(self, context):
     from io_mesh_raw import export_raw
-    default_path = bpy.data.filename.replace(".blend", ".raw")
+    default_path = bpy.data.filepath.replace(".blend", ".raw")
     self.layout.operator(export_raw.RawExporter.bl_idname, text="Raw Faces (.raw)").path = default_path
 
 

Modified: trunk/py/scripts/addons/io_mesh_stl/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_stl/__init__.py	2010-05-31 12:17:26 UTC (rev 706)
+++ trunk/py/scripts/addons/io_mesh_stl/__init__.py	2010-06-02 18:01:30 UTC (rev 707)
@@ -133,7 +133,7 @@
 
 
 def menu_export(self, context):
-    default_path = bpy.data.filename.replace(".blend", ".stl")
+    default_path = bpy.data.filepath.replace(".blend", ".stl")
     self.layout.operator(StlExporter.bl_idname,
                          text="Stl (.stl)").path = default_path
 




More information about the Bf-extensions-cvs mailing list