mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
fix saving debug info to clipboard #4675
now we just rely on blender to make it crossplatform
This commit is contained in:
@@ -149,14 +149,7 @@ if sys.modules.get("bpy", None):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
info = format_debug_info(get_debug_info())
|
info = format_debug_info(get_debug_info())
|
||||||
|
context.window_manager.clipboard = 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)
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
class HiddenPanel:
|
class HiddenPanel:
|
||||||
|
|||||||
Reference in New Issue
Block a user