View Full Version : Get Filename and change path problem

03 March 2008, 04:02 PM
Hello folks !

I have a small problem with maxscript.
I have a bank of high def tree texture. I made a low directory with low def tree texture
in it. I wanna make a script that switch the high def texture by the low one on several objects.
i made a script which store map filename, change the path to reapply it in diffusemap and opacitymap slots.
But it return me an error.

This is my script

for obj in selection do
Diffmap = filenamefrompath (obj.material.diffusemap.filename)
Opacmap = filenamefrompath (obj.material.opacitymap.filename)
thePath = "F:\Maps\Vegetation\Trees\Low\"

obj.material.diffusemap.filename = thePath + Diffmap
obj.material.opacitymap.filename = thePath + Opacmap

This the error :
-- Syntax error: at bad, expected <keyword arg>
-- In line: obj.material.diffusemap.filename = "F:\M

CGTalk Moderation
03 March 2008, 04:02 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.