[Papervision3D] re placeMaterialByName in DAEs
baka
baka124 at hotmail.com
Tue May 19 04:33:17 PDT 2009
Hi,
I exported a scene of a group of planes in a hierarchy (as a DAE file)
On the planes I display a texture of an image (so one single image with
different UVS per plane)
This frames a different part of the same image on each individual plane so
to say.
Now I am trying to switch to different image on a mouse click.
(Same framing different jpg)
So when I;
var popMen02_jpg_img : BitmapMaterial = new
BitmapMaterial(textureItem.getBitmapData("men1"), false);
popMen02_jpg_img.interactive = true;
viewers.replaceMaterialByName(popMen02_jpg_img, "viewer01MenCube0" );
In a onClick function, all the planes get the different texture instead of
just the clicked plane ?!
Each plane (or cube really) has a unique material in the DAE, but this seems
ignored somehow (and is the same as the name in for instance the
replaceMaterialByName().
If i try;
viewers.getChildByName("COLLADA_Scene").getChildByName("viewers").getChildByName("viewer01").getChildByName("viewer01_viewer01Null").getChildByName("viewer01_cube").replaceMaterialByName(popMen02_jpg_img,
"viewer01MenCube0" );
Nothing happens, whilst this method is my best friend for lots of occasions.
Anyone have any clues what I'm doing wrong?
Thanks
Olivier
--
View this message in context: http://www.nabble.com/replaceMaterialByName-in-DAEs-tp23614461p23614461.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list