Bug in SelectionCommandInput's builtin validation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This post is just a bug report. I am aware that we can use ValidateInputsEventHandler as a workaround
It seems that In Fusion 360 commands, if we have more than one SelectionCommandInputs, only the current SelectionCommandInput (which is highlighted by blue color) decides about validation of all SelectionCommandInputs, just by looking at itself.
Suppose we have the following code and command dialog:
selectionCommandInput1 = inputs.addSelectionInput(commandId + '_selection1', '1st Selection', '') selectionCommandInput1.setSelectionLimits(1, 1)
selectionCommandInput2 = inputs.addSelectionInput(commandId + '_selection2', '2nd Selection', '') selectionCommandInput2.setSelectionLimits(1, 1)
selectionCommandInput3 = inputs.addSelectionInput(commandId + '_selection3', '3rd Selection', '') selectionCommandInput3.setSelectionLimits(1, 1)
First Sample Scenario: One input decides about enabling OK Button
Selecting one entity for just one of the above inputs, makes the command's execution button (OK Button) ebnabled, while the the other 2 inputs do not have the minimum required selection (1 selected entity for each one).
Second Sample Scenario: One input decides about disabling OK Button
Suppose we have selected one entity for each input. So the OK Button is enabled. Now clearing the selection for one of the inputs, makes the OK Button disabled (actually in this scenario the result is correct. the OK Button should become disabled)
The above scenarios are shown in the linked scrrencast.
--------------------
Another issue is that 2 or more SelectionCommandInputs can not share the same selected entity. If we select an entity for one of them, we can not select the same entity for the other SelectionCommandInputs. In some scenarios we need shared entities between the inputs.
Website: https://perceptino.com