VALUE: Angle


#1

Angle between two vectors, with a third input for origin vector, and a switch to convert the radians to degrees.

[code](–MAGMAFLOW2–
global MagmaFlowEditor_EditBLOPHistory = #()
node16 = magmaNode.createNode “BLOP”
magmaNode.setNumNodeInputs node16 4
magmaNode.setNumNodeOutputs node16 1
magmaNode.DeclareExtensionProperty node16 “BLOPInputSocketName1”
magmaNode.SetNodeProperty node16 “BLOPInputSocketName1” “Vector A”
magmaNode.DeclareExtensionProperty node16 “BLOPInputSocketName2”
magmaNode.SetNodeProperty node16 “BLOPInputSocketName2” “Vector B”
magmaNode.DeclareExtensionProperty node16 “BLOPInputSocketName3”
magmaNode.SetNodeProperty node16 “BLOPInputSocketName3” “Origin Vector”
magmaNode.DeclareExtensionProperty node16 “BLOPInputSocketName4”
magmaNode.SetNodeProperty node16 “BLOPInputSocketName4” “RadToDeg”
magmaNode.DeclareExtensionProperty node16 “BLOPOutputSocketName2”
magmaNode.SetNodeProperty node16 “BLOPOutputSocketName2” “Angle”
magmaNode.DeclareExtensionProperty node16 “InputSocketSeparators”
magmaNode.SetNodeProperty node16 “InputSocketSeparators” #(4, 3)
magmaNode.DeclareExtensionProperty node16 “Position”
magmaNode.SetNodeProperty node16 “Position” [690,270]
magmaNode.DeclareExtensionProperty node16 “Selected”
magmaNode.SetNodeProperty node16 “Selected” true

magmaNode.PushEditableBLOP node16
node6 = magmaNode.createNode “Subtract”
magmaNode.setNumNodeInputs node6 2
magmaNode.setNumNodeOutputs node6 1
magmaNode.setNodeInputDefaultValue node6 1 1.0
magmaNode.setNodeInputDefaultValue node6 2 0.0
magmaNode.DeclareExtensionProperty node6 “EditorPan”
magmaNode.SetNodeProperty node6 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node6 “EditorZoom”
magmaNode.SetNodeProperty node6 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node6 “Position”
magmaNode.SetNodeProperty node6 “Position” [490,330]

node7 = magmaNode.createNode “Subtract”
magmaNode.setNumNodeInputs node7 2
magmaNode.setNumNodeOutputs node7 1
magmaNode.setNodeInputDefaultValue node7 1 1.0
magmaNode.setNodeInputDefaultValue node7 2 0.0
magmaNode.DeclareExtensionProperty node7 “EditorPan”
magmaNode.SetNodeProperty node7 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node7 “EditorZoom”
magmaNode.SetNodeProperty node7 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node7 “Position”
magmaNode.SetNodeProperty node7 “Position” [490,260]

node8 = magmaNode.createNode “VectorDot”
magmaNode.setNumNodeInputs node8 2
magmaNode.setNumNodeOutputs node8 1
magmaNode.DeclareExtensionProperty node8 “EditorPan”
magmaNode.SetNodeProperty node8 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node8 “EditorZoom”
magmaNode.SetNodeProperty node8 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node8 “Position”
magmaNode.SetNodeProperty node8 “Position” [750,270]

node9 = magmaNode.createNode “ACos”
magmaNode.setNumNodeInputs node9 1
magmaNode.setNumNodeOutputs node9 1
magmaNode.DeclareExtensionProperty node9 “EditorPan”
magmaNode.SetNodeProperty node9 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node9 “EditorZoom”
magmaNode.SetNodeProperty node9 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node9 “Position”
magmaNode.SetNodeProperty node9 “Position” [890,270]

node13 = magmaNode.createNode “Normalize”
magmaNode.setNumNodeInputs node13 1
magmaNode.setNumNodeOutputs node13 1
magmaNode.DeclareExtensionProperty node13 “EditorPan”
magmaNode.SetNodeProperty node13 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node13 “EditorZoom”
magmaNode.SetNodeProperty node13 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node13 “Position”
magmaNode.SetNodeProperty node13 “Position” [620,270]

node14 = magmaNode.createNode “Normalize”
magmaNode.setNumNodeInputs node14 1
magmaNode.setNumNodeOutputs node14 1
magmaNode.DeclareExtensionProperty node14 “EditorPan”
magmaNode.SetNodeProperty node14 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node14 “EditorZoom”
magmaNode.SetNodeProperty node14 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node14 “Position”
magmaNode.SetNodeProperty node14 “Position” [620,330]

node15 = magmaNode.createNode “Multiply”
magmaNode.setNumNodeInputs node15 2
magmaNode.setNumNodeOutputs node15 1
magmaNode.setNodeInputDefaultValue node15 1 1.0
magmaNode.setNodeInputDefaultValue node15 2 57.2958
magmaNode.DeclareExtensionProperty node15 “EditorPan”
magmaNode.SetNodeProperty node15 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node15 “EditorZoom”
magmaNode.SetNodeProperty node15 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node15 “Position”
magmaNode.SetNodeProperty node15 “Position” [890,190]

node43 = magmaNode.createNode “ToFloat”
magmaNode.setNumNodeInputs node43 1
magmaNode.setNumNodeOutputs node43 1
magmaNode.DeclareExtensionProperty node43 “EditorPan”
magmaNode.SetNodeProperty node43 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node43 “EditorZoom”
magmaNode.SetNodeProperty node43 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node43 “Position”
magmaNode.SetNodeProperty node43 “Position” [1090,390]
magmaNode.DeclareExtensionProperty node43 “Selected”
magmaNode.SetNodeProperty node43 “Selected” true

node38 = magmaNode.createNode “Switch”
magmaNode.setNumNodeInputs node38 3
magmaNode.setNumNodeOutputs node38 1
magmaNode.setNodeInputDefaultValue node38 3 1
magmaNode.DeclareExtensionProperty node38 “EditorPan”
magmaNode.SetNodeProperty node38 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node38 “EditorZoom”
magmaNode.SetNodeProperty node38 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node38 “Position”
magmaNode.SetNodeProperty node38 “Position” [1090,210]

node42 = magmaNode.createNode “Greater”
magmaNode.setNumNodeInputs node42 2
magmaNode.setNumNodeOutputs node42 1
magmaNode.setNodeInputDefaultValue node42 2 0.0
magmaNode.DeclareExtensionProperty node42 “EditorPan”
magmaNode.SetNodeProperty node42 “EditorPan” [-413,-120]
magmaNode.DeclareExtensionProperty node42 “EditorZoom”
magmaNode.SetNodeProperty node42 “EditorZoom” 1.0
magmaNode.DeclareExtensionProperty node42 “Position”
magmaNode.SetNodeProperty node42 “Position” [1090,310]

magmaNode.setNodeInput node6 1 (magmaNode.GetNodeInput (magmaNode.CurrentBLOP) 2)[1] 2
magmaNode.setNodeInput node6 2 (magmaNode.GetNodeInput (magmaNode.CurrentBLOP) 3)[1] 3
magmaNode.setNodeInput node7 1 (magmaNode.GetNodeInput (magmaNode.CurrentBLOP) 1)[1] 1
magmaNode.setNodeInput node7 2 (magmaNode.GetNodeInput (magmaNode.CurrentBLOP) 3)[1] 3
try(magmaNode.setNodeInput node8 1 node13 1)catch()
try(magmaNode.setNodeInput node8 2 node14 1)catch()
try(magmaNode.setNodeInput node9 1 node8 1)catch()
try(magmaNode.setNodeInput node13 1 node7 1)catch()
try(magmaNode.setNodeInput node14 1 node6 1)catch()
try(magmaNode.setNodeInput node15 1 node9 1)catch()
magmaNode.setNodeInput node15 2 -1 1
magmaNode.setNodeInput node43 1 (magmaNode.GetNodeInput (magmaNode.CurrentBLOP) 4)[1] 4
try(magmaNode.setNodeInput node38 1 node15 1)catch()
try(magmaNode.setNodeInput node38 2 node9 1)catch()
try(magmaNode.setNodeInput node38 3 node42 1)catch()
try(magmaNode.setNodeInput node42 1 node43 1)catch()
magmaNode.setNodeInput node42 2 -1 1
magmaNode.setOutput 1 node38 1
magmaNode.PopEditableBLOP()

try(magmaNode.setNodeInput node16 1 node3 1)catch()
try(magmaNode.setNodeInput node16 2 node5 1)catch()
try(magmaNode.setNodeInput node16 3 node1 1)catch()
try(magmaNode.setNodeInput node16 4 node34 1)catch()

)[/code]