Beispiel #1
0
	def apply(self):
		try:
			val=float(self.widget0_edit.text())
			if val<=0:
				return
			if val>0.1:
				return
		except:
			return
		mesh_set_xlen(val)

		try:
			val=float(self.widget1_edit.text())
			if val<=0:
				return
			if val>0.1:
				return

		except:
			return
		mesh_set_zlen(val)

		mesh_save_x()
		mesh_save_z()

		global_object_run("mesh_update")
		global_object_run("gl_force_redraw")
	def save(self):
		if self.xyz=="y":
			mesh_clear_ylist()
		elif self.xyz=="x":
			mesh_clear_xlist()
		elif self.xyz=="z":
			mesh_clear_zlist()

		for i in range(0,self.tab.rowCount()):
			mesh_add(self.xyz,float(self.tab.item(i, 0).text()),float(self.tab.item(i, 1).text()),float(self.tab.item(i, 2).text()),tab_get_value(self.tab,i, 3))
		
		if self.xyz=="y":
			mesh_save_y()
		elif self.xyz=="x":
			mesh_save_x()
		elif self.xyz=="z":
			mesh_save_z()