getClipboard
Definition
-- @/=[C]:-1
function getClipboard(...)
Callers
@/lua/ge/extensions/editor/api/camera.lua
local function pasteCameraBookmarkFromClipboard()
local txt = getClipboard()
commands.setFreeCameraTransformJson(txt)
@/lua/ge/extensions/editor/api/valueInspector.lua
-- we always decode json from system cliboard to use it for disabling the Paste item if field name not compatible
local tbl = jsonDecodeSilent(getClipboard(), "ValueInspectorCopyPasteMenu")
local isPasteDisabled = not tbl or copyPasteMenu.fieldType ~= tbl.copiedFieldType
if imgui.IsKeyPressed(imgui.GetKeyIndex(imgui.Key_V)) then
local tbl = jsonDecodeSilent(getClipboard(), "ValueInspectorCopyPasteMenu")
local isPasteDisabled = not tbl or fieldType ~= tbl.copiedFieldType