baotd86
02-13-2012, 09: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 test2.zip)
Who can help me finding errors ? :(
Thanks so much :)
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 test2.zip)
Who can help me finding errors ? :(
Thanks so much :)
