[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [989] contrib/py/scripts/addons/ io_import_scene_dxf.py: - fixed dxf-file names recognition limited to ".dxf "

Remigiusz Fiedler migius at gmx.net
Tue Sep 7 10:25:38 CEST 2010


Revision: 989
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=989
Author:   migius
Date:     2010-09-07 10:25:37 +0200 (Tue, 07 Sep 2010)

Log Message:
-----------
- fixed dxf-file names recognition limited to ".dxf"
- fixed registering for 2.53beta
- added limitations report

Release note by migius:
- script works well for simple 2d objects
- limited support for complex entities like POLYLINE / POLYFACE / POLYMESH
- erroneous rotated TEXTs
- no support for entity rotation in 3d (210 group ignored)
- no support for hierarchies (BLOCKs)
Most probably no additions will be made to this script.
It is a temporary solution - the old full feature importer will be ported to 2.6 soon.

Modified Paths:
--------------
    contrib/py/scripts/addons/io_import_scene_dxf.py

Modified: contrib/py/scripts/addons/io_import_scene_dxf.py
===================================================================
--- contrib/py/scripts/addons/io_import_scene_dxf.py	2010-09-06 14:10:38 UTC (rev 988)
+++ contrib/py/scripts/addons/io_import_scene_dxf.py	2010-09-07 08:25:37 UTC (rev 989)
@@ -17,9 +17,25 @@
 # ##### END GPL LICENSE BLOCK #####
 
 """
-Place this file in the .blender/scripts/addons dir
+Release note by migius (DXF support maintainer) 2010.06.14:
+- script works well for simple 2d objects
+- limited support for complex entities like POLYLINE / POLYFACE / POLYMESH
+- erroneous rotated TEXTs
+- no support for entity rotation in 3d (210 group ignored)
+- no support for hierarchies (BLOCKs)
+Most probably no additions will be made to this script.
+It is a temporary solution - the old full feature importer will be ported to 2.6 soon.
+
+Installation:
+Place this file to Blender addons directory (on Windows it is %Blender_directory%\2.53\scripts\addons\)
 You have to activated the script in the "Add-Ons" tab (user preferences).
 Access from the File > Import menu.
+
+History:
+ver 0.11 - 2010.09.07 by migius
+- fixed dxf-file names recognition limited to ".dxf"
+- fixed registering for 2.53beta
+ver 0.1 - 2010.06.10 by Thomas Larsson
 """
 
 bl_addon_info = {
@@ -1433,7 +1449,7 @@
 
     fileName = os.path.expanduser(filePath)
     (shortName, ext) = os.path.splitext(fileName)
-    if ext != ".dxf":
+    if ext.lower() != ".dxf":
         print("Error: Not a dxf file: " + fileName)
         return
     print( "Opening DXF file "+ fileName )
@@ -2067,7 +2083,7 @@
 
 def register():
     # registerPanels()
-
+    bpy.types.register(IMPORT_OT_autocad_dxf)
     menu_func = lambda self, context: self.layout.operator(IMPORT_OT_autocad_dxf.bl_idname, text="Autocad (.dxf)...")
     bpy.types.INFO_MT_file_import.append(menu_func)
     return




More information about the Bf-extensions-cvs mailing list