GE Lua Documentation

Press F to search!

getAvailablePinTypes

Definition


-- @/lua/ge/extensions/core/flowgraphManager.lua:299

local function getAvailablePinTypes(node)
  local availablePinTypes = { _in = {}, _out = {}}
  if node.pinSchema then
    for _, pin in ipairs(node.pinSchema) do
      if type(pin.type) == 'table' then -- because multiple types per pin are possible
        for i = 1, #pin.type do
          availablePinTypes['_'..pin.dir][pin.type[i]] = true
        end
      else
        availablePinTypes['_'..pin.dir][pin.type] = true
      end
    end
  end

  -- add automatic pins from category system
  if node.category and ui_flowgraph_editor.isFunctionalNode(node.category) and not ui_flowgraph_editor.isSimpleNode(node.category) then
    availablePinTypes['_in']['flow'] = true
    availablePinTypes['_out']['flow'] = true
  end

  return availablePinTypes
end

Callers

@/lua/ge/extensions/core/flowgraphManager.lua
        node.splitPath[#node.splitPath+1] = node.node.name
        node.availablePinTypes = M.getAvailablePinTypes(node.node)
        treeNode.nodes[moduleName] = node
@/lua/ge/extensions/flowgraph/manager.lua
      node.splitPath[#node.splitPath + 1] = node.node.name
      node.availablePinTypes = self.fgMgr.getAvailablePinTypes(node.node)
      treeNode.nodes[moduleName] = node