[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4822] trunk/py/scripts/addons/ io_import_images_as_planes.py: Name added planes from the image name ( like already done for textures and materials).

Bastien Montagne montagne29 at wanadoo.fr
Sat Nov 2 11:52:49 CET 2013


Revision: 4822
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4822
Author:   mont29
Date:     2013-11-02 10:52:48 +0000 (Sat, 02 Nov 2013)
Log Message:
-----------
Name added planes from the image name (like already done for textures and materials).

Modified Paths:
--------------
    trunk/py/scripts/addons/io_import_images_as_planes.py

Modified: trunk/py/scripts/addons/io_import_images_as_planes.py
===================================================================
--- trunk/py/scripts/addons/io_import_images_as_planes.py	2013-11-01 13:23:24 UTC (rev 4821)
+++ trunk/py/scripts/addons/io_import_images_as_planes.py	2013-11-02 10:52:48 UTC (rev 4822)
@@ -19,8 +19,8 @@
 bl_info = {
     "name": "Import Images as Planes",
     "author": "Florian Meyer (tstscr), mont29, matali",
-    "version": (1, 9),
-    "blender": (2, 66, 4),
+    "version": (1, 9, 1),
+    "blender": (2, 69, 0),
     "location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",
     "description": "Imports images and creates planes with the appropriate aspect ratio. "
                    "The images are mapped to the planes.",
@@ -52,7 +52,7 @@
 DEFAULT_EXT = "*"
 
 EXT_FILTER = getattr(collections, "OrderedDict", dict)((
-    (DEFAULT_EXT, ((), "All image formats", "Import all know image (or movie) formats.")),
+    (DEFAULT_EXT, ((), "All image formats", "Import all known image (or movie) formats.")),
     ("jpeg", (("jpeg", "jpg", "jpe"), "JPEG ({})", "Joint Photographic Experts Group")),
     ("png", (("png", ), "PNG ({})", "Portable Network Graphics")),
     ("tga", (("tga", "tpic"), "Truevision TGA ({})", "")),
@@ -386,6 +386,7 @@
         if plane.mode is not 'OBJECT':
             bpy.ops.object.mode_set(mode='OBJECT')
         plane.dimensions = x, y, 0.0
+        plane.name = material.name
         bpy.ops.object.transform_apply(scale=True)
         plane.data.uv_textures.new()
         plane.data.materials.append(material)



More information about the Bf-extensions-cvs mailing list