Eyeon:Script/Reference/Applications/Fuse/Classes/Input/AngleControl
From VFXPedia
< Eyeon:Script | Reference | Applications | Fuse | Classes | Input
Contents |
AngleControl
Description
The AngleControl is an preview control that shows a thin line used to represent the rotation around a specific point. The angle is added to an Input by setting the INPID_PreviewControl attribute to "AngleControl" in the AddInput function's attribute table.
Attributes
ACP_Center input: specifies which input is used to set the position of the angle control in the view. Typically this is an OffsetControl ACP_Radius input : specifies which input is used to set the width of the angle control in the view. Typically this will be a SliderControl.
.
Example
The following example is a very simplified Fuse which uses a crosshair and angle control to transform an image.
FuRegisterClass("SampleAngleControl", CT_Tool, { REGS_Name = "Sample Angle Control", REGS_Category = "Fuses\\Samples", REGS_OpIconString = "SOf", REGS_OpDescription = "SampleOffset", }) function Create() InCenter = self:AddInput("Center", "Center", { LINKID_DataType = "Point", INPID_InputControl = "OffsetControl", INPID_PreviewControl = "CrosshairControl", }) InAngle = self:AddInput("Angle", "Angle", { LINKID_DataType = "Number", INPID_InputControl = "ScrewControl", INPID_PreviewControl = "AngleControl", INP_MinScale = 0.0, INP_MaxScale = 360.0, INP_Default = 0.0, ACP_Center = InCenter, }) InImage = self:AddInput("Input", "Input", { LINKID_DataType = "Image", LINK_Main = 1, }) OutImage = self:AddOutput("Output", "Output", { LINKID_DataType = "Image", LINK_Main = 1, }) end function Process(req) local img = InImage:GetValue(req) local center = InCenter:GetValue(req) local angle = InAngle:GetValue(req).Value out = img:Transform(nil, { XF_XOffset = center.X, XF_YOffset = center.Y, XF_XAxis = 0.5, XF_YAxis = 0.5, XF_XSize = 1, XF_YSize = 1, XF_Angle = angle, XF_EdgeMode = "Black", }) OutImage:Set(req, out) end
Tips for AngleControl (edit)
EyeonTips:Script/Reference/Applications/Fuse/Classes/Input/AngleControl