Skip to content

Commit 6e5930c

Browse files
authored
[API] Add sockets to custom widgets by default (#3548)
1 parent 6151d48 commit 6e5930c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/litegraphService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import {
4141

4242
import { useExtensionService } from './extensionService'
4343

44-
const PRIMITIVE_TYPES = new Set(['INT', 'FLOAT', 'BOOLEAN', 'STRING', 'COMBO'])
4544
export const CONFIG = Symbol()
4645
export const GET_CONFIG = Symbol()
4746

@@ -124,7 +123,8 @@ export const useLitegraphService = () => {
124123
}
125124

126125
/**
127-
* @internal Add a widget to the node. For primitive types, an input socket is also added.
126+
* @internal Add a widget to the node. For both primitive types and custom widgets
127+
* (unless `socketless`), an input socket is also added.
128128
*/
129129
#addInputWidget(inputSpec: InputSpec) {
130130
const inputName = inputSpec.name
@@ -152,7 +152,7 @@ export const useLitegraphService = () => {
152152
})
153153
}
154154

155-
if (PRIMITIVE_TYPES.has(inputSpec.type)) {
155+
if (!widget?.options?.socketless) {
156156
const inputSpecV1 = transformInputSpecV2ToV1(inputSpec)
157157
this.addInput(inputName, inputSpec.type, {
158158
shape: inputSpec.isOptional ? RenderShape.HollowCircle : undefined,

0 commit comments

Comments
 (0)