PDA

View Full Version : switching material libraries --urgent


maxguy
09-05-2006, 11:31 AM
guys..

I have a saved material library and i want to replace a set of slots from the saved material library to the current one..
m = loadMaterialLibrary ((getDir #matlib)+"\\medit1.mat")

for i = 9 to 13 do

(

ME[i] = m[i]

)

i could not figure out what i am doing wrong..suggestions guys..

thanks
rajv

Wahooney
09-05-2006, 12:29 PM
First of all you're using uninitialised variables to do your thing, which will never work. I've fixed your code, but I don't know if it is what you want.

(
loadMaterialLibrary ((getDir #matlib)+"\\medit1.mat")
local m = currentMaterialLibrary
for i = 9 to 13 do meditMaterials[i-8] = m[i]
)

maxguy
09-05-2006, 04:20 PM
there is a problem when i replace the path of my .mat directory..


loadMaterialLibrary ((getDir #scripts)+"\\rs1.mat (file://\rs1.mat)")
local m = currentMateriallibrary
for i = 9 to 13 do meditMaterials[i-8] = m[i]

Anything suggestions on what i am doing wrong?

Thanks

Rajv

CGTalk Moderation
09-05-2006, 04:20 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.