View Single Post
  #1  
Old 09-18-2007, 12:40 PM
v-clizzin v-clizzin is offline
Member
 
Join Date: Sep 2006
Posts: 15
face problems in Vizard 3.0

We have several scripts that were written for Vizard 2.5 that have problems with custom faces when run in Vizard 3.0.

The function is pasted below, with the relevant lines bolded. I've also attached a picture of what the face looks like. Thanks for the help.

Code:
def loadAgent(scene,condition,person,gender):
	global agent, agents, faces, default_euler
	face_file = 0
	if gender == vhil.FEMALE or gender == vhil.MALE:
		agent_file = 'female2.cfg'
		if person == CONDITION_1:
			face_file = 'Sandra/sandra.vzf'
			#face_file = 'Sandra/sandra.vzf'
			clothes = viz.add('')
		elif person == CONDITION_2:
			face_file = 'F-201/F-201.vzf'
			clothes = viz.add('F-201/fem_outfit2_2.jpg')
	else:
		print "\t\terror: not a valid gender!"
		
	print "\t\tloading",agent_file,face_file,"(scene",scene,")"
	
	agent = viz.add(agent_file,viz.WORLD,scene)
	agents.insert(scene-STARTING_SCENE, agent)
	
	if face_file == 0:
		print "\t\terror: not a valid face!"
	else:
		face = viz.add(face_file, viz.WORLD, scene)
		faces.insert(scene-STARTING_SCENE, face)
		agent.setFace(face)
	if gender == vhil.MALE:
		agent.texture(clothes, 'm_torso_LS.cmx')
		agent.texture(clothes, 'm_legs.cmx')
		agent.scale(AGENT_SIZE_M)
	elif gender == vhil.FEMALE:
		agent.texture(clothes, 'm_torso.cmx')
		agent.texture(clothes, 'm_legs.cmx')
		agent.scale(AGENT_SIZE_F)
	agent.translate(AGENT_POS)
	agent.rotate(0,1,0,180)
	agent.state(1)
Attached Thumbnails
Click image for larger version

Name:	face_problem_example.jpg
Views:	1185
Size:	19.0 KB
ID:	194  
Reply With Quote