← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3946: Fix Id export in ymport.textClumps

 

------------------------------------------------------------
revno: 3946
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Mon 2014-05-12 12:05:04 +0200
message:
  Fix Id export in ymport.textClumps
modified:
  py/ymport.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'py/ymport.py'
--- py/ymport.py	2014-01-16 09:59:51 +0000
+++ py/ymport.py	2014-05-12 10:05:04 +0000
@@ -76,16 +76,14 @@
 		if (newClumpId<0 or newClumpId==int(data[4])):
 			idD = curClump.append(utils.sphere(shift+scale*pos,scale*float(data[3]),**kw))
 			newClumpId = int(data[4])
-			ret.append(idD)
 		else:
 			newClumpId = int(data[4])
 			O.bodies.appendClumped(curClump)
 			curClump=[]
 			idD = curClump.append(utils.sphere(shift+scale*pos,scale*float(data[3]),**kw))
-			ret.append(idD)
 	
 	if (len(curClump)<>0):
-		O.bodies.appendClumped(curClump)
+		ret = O.bodies.appendClumped(curClump)
 	return ret
 
 def text(fileName,shift=Vector3.Zero,scale=1.0,**kw):