Hey Alex
this problem was updated in 2.2. but thanx for the help!
Rob
On Tue, Nov 25, 2008 at 11:35 AM, Alex Karmazin <[EMAIL PROTECTED]>wrote:
>
> When mesh is created there is no name in it. To fix this problem just
> replace line 458 in Max3DS.as with this line
> var mesh:Mesh = new Mesh({name:_meshData.name});
> Here I just pass name to it.
>
> With this fix, and code I place below you could give more power to 3d
> designers in correcting z-sorting problems.
>
> public function loopMesh(node:*) {
> if (node is Mesh) calculateMesh(node);
> else if (node is ObjectContainer3D)
> for (var i:int = 0; i <
> node.children.length; i++) {
> loopMesh(node.children[i]);
> }
> }
>
> private function calculateMesh(node:Mesh) {
>
> if (node.name.indexOf("_back") >= 0) {
> node.ownCanvas = true;
> node.pushback = true;
> } else if (node.name.indexOf("_front") >= 0) {
> node.ownCanvas = true;
> node.pushfront = true;
> }
> }
>
> Just pass to loopMesh ObjectContainer3D with 3d model and it will
> recursively go to every mesh and if mesh has suffix in its name
> "_back" it will push it back or if it has "_front" it will push it
> front. It is handy tool for 3d modellers.
--
Rob Bateman
Flash Development & Consultancy
[EMAIL PROTECTED]
www.infiniteturtles.co.uk
www.away3d.com