[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12009] trunk/blender/release/scripts: udates from stable

Campbell Barton cbarton at metavr.com
Tue Sep 11 12:22:00 CEST 2007


Revision: 12009
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12009
Author:   campbellbarton
Date:     2007-09-11 12:22:00 +0200 (Tue, 11 Sep 2007)

Log Message:
-----------
udates from stable

Modified Paths:
--------------
    trunk/blender/release/scripts/console.py
    trunk/blender/release/scripts/import_dxf.py

Modified: trunk/blender/release/scripts/console.py
===================================================================
--- trunk/blender/release/scripts/console.py	2007-09-11 10:06:14 UTC (rev 12008)
+++ trunk/blender/release/scripts/console.py	2007-09-11 10:22:00 UTC (rev 12009)
@@ -774,6 +774,7 @@
 
 # Autoexec, startup code.
 scriptDir = Get('scriptsdir')
+console_autoexec = None
 if scriptDir:
 	if not scriptDir.endswith(Blender.sys.sep):
 		scriptDir += Blender.sys.sep
@@ -788,7 +789,10 @@
 		except:
 			cmdBuffer.append(cmdLine('...console_autoexec.py could not write, this is ok', 1, None))
 			scriptDir = None # make sure we only use this for console_autoexec.py
-		
+	
+	if not sys.exists(console_autoexec):
+		console_autoexec = None
+	
 	else:
 		cmdBuffer.append(cmdLine('...Using existing console_autoexec.py in scripts dir', 1, None))
 
@@ -811,7 +815,7 @@
 	
 	exec('%s%s' % ('__CONSOLE_VAR_DICT__["bpy"]=', 'bpy'))
 	
-if scriptDir:
+if scriptDir and console_autoexec:
 	include_console(console_autoexec) # pass the blender module
 
 #-end autoexec-----------------------------------------------------------------#

Modified: trunk/blender/release/scripts/import_dxf.py
===================================================================
--- trunk/blender/release/scripts/import_dxf.py	2007-09-11 10:06:14 UTC (rev 12008)
+++ trunk/blender/release/scripts/import_dxf.py	2007-09-11 10:22:00 UTC (rev 12009)
@@ -7,10 +7,10 @@
 Tooltip: 'Import for DXF geometry data (Drawing eXchange Format).'
 """
 __author__ = 'Kitsu(Ed Blake) & migius(Remigiusz Fiedler)'
-__version__ = '1.0.beta09 by migius 02.09.2007'
+__version__ = '1.0.beta10 - 2007.09.09 by migius'
 __url__ = ["http://blenderartists.org/forum/showthread.php?t=84319",
 	 "http://wiki.blender.org/index.php/Scripts/Manual/Import/DXF-3D"]
-__email__ = ["Kitsune_e(at)yahoo.com", "remi_(at)gmx.de"]
+__email__ = ["Kitsune_e(at)yahoo.com", "migius(at)4d-vectors.de"]
 __bpydoc__ = """\
 This script imports DXF objects (2d/3d) into Blender.
 
@@ -54,10 +54,8 @@
 - Blocks are created on layer 19 then referenced at each insert point.
 * Big DXF-files (over 1500 objects) decrease import performance. The problem is not the inefficiency of python-scripting but Blenders performance in creating new objects in his database - probably a database management problem.
 * The Blender curves of imported ARCs and POLYLINE-arc-segments have light malformed ends.(to fix in beta10)
-- Bug in newScene-option: ARCs and CIRCLEs are drawn at (0,0,0). (wip)
 	
 TODO:  
-- filtering of unused/not-inserted Blocks
 - the new style object visibility
 - support for Spline-curves, Besier-curves
 - support for real 3d-solids (ACIS)
@@ -65,24 +63,28 @@
 
 
 History:
- v1.0 08.2007 by migius: "full 3d"-release
-    TODO:
- -- command-line-mode/batch-mode
+ v1.0 - 2007.09 by migius: "full 3d"-release
+ planned tasks:
+ -- filtering of unused/not-inserted BLOCKs
  -- human-formating of data in INI-File
  -- suport for MLine
  -- suport for Ellipse
  -- suport for Mtext
  -- blender_object.ID.properties[dxf_layer_name]
- -- Configuration files(.ini) can handle various material setups
+ -- Configuration files(.ini) should/can handle various material setups
  -- added f_layerFilter
- -- to-check: new_scene-idea from ideasman42: each import create a new scene
  -- to-check: obj/mat/group/_mapping-idea from ideasman42:
  -- better support for long dxf-layer-names 
  -- support width_force for LINEs/ARCs/CIRCLEs/ELLIPSEs = "solidify"
- -- added fill/non-fill option for closed curves: CIRCLEs,PLINEs
- -- bug:? Circle/Arcs in each "newScene" drawn at <0,0,0>
+ -- curves: added fill/non-fill option for closed curves: CIRCLEs,ELLIPSEs,POLYLINEs
  -- bug:? object = Object.Get(obname) -> = SCENE.getChildren(obname)
- beta09: 02.09.2007 by migius
+ -- command-line-mode/batch-mode
+ -- fixed malformed endpoints of Blender curves of imported ARCs and POLYLINE-arc segments. 
+ beta10: 2007.09.09 by migius
+ a1 added "fill_on" option to draw top and bottom sides of CIRCLEs and ELLIPSEs
+ a1 rewrite f_CIRCLE.Draw: from Mesh.Primitive to Mesh
+ a1 bugfix "newScene"-mode: Cylinders/Arcs were drawn at <0,0,0>location
+ beta09: 2007.09.02 by migius
  g5 redesign UI: grouping of buttons
  g3 update multi-import-mode: <*.*> button
  g- added multi-import-mode: (path/*) for importing many dxf-files at once
@@ -110,7 +112,7 @@
  a- added support for 2d-POLYLINE: splines, fitted curves, fitted surfaces
  a- redesign f_Drawer for block_definitions
  a- rewrite import into Blender-Curve-Object
- beta08: 27.07.2007 by migius
+ beta08: 2007.07.27 by migius
  l- bugfix: solid_vgroups, clean:scene.objects.new()
  l- redesign UI to standard Draw.Register+FileSelector, advanced_config_option
  k- bugfix UI:fileSelect() for MacOSX os.listdir()
@@ -128,35 +130,35 @@
  e- bugfix: closed-polymesh3d
  - rewrote: startUI, type_map.keys, f_drawer, for all class_f_draw(added "settings" as attribut)
  - added 2d/3d-support for Polyline_Width incl. angleintersection
- beta07: 19.06.2007 by migius
+ beta07: 2007.06.19 by migius
  - added 3d-support for LWPolylines
  - added 2d/3d-support for Points
- beta06: 15.06.2007 by migius
+ beta06: 2007.06.15 by migius
  - cleanup code
  - added 2d/3d-support for MINSERT=BlockArray in f_drawer, added f_rotXY_Vec
- beta05: 14.06.2007 by migius
+ beta05: 2007.06.14 by migius
  - added 2d/3d-support for 3d-PolyLine, PolyMesh and PolyFace
  - added Global-Scale for size control of imported scenes
- beta04: 12.06.2007 by migius
+ beta04: 2007.06.12 by migius
  - rewrote the f_drawBulge for correct import the arc-segments of Polylines
- beta03: 10.06.2007 by migius
+ beta03: 2007.06.10 by migius
  - rewrote interface
- beta02: 09.06.2007 by migius
+ beta02: 2007.06.09 by migius
  - added 3d-support for Arcs and Circles
  - added support for Object_Thickness(=height)
- beta01: 08.06.2007 by migius
+ beta01: 2007.06.08 by migius
  - added 3d-support for Blocks/Inserts within nested-structures
  - rewrote f_transform for correct 3d-location/3d-rotation
  - added 3d-support Lines, 3dFaces
  - added 2d+3d-support for Solids and Traces
 
- v0.9 by kitsu 01.2007: (for 2.43)
+ v0.9 - 2007.01 by kitsu: (for 2.43)
  -
 
- v0.8 by kitsu 12.2007:
+ v0.8 - 2006.12 by kitsu:
  -
 
- v0.5b by kitsu 10.2006 (for 2.42a)
+ v0.5b - 2006.10 by kitsu: (for 2.42a)
  -
 
 """
@@ -190,7 +192,7 @@
 #import BPyMessages
 
 
-from dxfReader import readDXF      # get_name, get_layer
+from dxfReader import readDXF	  # get_name, get_layer
 from dxfReader import Object as dxfObject
 from dxfColorMap import color_map
 from math import *
@@ -214,7 +216,7 @@
 WORLDY = Mathutils.Vector((1,1,0))
 WORLDZ = Mathutils.Vector((0,0,1))
 
-G_SCALE = 1.0		#(0.0001-1000) global scaling factor for all dxf data
+G_SCALE = 1.0	   #(0.0001-1000) global scaling factor for all dxf data
 MIN_DIST = 0.001	#cut-off value for sort out short-distance polyline-"duoble_vertex"
 ARC_RESOLUTION = 64   #(4-500) arc/circle resolution - number of segments
 ARC_RADIUS = 1.0   #(0.01-100) arc/circle radius for number of segments algorithm
@@ -222,10 +224,10 @@
 MIN_THICK = MIN_DIST * 10.0  #minimal thickness by forced thickness
 MIN_WIDTH = MIN_DIST * 10.0  #minimal width by forced width
 ANGLECUT_LIMIT = 3.0	 #limit for anglecut of polylines-wide-segments (values:1.0 - 5.0)
-TARGET_LAYER = 3    #target blender_layer
+TARGET_LAYER = 3	#target blender_layer
 GROUP_BYLAYER = 0   #(0/1) all entities from same layer import into one blender-group
 
-FILENAME_MAX = 180    #max length of path+file_name string  (FILE_MAXDIR + FILE_MAXFILE)
+FILENAME_MAX = 180	#max length of path+file_name string  (FILE_MAXDIR + FILE_MAXFILE)
 MAX_NAMELENGTH = 17   #max_effective_obnamelength in blender =21=17+(.001)
 INIFILE_DEFAULT_NAME = 'importDXF'
 INIFILE_EXTENSION = '.ini'
@@ -254,29 +256,29 @@
 BYLAYER=256
 
 #---block-type flags (bit coded values, may be combined):
-ANONYMOUS			=1  # This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application
+ANONYMOUS		   =1  # This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application
 NON_CONSTANT_ATTRIBUTES =2  # This block has non-constant attribute definitions (this bit is not set if the block has any attribute definitions that are constant, or has no attribute definitions at all)
 XREF					=4  # This block is an external reference (xref)
 XREF_OVERLAY			=8  # This block is an xref overlay
 EXTERNAL				=16 # This block is externally dependent
 RESOLVED				=32 # This is a resolved external reference, or dependent of an external reference (ignored on input)
-REFERENCED		=64 # This definition is a referenced external reference (ignored on input)
+REFERENCED	  =64 # This definition is a referenced external reference (ignored on input)
 
 #---polyline flags
-CLOSED				=1	# This is a closed polyline (or a polygon mesh closed in the M direction)
-CURVE_FIT				=2  # Curve-fit vertices have been added
-SPLINE_FIT			=4	# Spline-fit vertices have been added
-POLYLINE_3D		=8   # This is a 3D polyline
+CLOSED			  =1  # This is a closed polyline (or a polygon mesh closed in the M direction)
+CURVE_FIT			   =2  # Curve-fit vertices have been added
+SPLINE_FIT		  =4  # Spline-fit vertices have been added
+POLYLINE_3D	 =8   # This is a 3D polyline
 POLYGON_MESH				=16  # This is a 3D polygon mesh
 CLOSED_N					=32  # The polygon mesh is closed in the N direction
-POLYFACE_MESH			=64   # The polyline is a polyface mesh
+POLYFACE_MESH		   =64   # The polyline is a polyface mesh
 CONTINOUS_LINETYPE_PATTERN  =128	# The linetype pattern is generated continuously around the vertices of this polyline
 
 #---text flags
 #horizontal
 LEFT		= 0
 CENTER  = 1
-RIGHT	= 2
+RIGHT   = 2
 ALIGNED  = 3 #if vertical alignment = 0
 MIDDLE  = 4 #if vertical alignment = 0
 FIT   = 5 #if vertical alignment = 0
@@ -290,7 +292,7 @@
 #attachment point
 TOP_LEFT		= 1
 TOP_CENTER  = 2
-TOP_RIGHT	= 3
+TOP_RIGHT   = 3
 MIDDLE_LEFT  = 4
 MIDDLE_CENTER   = 5
 MIDDLE_RIGHT	= 6
@@ -303,7 +305,7 @@
 BY_STYLE		= 5 #the flow direction is inherited from the associated text style
 #line spacing style (optional):
 AT_LEAST		= 1 #taller characters will override
-EXACT		= 2 #taller characters will not override
+EXACT	   = 2 #taller characters will not override
 
 
 
@@ -354,7 +356,7 @@
 				# TODO - I found one case where item was a text instance

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list