This commit is contained in:
Andrej730
2024-05-16 16:13:22 +05:00
parent e1250f2177
commit 8d4b5d83e1
@@ -60,13 +60,7 @@ class CopyDebugInformation(bpy.types.Operator):
print(text) print(text)
print("-" * 80) print("-" * 80)
if platform.system() == "Windows": context.window_manager.clipboard = text
command = "echo | set /p nul=" + text
elif platform.system() == "Darwin": # for MacOS
command = 'printf "' + text.replace("\n", "\\n").replace('"', "") + '" | pbcopy'
else: # Linux
command = 'printf "' + text.replace("\n", "\\n").replace('"', "") + '" | xclip -selection clipboard'
subprocess.run(command, shell=True, check=True)
return {"FINISHED"} return {"FINISHED"}