General Category > ASL Scripts

VRML

<< < (3/4) > >>

Paulo:
I use this code :

if ($attribute.GetType() == 6) {

But Anim8or console says : undefined member reference 'GetType'
Strange... what is wrong ?

Raxx:
Sorry but I don't remember ever getting that one to work. You'll just have to assume an attribute is the right type before you work with it. You can use GetStringValue() to make sure you're capturing a string. If it returns 0 then that means it's not a string. Or at least that's how it's supposed to work...

Paulo:
It bothers me but I removed this verification step... GetType function doesn't seem working, maybe it's a bug !

I have a big question :

How to separate (cut) an object with several materials into several objects with only one material ?

And a small question :

Is it possible to make some alert dialog box ?

(after that, my exporter will be perfect !! ;D)

Raxx:
I don't think there's an alert function.

As for separating meshes by materials, you could try looping through the GetFaceMaterialIndex() per face to differentiate between faces that have different materials, and then export accordingly. Just look through the scripting reference to see what you can do.

Paulo:
I succeeded in making a kind of alert like this :

--- Code: ---file $alert;

if ($ext=="bmp"){
            $alert.open("$console", "w");
            $alert.print("\n\nWARNING :\n---------\nSome bitmap textures are used in : %s \nVRML doesn't support this file format for textures.\n\n",$s);
            $alert.close();
          }
--- End code ---

Now I'm coding the separation of meshes by materials. The end is near :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version