
- Posts: 4
- Joined: Fri Nov 03, 2017 5:00 pm
Jeff Kee wrote:Is this currently possible, or is there a way to access this with a script or plugin?
So you know, I have tried to use expressions, but there are too many values to pipe in my animations, but I've figured out how to simplify the process with nodes. I just need to access the value input/output of any node value.
{
Tools = ordered() {
Saver1 = Saver {
CtrlWZoom = false,
Inputs = {
ProcessWhenBlendIs00 = Input { Value = 0, },
Clip = Input {
Value = Clip {
Filename = "Previews:/Fusion/WirelessBackroundNodeRender.0.png",
FormatID = "PNGFormat",
Length = 0,
Saving = true,
TrimIn = 0,
ExtendFirst = 0,
ExtendLast = 0,
Loop = 1,
AspectMode = 0,
Depth = 0,
GlobalStart = -2000000000,
GlobalEnd = 0
},
},
CreateDir = Input { Value = 1, },
OutputFormat = Input { Value = FuID { "PNGFormat" }, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Input = Input {
SourceOp = "WirelessLink1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 825, 49.5 } },
},
WirelessLink1 = Fuse.Wireless {
Inputs = {
Input = Input {
SourceOp = "Background1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 715, 49.5 } },
},
Note1 = Note {
Inputs = {
Comments = Input { Value = "This composite shows how a wirelessLink node can be used to connect a Background node to a Saver node.\n\n", }
},
ViewInfo = StickyNoteInfo {
Pos = { 440, -115.5 },
Flags = {
Expanded = true
},
Size = { 496.558, 125.998 }
},
},
Background1 = Background {
Inputs = {
GlobalOut = Input { Value = 0, },
Width = Input { Value = 3840, },
Height = Input { Value = 1920, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Type = Input { Value = FuID { "Corner" }, },
TopLeftRed = Input { Value = 1, },
TopRightRed = Input { Value = 0.206, },
BottomLeftRed = Input { Value = 0.675, },
BottomRightRed = Input { Value = 0.106, },
},
ViewInfo = OperatorInfo { Pos = { 440, 49.5 } },
}
}
}
UserControls = ordered() {
DataSource = {
LINKID_DataType = "Image",
INP_Default = 0,
IC_ControlPage = 1,
INPID_InputControl = "ImageControl",
LINKS_Name = "DataSource",
}
}
Ivan Ivanov wrote:You da man, Andrew
There may be some shorter cuts sometimes to some of the issues you elaborate on (known to some long time Fu users by way of "cheating" the obvious ways of using the Fu features), but the level of commitment you demonstrate in your posts and the depths and thorough explanations you go into, especially regarding coding/scripting are unparalleled, exhausting and enlightening. Keep it Up!
Jeff Kee wrote:Is there anyone who could help make this a reality?
--[[
NumberOp.Fuse
Fuse that performs operations on scalar number inputs.
--]]
version = "version .11 (Aug 28, 2016)"
--[[
Written by Chad Capeland (chad[REMOVE-ME]@indicated.com)
Copyright (c) 2016 Indicated, LLC
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is
included verbatim in any distributions. Additionally, the authors grant
permission to modify this software and its documentation for any
purpose, provided that such modifications are not distributed without
the explicit consent of the authors and that existing copyright notices
are retained in all copies.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES
THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND
DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
--]]
FuRegisterClass("NumberOperator", CT_Tool, {
REGS_Category = "Fuses",
REGS_OpIconString = "fNOp",
REGS_OpDescription = "Number Operator Fuse",
REG_NoMotionBlurCtrls = true,
REG_OpNoMask = true,
REGID_DataType = "Number",
REGID_InputDataType = "Number",
REG_NoBlendCtrls = true,
REG_NoObjMatCtrls = true,
REG_NoCommonCtrls = true,
--REG_Fuse_NoEdit = true,
--REG_Fuse_NoReload = true,
--REG_Fuse_TilePic = NumberOperatorFusepic
})
function Create()
InOp= self:AddInput("Operation ", "Operation", {
LINKID_DataType = "Number",
INPID_InputControl = "ComboControl",
INP_Default = 0.0,
INP_Integer = true,
{ CCS_AddString = "Add", }, --0
{ CCS_AddString = "Subtract A-B", },
{ CCS_AddString = "Multiply", },
{ CCS_AddString = "Divide A/B", },
{ CCS_AddString = "Min", },
{ CCS_AddString = "Max", }, --5
{ CCS_AddString = "Average", },
{ CCS_AddString = "Difference", },
{ CCS_AddString = "Modulo A/B", },
{ CCS_AddString = "Power A^B", },
{ CCS_AddString = "Arc Tangent A/B", }, --10
{ CCS_AddString = "----------", },
{ CCS_AddString = "Sine", },
{ CCS_AddString = "Cosine", },
{ CCS_AddString = "Tangent", },
{ CCS_AddString = "Arc Sine", }, --15
{ CCS_AddString = "Arc Cosine", },
{ CCS_AddString = "Arc Tangent", },
{ CCS_AddString = "Log", },
{ CCS_AddString = "Log 10", },
{ CCS_AddString = "Exponential", }, --20
{ CCS_AddString = "Degrees to Radians", },
{ CCS_AddString = "Radians to Degrees", },
{ CCS_AddString = "Absolute Value", },
{ CCS_AddString = "Ceiling", },
{ CCS_AddString = "Floor", }, --25
{ CCS_AddString = "Square Root", },
{ CCS_AddString = "Reciprocal", },
{ CCS_AddString = "Negate", },
{ CCS_AddString = "Clamp 0-1", },
})
InNumA = self:AddInput("Number A", "NumberA", {
LINKID_DataType = "Number",
LINK_Main = 1,
INP_Required = true,
})
InNumB = self:AddInput("Number B", "NumberB", {
LINKID_DataType = "Number",
LINK_Main = 2,
INP_Required = false,
})
--[[
InNumC = self:AddInput("Number C", "NumberC", {
LINKID_DataType = "Number",
LINK_Main = 3,
INP_Required = false,
IC_Visible = false,
})
--]]
OutN = self:AddOutput("Output", "Output", {
LINKID_DataType = "Number",
LINK_Main = 1,
})
InLabel = self:AddInput(version, "version", {
LINKID_DataType = "Text",
INPID_InputControl = "LabelControl",
INP_External = false,
INP_Passive = true,
})
end
--[[
function PreCalcProcess(req)
Process(req)
end
--]]
function Process(req)
local Op = InOp:GetValue(req).Value
local inA = InNumA:GetValue(req).Value
local inB = InNumB:GetValue(req).Value
--print (inA)
--print (inB)
if Op == 0 then --Add
out = inA + inB
elseif Op == 1 then --Subtract
out = inA - inB
elseif Op == 2 then --Multiply
out = inA * inB
elseif Op == 3 then --Divide
out = inA / inB
elseif Op == 4 then --Min
out = math.min(inA, inB)
elseif Op == 5 then --Max
out = math.max(inA, inB)
elseif Op == 6 then --Average
out = (inA + inB)/2
elseif Op == 7 then --Difference
out = math.abs(inA - inB)
elseif Op == 8 then --Mod
out = math.mod(inA, inB)
elseif Op == 9 then --Power
out = math.pow(inA, inB)
elseif Op == 10 then --atan2
out = math.atan2(inA, inB)
elseif Op == 11 then -- (----------) easter egg: divider returns pi
out = math.pi
elseif Op == 12 then --Sin
out = math.sin(inA)
elseif Op == 13 then --Cos
out = math.cos(inA)
elseif Op == 14 then --Tan
out = math.tan(inA)
elseif Op == 15 then --ASin
out = math.asin(inA)
elseif Op == 16 then --ACos
out = math.acos(inA)
elseif Op == 17 then --ATan
out = math.atan(inA)
elseif Op == 18 then --Log
out = math.log(inA)
elseif Op == 19 then --Log10
out = math.log10(inA)
elseif Op == 20 then --Exp
out = math.exp(inA)
elseif Op == 21 then --Rad
out = math.rad(inA)
elseif Op == 22 then --Deg
out = math.deg(inA)
elseif Op == 23 then --Abs
out = math.abs(inA)
elseif Op == 24 then --Ceil
out = math.ceil(inA)
elseif Op == 25 then --Floor
out = math.floor(inA)
elseif Op == 26 then --Sqrt
out = math.sqrt(inA)
elseif Op == 27 then --Reciprocal
out = 1/inA
elseif Op == 28 then --Negate
out = 1-inA
elseif Op == 29 then --Clamp
if inA > 1 then
out = 1
elseif inA < 0 then
out = 0
else
out = inA
end
end
OutN:Set(req, out)
end
Users browsing this forum: ningbokennys, pykawka and 7 guests