Horde3D

Next-Generation Graphics Engine
It is currently 27.04.2024, 13:12

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 16.07.2008, 12:03 
Offline

Joined: 10.07.2008, 10:49
Posts: 20
hi guys,

I'm looking for a function that could change material of an object at runtime.
I use the Horde3D::findResource (with ResourceTypes::Material) to find the resource handle. But then, which function is used to apply the new resource to the object?


Top
 Profile  
Reply with quote  
PostPosted: 16.07.2008, 12:38 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Horde3D::setNodeParami, unfortunately there is a typo in the documentation there are two times the setNodeParamf method. Instead the second setNodeParamf has to be setNodeParami:
Code:
Horde3D::setNodeParami( meshNodeID, MeshNodeParams::MaterialRes, newMaterialRes);


Top
 Profile  
Reply with quote  
PostPosted: 17.07.2008, 03:08 
Offline

Joined: 10.07.2008, 10:49
Posts: 20
Thanks Volker. I got it now.


Top
 Profile  
Reply with quote  
 Post subject: python code
PostPosted: 05.04.2010, 00:51 
Offline

Joined: 25.03.2010, 03:58
Posts: 13
Code:
envMat = h3d.addResource(h3d.ResTypes.Material,"models/knight/env.material.xml",0)
h3d.utils.loadResourcesFromDisk("Content")      
h3d.findNodes(self._knight, 'osh_body', h3d.NodeTypes.Mesh)
osh_body = h3d.getNodeFindResult(0)
h3d.setNodeParamI(osh_body,h3d.Mesh.MatResI ,envMat)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group