Notifications
Clear all
[Closed] Help me chek error script
Feb 13, 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 : %
" itemKey
format "Time : %
" itemKey.Time
)
)
)
if count > 0 then
(
print filename
format "%
" 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
2 Replies
Feb 13, 2012 10:17 am
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.