PDA

View Full Version : newbie easy shit probably...get current scene path


throb
02-11-2005, 08:10 PM
Hey all,
i want to get the current filename and path to the scene.
how does one do that?

also, is there an easy way to upper or lowercase values in a string?

thanks
rob

magicm
02-11-2005, 09:01 PM
Hey all,
i want to get the current filename and path to the scene.
how does one do that?
maxfilepath

also, is there an easy way to upper or lowercase values in a string?
See the attached file for a example function

Cheers,
Martijn

Bobo
02-11-2005, 09:31 PM
Hey all,
i want to get the current filename and path to the scene.
how does one do that?

also, is there an easy way to upper or lowercase values in a string?

thanks
rob

maxFilePath --just the path without file name
maxFileName --just the name without the path

theFullPath = maxFilePath + maxFileName --the complete path

You can then apply the file analysis methods to get to the single parts if the file path came from an external source of a getFiles() call:

getFileNamePath theFullPath --returns just the path without file name
getFileNameFile theFullPath --returns just the file name
getFileNameType theFullPath --returns just the extension
fileNameFromPath theFullPath --returns just file name plus extension without path


I would suggest consulting the MAXScript Reference - the function magicm posted can be found in the Reference as example in the String Values topic and has been cross-referenced from the topic "Online Help Script Examples" > "Scripted Functions" > "UpperCase function"

CGTalk Moderation
02-11-2006, 10:00 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.