GHOST/Wayland: copy & paste image to clipboard support
Adds copy and paste images functionality to and from the image editor in Linux/Wayland clipboard. Currently the only format supported is PNG. Ref: !119117
This commit is contained in:
committed by
Campbell Barton
parent
fff99c2e62
commit
692de6d380
@@ -211,7 +211,16 @@ class IMAGE_MT_image(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
has_image_clipboard = False
|
||||
if sys.platform[:3] == "win":
|
||||
has_image_clipboard = True
|
||||
else:
|
||||
from _bpy import _ghost_backend
|
||||
if _ghost_backend() == 'WAYLAND':
|
||||
has_image_clipboard = True
|
||||
del _ghost_backend
|
||||
|
||||
if has_image_clipboard:
|
||||
layout.operator("image.clipboard_copy", text="Copy")
|
||||
layout.operator("image.clipboard_paste", text="Paste")
|
||||
layout.separator()
|
||||
|
||||
Reference in New Issue
Block a user