File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
4846def 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.
9290def 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
109105def generatePanel (args : adsk .core .CommandEventArgs ):
110- global OPTIONS
111106 try :
112107 des = adsk .fusion .Design .cast (app .activeProduct )
113108 if des .designType == 0 :
You can’t perform that action at this time.
0 commit comments