Eyeon:Script/Reference/Applications/Fuse/Classes/ScriptOperator/Status
From VFXPedia
Contents |
Summary
The Status member is used to store a string value indicating the current status of the Fuse tool. If the tool is rendering it will indicate the status as "OK". Any other value would indicate that the current request has been aborted. Typically a Fuse will check this periodically to allow it to end rendering gracefully. There are many operations that can abort a render request. For example, changing current time, changing an input control, or pressing ESC will all abort a render.
Example
The following example is a slightly modified version of the Process function from the Gain.Fuse found on the Example Fuses page. Note how the value of self.Status is checked before processing each scanline.
function Process(req) local img = InImage:GetValue(req) local gain = InGain:GetValue(req).Value local out = Image({IMG_Like = img}) local p = Pixel() for y=0,img.Height-1 do if self.Status ~= "OK" then break end for x=0,img.Width-1 do img:GetPixel(x,y, p) p.R = p.R * gain p.G = p.G * gain p.B = p.B * gain out:SetPixel(x,y, p) end self:SetProgress(y/img.Height) end OutImage:Set(req, out) end
Tips for Status (edit)
EyeonTips:Script/Reference/Applications/Fuse/Classes/ScriptOperator/Status