Eyeon:Script/Reference/Applications/Fusion/Classes/ImageCacheManager/IsRoom

From VFXPedia

Jump to: navigation, search

Contents

ImageCacheManager : IsRoom

Arguments

IsRoom(bytes)

  • bytes (required, integer)

The number of bytes to check.

Returns

A boolean indicating whether or not there is room in the cache manager for the number of bytes passed as an argument.

Remarks

This is useful to see how much room there currently is in the cache manager by checking to see if a certain number of bytes will fit without needing to purge/flush.

Requirements

  • eyeonScript 5.0
  • Fusion 5.0

Examples

-- mimics play and then stops a composition after it comes close to filling its cache

-- comp script


cm = fusion.CacheManager

-- if there's not enough room for a few

compAttrs = comp:GetAttrs()

while cm:IsRoom(100000000) == true do

       comp.CurrentTime = comp.CurrentTime+1
       wait(0.5)
       -- Wait while the comp finishes its current render.
       while comp:IsRendering() == true do
              wait(0.5)
       end
       if compAttrs.COMPN_RenderEnd == comop.CurrentTime then break end

end


Tips for IsRoom (edit)

EyeonTips:Script/Reference/Applications/Fusion/Classes/ImageCacheManager/IsRoom