[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3502] trunk/py/scripts/addons/ io_scene_obj/import_obj.py: This should fix [#31831] "obj import name" reported by dan grauer.

Philipp Oeser philippoeser at web.de
Mon Jun 18 16:41:10 CEST 2012


Revision: 3502
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3502
Author:   lichtwerk
Date:     2012-06-18 14:41:10 +0000 (Mon, 18 Jun 2012)
Log Message:
-----------
This should fix [#31831] "obj import name" reported by dan grauer.

Now the importer assigns the object the same name as the object data.
Reviewed by Campbell.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_scene_obj/import_obj.py

Modified: trunk/py/scripts/addons/io_scene_obj/import_obj.py
===================================================================
--- trunk/py/scripts/addons/io_scene_obj/import_obj.py	2012-06-18 14:31:38 UTC (rev 3501)
+++ trunk/py/scripts/addons/io_scene_obj/import_obj.py	2012-06-18 14:41:10 UTC (rev 3502)
@@ -675,7 +675,7 @@
     me.update(calc_edges=use_edges)
     me.validate()
 
-    ob = bpy.data.objects.new("Mesh", me)
+    ob = bpy.data.objects.new(me.name, me)
     new_objects.append(ob)
 
     # Create the vertex groups. No need to have the flag passed here since we test for the



More information about the Bf-extensions-cvs mailing list