View Full Version : Help me chek error script

02 February 2012, 10:17 AM
I have a script, it here

thepath = getSavePath()
if thePath != undefined do --if the user did not cancel

theFiles = getFiles (thePath+"\\*.max") --collect all max files in the dir.
report = createFile (thePath +"\\report.txt")

for f in theFiles do --go through all of them
filename = getFileNameFile f
--load the next file
loadMaxFile f
count = 0
for obj in $* do
local aControllers = #(obj.position.controller,obj.rotation.controller,obj.scale.controller)
for itemController in aControllers do
for itemKey in itemController.keys do
count = count + 1
format "Key : % \n" itemKey
format "Time : % \n" itemKey.Time
if count > 0 then
print filename
format "%\n" filename to: report

saveMaxFile f
)--end f loop

resetMaxFile #noPrompt --at the end, you can reset

)--end if

this script used to check keyframes in the max files, but when it test it with 3 files below then it is not working with test_2.max. (i was attached them in
Who can help me finding errors ? :(
Thanks so much :)

02 February 2012, 08:17 AM
who can help me ?
thanks so much

02 February 2012, 02:49 PM
Hi Baotd86,

its probaly because that you are collecting the pos, rot & scaling from the objects in the scene and your test_2.max contains visibilty and material change.
If you would add an animation with an object that is moving, rotating or scaling the keyframes it will read out the keyframes correctly.

CGTalk Moderation
02 February 2012, 02:49 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.