Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar Buttons #1053

Merged
merged 14 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion exporter/SynthesisFusionAddin/Synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Helper,
MarkingMenu,
ShowAPSAuthCommand,
ShowWebsiteCommand,
)
from .src.UI.Toolbar import Toolbar

Expand Down Expand Up @@ -77,7 +78,9 @@ def stop(_):

path = os.path.abspath(os.path.dirname(__file__))

path_proto_files = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "proto", "proto_out"))
path_proto_files = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "proto", "proto_out")
)

if path in sys.path:
sys.path.remove(path)
Expand Down Expand Up @@ -129,3 +132,13 @@ def register_ui() -> None:
)

gm.elements.append(apsButton)

websiteButton = HUI.HButton(
"Synthesis Website",
work_panel,
lambda *_: True,
ShowWebsiteCommand.ShowWebsiteCommandCreatedHandler,
description=f"Website Test",
command=True,
)
gm.elements.append(websiteButton)
12 changes: 9 additions & 3 deletions exporter/SynthesisFusionAddin/proto/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def getPythonFolder() -> str:
elif system == "Darwin":
pythonFolder = f"{Path(osPath).parents[2]}/bin"
else:
raise ImportError("Unsupported platform! This add-in only supports windows and macos")
raise ImportError(
"Unsupported platform! This add-in only supports windows and macos"
)

logger.debug(f"Python Folder -> {pythonFolder}")
return pythonFolder
Expand Down Expand Up @@ -127,7 +129,9 @@ def installCross(pipDeps: list) -> bool:
]
)
if installResult != 0:
logger.warn(f'Dep installation "{depName}" exited with code "{installResult}"')
logger.warn(
f'Dep installation "{depName}" exited with code "{installResult}"'
)

if system == "Darwin":
pipAntiDeps = ["dataclasses", "typing"]
Expand All @@ -148,7 +152,9 @@ def installCross(pipDeps: list) -> bool:
]
)
if uninstallResult != 0:
logger.warn(f'AntiDep uninstallation "{depName}" exited with code "{uninstallResult}"')
logger.warn(
f'AntiDep uninstallation "{depName}" exited with code "{uninstallResult}"'
)

progressBar.hide()

Expand Down
Loading
Loading