Skip to content

Commit 7d4c9ae

Browse files
committed
Minor code cleanup
1 parent b3fe5a9 commit 7d4c9ae

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/panelUtils/panel_command.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,16 @@ def log(msg):
3737
futil.log(f"[{CMD_NAME}] {str(msg)}")
3838

3939

40-
def getErrorMessage(
41-
text="An unknown error occurred, please validate your inputs and try again",
42-
):
40+
def getErrorMessage(text="An unknown error occurred, please validate your inputs and try again"):
4341
stackTrace = traceback.format_exc()
4442
return f"{text}:<br>{stackTrace}"
4543

4644

4745
# Named for easy importing into commandDialog/entry.py
4846
def command_created(args: adsk.core.CommandCreatedEventArgs):
4947
log("Command Created Event")
50-
global OPTIONS, INPUTS
5148
OPTIONS.restoreDefaults()
49+
global INPUTS
5250
INPUTS = Inputs(args.command.commandInputs, OPTIONS)
5351

5452
args.command.setDialogMinimumSize(400, 450)
@@ -91,8 +89,6 @@ def onCommandInputChanged(args: adsk.core.InputChangedEventArgs):
9189
# which allows you to verify that all of the inputs are valid and enables the OK button.
9290
def onCommandValidateInput(args: adsk.core.ValidateInputsEventArgs):
9391
log("Validate Input Event")
94-
global INPUTS
95-
9692
args.areInputsValid = INPUTS.isValid
9793

9894
if INPUTS.isValid:
@@ -107,7 +103,6 @@ def onCommandDestroy(args: adsk.core.CommandEventArgs):
107103

108104

109105
def generatePanel(args: adsk.core.CommandEventArgs):
110-
global OPTIONS
111106
try:
112107
des = adsk.fusion.Design.cast(app.activeProduct)
113108
if des.designType == 0:

0 commit comments

Comments
 (0)