thanks for the replies guys. Had to use OBJ for a job. I tried to
convince them to use 3ds but no go. I did finally get it working
with:

loader = new Loader3D();
loader = Obj.load(”../some.obj”);
loader.addOnSuccess(buildShirt);

then in that function-

myObjContainer3D = event.loader.handle as ObjectContainer3D; // <—-

for each (var child:Mesh in myObjContainer3D.children) {
    // do something
}

so it's very similar to how I was using 3ds, just that cast of the
handle in 'as ObjectContainer3D' was the hang up. I'm more used to
Broomstick, but again reqs of the job. Broomstick allows you to debug
easier as it returns better info when you trace loaders. I can
definitely see the evolution in code from 3.6 to 4.0

On Jul 9, 5:42 am, richardolsson <[email protected]> wrote:
> OBJ is a problematic format because it's implemented differently in
> different exporters, and the Away3D parser sort of becomes a mishmash
> of these different implementations. This means that some things might
> not be carried across correctly, even though they are in the file
> (e.g. because they aren't standard and the Away3D parser cannot rely
> on them to be there.) Maybe your issues stem from this fact.
>
> If you know 3DS to work for you, why not use that instead? It is much
> more compact (about 30-40% the size of an OBJ with the same contained
> geometry) so there is really little reason to use OBJ in the first
> place.
>
> Cheers
> /R
>
> On Jul 9, 12:20 am, Choons <[email protected]> wrote:
>
>
>
>
>
>
>
> > this is for 3.6 and is driving me nuts. I have an OBJ file that
> > contains several meshes (o) - sleeves, collar, etc. I can get the OBJ
> > file to load and display in various ways, but I can't figure out how
> > to access the individual meshes like Sleeve_R, Collar, etc. so I can
> > swap out materials interactively. I've done this quite easily using
> > 3ds files parsed into ObjectContainer3D's using the for each(var
> > child:Mesh in myObjectContainer3D.children) approach but that seems
> > not to work with 3.6's OBJ parsing system.
>
> > So it seems this should be an easy thing to do. How do you get access
> > to the individual meshes from an OBJ file parsed in 3.6?

Reply via email to