|
61 | 61 | BIN_BASE_FEATURES_GROUP_ID = 'bin_base_features_group' |
62 | 62 | USER_CHANGES_GROUP_ID = 'user_changes_group' |
63 | 63 | PREVIEW_GROUP_ID = 'preview_group' |
| 64 | +INFO_GROUP_ID = 'info_group' |
64 | 65 |
|
65 | 66 | BIN_BASE_WIDTH_UNIT_INPUT_ID = 'base_width_unit' |
66 | 67 | BIN_BASE_LENGTH_UNIT_INPUT_ID = 'base_length_unit' |
|
112 | 113 | SHOW_PREVIEW_INPUT = 'show_preview' |
113 | 114 | SHOW_PREVIEW_MANUAL_INPUT = 'show_preview_manual' |
114 | 115 |
|
| 116 | +INFO_TEXT = ("<b>Help:</b> Info for inputs can be found " |
| 117 | + "<a href=\"https://github.com/Le0Michine/FusionGridfinityGenerator/wiki/Bin-generator-options\">" |
| 118 | + "Here on our GitHub</a>.") |
| 119 | + |
115 | 120 | def defaultUiState(): |
116 | 121 | return InputState( |
117 | 122 | groups={}, |
@@ -153,7 +158,7 @@ def defaultUiState(): |
153 | 158 | # json.dumps(asdict(uiState)) |
154 | 159 |
|
155 | 160 | def getErrorMessage(): |
156 | | - stackTrace = traceback.format_exc(); |
| 161 | + stackTrace = traceback.format_exc() |
157 | 162 | return f"An unknonwn error occurred, please validate your inputs and try again:\n{stackTrace}" |
158 | 163 |
|
159 | 164 | def showErrorInMessageBox(): |
@@ -408,6 +413,9 @@ def command_created(args: adsk.core.CommandCreatedEventArgs): |
408 | 413 | # https://help.autodesk.com/view/fusion360/ENU/?contextId=CommandInputs |
409 | 414 | inputs = args.command.commandInputs |
410 | 415 |
|
| 416 | + infoGroup = inputs.addGroupCommandInput(INFO_GROUP_ID, 'Info') |
| 417 | + infoGroup.children.addTextBoxCommandInput("info_text", "Info", INFO_TEXT, 3, True) |
| 418 | + |
411 | 419 | # Create a value input field and set the default using 1 unit of the default length unit. |
412 | 420 | defaultLengthUnits = app.activeProduct.unitsManager.defaultLengthUnits |
413 | 421 | basicSizesGroup = inputs.addGroupCommandInput(BIN_BASIC_SIZES_GROUP, 'Basic sizes') |
|
0 commit comments