[Bf-python] Re: [Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/release/scripts kmz_ImportWithMesh.py

Campbell Barton cbarton at metavr.com
Thu Feb 15 00:31:00 CET 2007


If your worried about the progress bad being slow, dont update it so 
often, you already do this for redrawing.

correct me if Im wrong but this function makes a new mesh and selects 
all its verts, so selecting them all at the end is as good as 1 by 1.

- The function as it stands in CVS

def create_LINE(BROKEN_LINE,tv):
	global TAG4,nedge
	sc = Blender.Scene.GetCurrent()
	me = Blender.Mesh.New('myMesh')
	ob = sc.objects.new(me)
	ob.setDrawMode(32)
	ob.setDrawType(2)
	v=me.verts
	e=me.edges
	for bl in BROKEN_LINE:
		nedge+=1
		v.extend(bl)
		e.extend(v[-2],v[-1])
		#v[-2].sel=1
		#v[-1].sel=1	
		#if TAG4 and nedge %TAG4 == 1 :
		#	print 'Pedg: ', nedge
	me.sel = True
	if tv :
		me.remDoubles(0.0001)



jmsoler at free.fr wrote:
> Selon Campbell Barton <cbarton at metavr.com>:
> 
>> campbellbarton (Campbell Barton) 2007/02/14 22:08:59 CET
>>
>>   Modified files:
>>     blender/release/scripts kmz_ImportWithMesh.py
>>
>>   Log:
>>   Commiting JMS's Latest KMZ minor changes.
>>   * Redraw the 3d view only when importing. (Not all windows)
> 
> Perhaps, not needed.
> 
>>   * Select all verts at once rather then 1 by 1.
> 
> Absurd to apply the function on all the vertices
> if it is only needed for a few of them .
> 
>>   * dont print polygons when importing. (Would be better to use the progress
>> bar for this)
> 
> The script does not print anything if it is not asked by the user.
> These is an unneeded damages and, i repeat, nothing, in the GPL licence,
> allows you to make these modifs.
> 
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
> 


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list