Notifications
Clear all

[Closed] Save texturemaps to mat file

Hi there,

I’m trying to write a script to add an array of texturemaps to a specified mat file and failing miserably. For example:

a = loadTempMaterialLibrary “f:\bleh.mat”

for i in (getclassinstances Cellular) do
(
append i a
)

saveTempMaterialLibrary a “f:\bleh.mat”

Gives me ‘No “”append”” function for Map #1:Cellular’. I guess the append function doesn’t apply to texturemaps as they are a subclass of materials, not materials themselves.

Help!

2 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

material library is a collection of materials. probably you can append a material only. If you want to store some bitmap texture you can create simple standard material with this texture and add it to the library.

 JHN

Have you tried

append a i

Append takes the array as first argument, not the other way around. Not in front of max right now, so can’t check if the rest of the code works.

-Johan