• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading cache with maxscript doesn't resize, breaks preview
#3
Yep, my script is :

Code:
TheCacheFile = (theRandomCache + TheCacheString[TheCacheString.count] + "_0000.fxd")

It seems to work sometimes but not all the time. Also I notice that the cache files are written out with the smoke, temperature, velocity and extra detail channels and when I load anything with this method, the fume ui is stating that it's using smoke and fire as it's channels. The preview window doesn't work so would it be worth loading up the fdc file too to set an initial state for the grid with all of the appropriate channels?

The full code I'm using for the fume loading bits is as follows, all of the variables in the first few lines are bits of strings set by maxscript radio buttons so nothing strange.

Code:
TheFumeCacheRoot = (theRootPath + "\\" + TheLetter.selected + "\\" + TheLetter.selected + "_" + TheWindDir + "_" + LoudnessType + "_" + dissipationType + "_" + raiseType + "\\")
            print ("I'm going to load " + theRootPath + "\\" + TheLetter.selected + "\\" + TheLetter.selected + "_" + TheWindDir + "_" + LoudnessType + "_" + dissipationType + "_" + raiseType + "\\")
            TempFumeCachePath = undefined
            TempFumeCachePath = GetDirectories (TheFumeCacheRoot + "\\*")
            
            print ("There are " + TempFumeCachePath.count as string + " subfolders for that cache")
            print TempFumeCachePath
            
            -- Pick a random Cache to load
            
            theRandomCache = TempFumeCachePath[random 1 TempFumeCachePath.count]
            TheCacheString = filterString theRandomCache "\\"
            TheCacheFile = (theRandomCache + TheCacheString[TheCacheString.count] + "_0000.fxd")
            
            TheFumeGrid = FumeFX width:100 length:100 height:100
            TheFumeGrid.SetPath TheCacheFile #(#default,#match)
            TheFumeGrid.SetPath TheCacheFile #(#match)
            TheFumeGrid.offset = slidertime
            
            TheFumeGrid.transform = $.transform
            
            TheFumeRot = eulerangles 90 0 0
            
            Rotate TheFumeGrid TheFumeRot
            in coordsys local move theFumeGrid [0,0,-1.0]
            
            print TheCacheFile

Cheers!

John
  Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)