fix saving debug info to clipboard #4675

now we just rely on blender to make it crossplatform
This commit is contained in:
Andrej730
2024-05-16 16:00:38 +05:00
parent a2ee920a5f
commit e1250f2177
+1 -8
View File
@@ -149,14 +149,7 @@ if sys.modules.get("bpy", None):
def execute(self, context):
info = format_debug_info(get_debug_info())
if platform.system() == "Windows":
command = "echo | set /p nul=" + info
elif platform.system() == "Darwin": # for MacOS
command = 'printf "' + info.replace("\n", "\\n").replace('"', "") + '" | pbcopy'
else: # Linux
command = 'printf "' + info.replace("\n", "\\n").replace('"', "") + '" | xclip -selection clipboard'
subprocess.run(command, shell=True, check=True)
context.window_manager.clipboard = info
return {"FINISHED"}
class HiddenPanel: