yes, tho, you assume here, on the ease side, there's only one material applied
to the entire tree.
Meaning that for specific replacements you need to know all indexes of faces
where a given material is applied to be able to replace it,
and you would need to build a dictionary of all the materials in order to
compare old to new material...
You're faster done by comparing materials stored in lib than doing this way, I
think.
and no need to touch the engine.
If you are in mod mood, I'd rather add a material type support to awddata
parser...
very quick and dirty way could be where now materials are made, split the
filename by delimiter :
if length>1 look material type, and generate accordingly
in awd you would have something like this.
myimage.jpg
mymovie.swf:MovieMaterial
myvideo.flv:VideoMaterial
Fabrice
On Feb 16, 2011, at 3:41 PM, John Brookes wrote:
> Just checking Im not missing something but is there a default way of getting
> the faces of the BSP _tree?
>
> Had to add
> public function get facesBSP():Vector.<Face> { return _faces; }
> to BSPTree.as
>
> so I can do something like
> var vm:VideoMaterial = new VideoMaterial();
> vm.file = "water.flv";
> vm.loop = true;
>
> BSPTree(_tree).facesBSP[56].material = vm;
> BSPTree(_tree).facesBSP[57].material = vm;
>