> plus I suspect if the exporter decides to export mesh2
> before mesh1
no, unless exporter is not in sync with own app. hierarchy inspector would 
display same order as in file.

Also note that a lib is coming up, where you might be able to access a material 
from a mesh, no id required.
I say "might", because Richard is doing it, and don't know for sure if this 
will be added this way.
but I bet there will be ways to access materials in similar fashion...

For obj I was thinking of adding an "away" tag for mesh names, but as it would 
work only from Prefab and API exporter, haven't done it.

Fabrice


On May 2, 2011, at 1:25 PM, Apprentice wrote:

> Hehe, I did exactly the same thing :P
> It's very essential to be able to reference models by name and not by
> 'obj0' etc. plus I suspect if the exporter decides to export mesh2
> before mesh1 you're objects will get messed up.
> 
> On 2 mei, 12:51, John Brookes <[email protected]> wrote:
>> Got a model of an industrial estate that uses 1 transparent png image for
>> things like fences tress etc. As well as other non transparent images.
>> Problem is cant set the material to transparent as the mesh names are
>> obj1...#, so no idea which mesh needs it material setting to transparent.
>> 
>> Edited OBJ parser(line 295) to set the mesh name from
>> //mesh.name = "obj"+meshid;
>> to
>> mesh.name = groups[g].name;
>> 
>> Now I can do
>> if (ObjectContainer3D(indiEstate.getChildAt(i)).name == "Railings")
>> {
>>     BitmapMaterial(Mesh(indiEstate.getChildAt(i)).material).transparent =
>> true;
>> 
>> }
>> 
>> Works, no idea if it breaks anything though.
>> Better way?

Reply via email to