View Single Post
  #1  
Old 07-10-2015, 08:15 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Cool Weird behavior of on-the-fly objects

I am using a piece of code from Vizard's onTheFly.py example (see below) to create some dots on a map. The dots are created normally when run from within the module ('__main__'), but become square when the module is called from another module (see images)! Absolutely nothing changes in the way the code is called, so it makes no sense to me why this might happen. Seems like a bug.
Code:
def DisplayClickedCoords(self,coords):
		#Add on-th-fly points on the map for all the coordinates
		viz.startLayer(viz.POINTS)
		viz.pointSize(20)
		viz.vertexColor(viz.RED)
		self.spots = viz.endLayer()
		self.spots.disable(viz.CULLING)
		for c in coords:
			self.spots.addVertex(c[0], 0, c[1])
		self.spots.alpha(0.5)
I can try and reproduce the problem in a sample script, but before I do this, is there any reason that you think such a behavior can be explained?
Attached Thumbnails
Click image for larger version

Name:	map_points1.png
Views:	863
Size:	66.4 KB
ID:	715   Click image for larger version

Name:	map_points2.png
Views:	845
Size:	72.5 KB
ID:	716  
Reply With Quote