Start a new topic

anyone know how to set texture filtering to 'mip trilinear' by batch, instead of one by one?

Hello,I am using creator 18 for doing a lot models

 we need to set each texture filtering as 'mip trilinear', I have to open every texture mannually set it one by one,

Is there any script piece can do it ?

I was searching creator script help doc, but not saw this menu provided? they can change face attribute,

but i want to change texture attribute , and the .attr can't edit anyway...

I t is very tedious job when i need to do thousand of them?  

any hint?


Thanks a lot!

wang  



1 Comment

There are a few ways this can be done.


If you want to modify textures that are used in specific files,  you can open those files and iterate the texture palette. Once you found the texture you want you can use the function:


mgrec* mgGetTextureAttributes(db, index)


This gives access to the texture attributes in the return variable.


If you want to load the textures directly from disk, you use the functions:


mgrec* mgReadImageAttributes(texturename)

mgWriteImageAttributes (texturename, mgrec*)


You modify the fltImage rec returned by these functions in the same way as all OpenFlight Records. You can get a list of all the attributes to modify by looking at fltImage in the data dictionary found in the scripting reference set. (there is a link to this in the OpenFlight Script help menu)


Login to post a comment