[Closed] Ifl bug file count
Has anyone expirenced and soved this issue…
Using maxscript I create an ifl file with 20 image. I then delete that ifl file and all the images.
I then create a new set of only 5 images with the same ifl name as the first. When I call the mxs command to load the ifl into 3ds max, it still thinks it has 20 images, even though it should only be five now.
How do I fix this.
The inverse of this caps put to. If you create 5 images and an ifl file, then delete all of that and create 20 images and an ifl. When you launch ram player via mxs it thinks there are only 5 images when there really is 20. Why is this ? I’m stumped
Try this snippet of code, run these in this order and you’ll noticed the IFL will not update for the second sequence. It will still attempt to load 30 images even though there are only 5.
capture_viewport filepath 0 30 -- Run first
capture_viewport filepath 0 5 -- Run second
fn capture_viewport filepath start end =
(
local dir = getFilenamePath filepath
local filename = getFilenameFile filepath
local filefilter = pathconfig.appendpath dir filename
local files = getFiles (filefilter + "*" + (getFilenameType filepath))
-- delete any pre existing files
for f in files do deleteFile f
-- capture scene
view_size = getViewSize()
temp_bmp = bitmap view_size.x view_size.y gamma:1.0 filename:filepath
for t = start to end do
(
sliderTime = t
temp_bmp = bitmap view_size.x view_size.y gamma:1.0 filename:filepath
dib = gw.getViewportDib()
pasteBitmap dib temp_bmp (box2 0 0 view_size.x view_size.y) [0,0]
b = save temp_bmp frame:t
close temp_bmp
)
-- open in ram player
local dir = getFilenamePath filepath
local filename = getFilenameFile filepath
local filefilter = pathconfig.appendpath dir filename
local files = getFiles (filefilter + "*" + (getFilenameType filepath))
local theIfl = pathconfig.appendpath dir (filename + ".ifl")
local file_handle = createFile theIfl
for f in files do format "%
" (filenameFromPath f) to:file_handle
close file_handle
RAMPlayer (theIfl) ""
)
filepath = (getDir #preview)+"/test.jpg"
capture_viewport filepath 0 30 -- Run first
-- capture_viewport filepath 0 5 -- Run second
Ive never found a fix for this. It was causing issues when loading images for me into max’s ram player. My work around for my custom playblast tool was to create a string suffix filename made from a combination of the date and time (filename_9191118.ifl), and if I wanted to delete it, I just call via wildcard to ignore the suffix and blow it away.