PtrToId
Definition
-- @/lua/common/extensions/ui/flowgraph/editor_api_luaintf.lua:9
function M.PtrToId(obj)
return obj:id()
end
Callers
@/lua/ge/extensions/editor/flowgraph/main.lua
if ui_flowgraph_editor.ShowNodeContextMenu(self.contextNodeId) then
if not self.mgr.selectedNodes[ui_flowgraph_editor.PtrToId(self.contextNodeId)] then
ui_flowgraph_editor.ClearSelection()
elseif ui_flowgraph_editor.ShowLinkContextMenu(self.contextLinkId) then
if not self.mgr.selectedLinks[ui_flowgraph_editor.PtrToId(self.contextLinkId)] then
ui_flowgraph_editor.ClearSelection()
--im.Begin('asd##contextMenuWrapper')
local node = self.mgr.graph.nodes[ui_flowgraph_editor.PtrToId(self.contextNodeId)]
if node then
if im.BeginPopup("Pin Context Menu") then
local pin = self.mgr.graph:findPin(ui_flowgraph_editor.PtrToId(self.contextPinId))
if pin then
if im.BeginPopup("Link Context Menu") then
local link = self.mgr.graph.links[ui_flowgraph_editor.PtrToId(self.contextLinkId)]
if link then
@/lua/ge/extensions/flowgraph/manager.lua
if ui_flowgraph_editor.QueryNewNode1(pinId) then
originPin = self.graph:findPin(ui_flowgraph_editor.PtrToId(pinId))
end
if ui_flowgraph_editor.QueryNewLink1(startPinId, endPinId) then
local startPin = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local endPin = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
local startPin = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local endPin = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
elseif startPin.chainFlow == true then
local p1 = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local p2 = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
local p1 = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local p2 = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
local replacedLinks = false
if ui_flowgraph_editor.AcceptNewItem2(im.ImVec4(0.5, 1, 0.5, 1), 4) then
local p1 = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local p2 = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
local p1 = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local p2 = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
for k, v in pairs(self.graph.links) do
if ui_flowgraph_editor.AcceptNewItem2(im.ImVec4(0.5, 1, 0.5, 1), 4) then
local p1 = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local p2 = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
local p1 = self.graph:findPin(ui_flowgraph_editor.PtrToId(startPinId))
local p2 = self.graph:findPin(ui_flowgraph_editor.PtrToId(endPinId))
self.graph:createLink(p1, p2)
if ui_flowgraph_editor.QueryNewNode1(pinId) then
self.newLinkPin = self.graph:findPin(ui_flowgraph_editor.PtrToId(pinId))
if self.newLinkPin then
self.createNewNode = true
self.newNodeLinkPin = self.graph:findPin(ui_flowgraph_editor.PtrToId(pinId))
self.fgEditor.nodelib:setNewNodeLinkPin(self.newNodeLinkPin)