EyeonTips:Script/Reference/Applications/Fuse/Classes/Request

From VFXPedia

< EyeonTips:Script
Revision as of 17:56, 4 February 2012 by Tilt (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Additional methods from the C++ API that are implemented for Fuses:

  • IsPreCalc(): Returns true if the current request is a precalc request.
  • GetFlags(): Get all the request's flags (IsStampOnly, IsQuick, ...) as bits of an integer. Refer to the file Request.h in the SDK for more information.

Domain of Definition

To use DoD in a fuse, you will need these methods, which have been added in Fusion 6.2 build 897:

  • GetInputDoD(inp): Returns the specified input's DoD. You mustn't access pixel coordinates outside of this when working on the input image data. The canvas color value should be substituted instead, something that GetPixel() won't do for you automatically.
  • GetRoI(): Returns the requested region of interest. You may return an image with a DoD that is larger or smaller, but if you want to gain as much speed as possible, don't waste time calculating pixels outside of this. During precalc requests, this is nil. For regular process requests, this should end up as the ValidWindow attribute of your output image.

Both functions return ImageDomain objects. They are similar to FuRectInt in that they store information about the area that contains valid pixel data. You can access these coordinates using .left, .bottom, .right and .top as if it was a FuRectInt.

Refer to the clMerge and clBC example fuses on how to use these methods.