Hello,
I'm trying to change the material of faces that belong to a mesh
contained in several ObjectContainer3D.
Here is what I have written:
for each (var face:Face in mesh.faces){
trace (String(face.material));
// it traces
"null"
face.material = colorMaterial;
trace (String(face.material));
// it traces
"[object ColorMaterial]"
if(i%2==1) face.visible=false;
// it makes
invisible alf of the faces
i++;
}
I think I have succeeded to acces the faces and change their material.
I don't get a "null" when I trace (face.material) but I can't get the
visual result. The initial texture of the objet is still displayed.
What I don't understand is why I get a null fisrt because the mesh is
textured
and why when I change the face material I cant' see the result.