From 38bc629dc4f774372f206dbf4f0148f8b035fa44 Mon Sep 17 00:00:00 2001 From: Azalea Colburn Date: Tue, 20 Aug 2024 09:59:16 -0700 Subject: [PATCH 1/3] add catch for no robot being avaliable --- .../SynthesisFusionAddin/src/UI/ConfigCommand.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py index c50c7feed..073c172d9 100644 --- a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py +++ b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py @@ -5,6 +5,7 @@ import os import pathlib from enum import Enum +from typing import List import adsk.core import adsk.fusion @@ -312,9 +313,17 @@ def notify(self, args): savepath = processedFileName adsk.doEvents() + design = gm.app.activeDocument.design - name = design.rootComponent.name.rsplit(" ", 1)[0] - version = design.rootComponent.name.rsplit(" ", 1)[1] + + name_split: list[str] = design.rootComponent.name.split(" ") + # gm.ui.messageBox("Name Split: " + name_split[0] " " + name_split[1], "Synthesis: Info") + if len(name_split) < 2: + gm.ui.messageBox("Please open the robot design you would like to export", "Synthesis: Error") + return + + name = name_split[0] + version = name_split[1] selectedJoints, selectedWheels = jointConfigTab.getSelectedJointsAndWheels() selectedGamepieces = gamepieceConfigTab.getGamepieces() From 66fcf3b6ad82b3d9e1be860466a40fdbee90adcf Mon Sep 17 00:00:00 2001 From: Azalea Colburn <62953415+azaleacolburn@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:22:33 -0700 Subject: [PATCH 2/3] Remove old import --- exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py | 1 - 1 file changed, 1 deletion(-) diff --git a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py index 073c172d9..4ad21e342 100644 --- a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py +++ b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py @@ -5,7 +5,6 @@ import os import pathlib from enum import Enum -from typing import List import adsk.core import adsk.fusion From a07d65c1029d312bfa6412f16f907fc0d1827e04 Mon Sep 17 00:00:00 2001 From: Brandon Pacewic <92102436+BrandonPacewic@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:45:07 -0700 Subject: [PATCH 3/3] =?UTF-8?q?Remove=20comment=20=C2=AF\=5F(=E3=83=84)=5F?= =?UTF-8?q?/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py | 1 - 1 file changed, 1 deletion(-) diff --git a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py index 4ad21e342..c63bc2ca6 100644 --- a/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py +++ b/exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py @@ -316,7 +316,6 @@ def notify(self, args): design = gm.app.activeDocument.design name_split: list[str] = design.rootComponent.name.split(" ") - # gm.ui.messageBox("Name Split: " + name_split[0] " " + name_split[1], "Synthesis: Info") if len(name_split) < 2: gm.ui.messageBox("Please open the robot design you would like to export", "Synthesis: Error") return