|
In my scripted material plugin, I am copying the user-selected bitmap file and setting delegate.TexMain to that copy. As long as my copy of the file exists, all is well. If the file doesn’t exist, I can recreate it on load. But Max complains that the file doesn’t exist, and/or can’t be loaded.
I have:
on load do (
if texMain != undefined then
(
texcopy = copy texMain
texcopy.filename = texMainViewName
save texcopy quiet:true
delegate.TexMain = texcopy
)
)
Max puts up both a Missing External Files dialog and a MaxScript error at the delegate assignment complaining that the bitmap can’t be loaded. I’ve found that if I change the name of the bitmap copy, it works. It appears that Max has already decided that the file doesn’t exist, and even though it does exist when the delegate assignment is executed, it still fails to load the file.
Is there a way to tell Max to re-read the directory, or otherwise make it realize that the file exists?
Thanks,
Mike.
|
|
|