Allow fast widget conversion from any node

This commit is contained in:
filtered
2024-10-31 03:28:08 +11:00
parent 74f7311585
commit c684732199

View File

@@ -716,6 +716,9 @@ app.registerExtension({
})
},
async beforeRegisterNodeDef(nodeType, nodeData, app) {
nodeType.prototype.isValidWidgetLink ??=
PrimitiveNode.prototype.isValidWidgetLink
// Add menu options to convert to/from widgets
const origGetExtraMenuOptions = nodeType.prototype.getExtraMenuOptions
nodeType.prototype.convertWidgetToInput = function (widget) {