@@ -1950,7 +1950,7 @@ export class LGraphNode
1950
1950
try {
1951
1951
this . removeWidget ( widget )
1952
1952
} catch ( error ) {
1953
- console . debug ( 'Failed to remove widget' , error )
1953
+ console . error ( 'Failed to remove widget' , error )
1954
1954
}
1955
1955
}
1956
1956
@@ -2583,12 +2583,7 @@ export class LGraphNode
2583
2583
if ( slotIndex !== undefined )
2584
2584
return this . connect ( slot , target_node , slotIndex , optsIn ?. afterRerouteId )
2585
2585
2586
- console . debug (
2587
- '[connectByType]: no way to connect type:' ,
2588
- target_slotType ,
2589
- 'to node:' ,
2590
- target_node
2591
- )
2586
+ // No compatible slot found - connection not possible
2592
2587
return null
2593
2588
}
2594
2589
@@ -2621,7 +2616,7 @@ export class LGraphNode
2621
2616
if ( slotIndex !== undefined )
2622
2617
return source_node . connect ( slotIndex , this , slot , optsIn ?. afterRerouteId )
2623
2618
2624
- console . debug (
2619
+ console . error (
2625
2620
'[connectByType]: no way to connect type:' ,
2626
2621
source_slotType ,
2627
2622
'to node:' ,
@@ -2661,7 +2656,7 @@ export class LGraphNode
2661
2656
if ( ! graph ) {
2662
2657
// could be connected before adding it to a graph
2663
2658
// due to link ids being associated with graphs
2664
- console . log (
2659
+ console . error (
2665
2660
"Connect: Error, node doesn't belong to any graph. Nodes must be added first to a graph before connecting them."
2666
2661
)
2667
2662
return null
@@ -2672,11 +2667,12 @@ export class LGraphNode
2672
2667
slot = this . findOutputSlot ( slot )
2673
2668
if ( slot == - 1 ) {
2674
2669
if ( LiteGraph . debug )
2675
- console . log ( `Connect: Error, no slot of name ${ slot } ` )
2670
+ console . error ( `Connect: Error, no slot of name ${ slot } ` )
2676
2671
return null
2677
2672
}
2678
2673
} else if ( ! outputs || slot >= outputs . length ) {
2679
- if ( LiteGraph . debug ) console . log ( 'Connect: Error, slot number not found' )
2674
+ if ( LiteGraph . debug )
2675
+ console . error ( 'Connect: Error, slot number not found' )
2680
2676
return null
2681
2677
}
2682
2678
@@ -2696,7 +2692,7 @@ export class LGraphNode
2696
2692
targetIndex = target_node . findInputSlot ( target_slot )
2697
2693
if ( targetIndex == - 1 ) {
2698
2694
if ( LiteGraph . debug )
2699
- console . log ( `Connect: Error, no slot of name ${ targetIndex } ` )
2695
+ console . error ( `Connect: Error, no slot of name ${ targetIndex } ` )
2700
2696
return null
2701
2697
}
2702
2698
} else if ( target_slot === LiteGraph . EVENT ) {
@@ -2728,7 +2724,8 @@ export class LGraphNode
2728
2724
! target_node . inputs ||
2729
2725
targetIndex >= target_node . inputs . length
2730
2726
) {
2731
- if ( LiteGraph . debug ) console . log ( 'Connect: Error, slot number not found' )
2727
+ if ( LiteGraph . debug )
2728
+ console . error ( 'Connect: Error, slot number not found' )
2732
2729
return null
2733
2730
}
2734
2731
@@ -2955,11 +2952,12 @@ export class LGraphNode
2955
2952
slot = this . findOutputSlot ( slot )
2956
2953
if ( slot == - 1 ) {
2957
2954
if ( LiteGraph . debug )
2958
- console . log ( `Connect: Error, no slot of name ${ slot } ` )
2955
+ console . error ( `Connect: Error, no slot of name ${ slot } ` )
2959
2956
return false
2960
2957
}
2961
2958
} else if ( ! this . outputs || slot >= this . outputs . length ) {
2962
- if ( LiteGraph . debug ) console . log ( 'Connect: Error, slot number not found' )
2959
+ if ( LiteGraph . debug )
2960
+ console . error ( 'Connect: Error, slot number not found' )
2963
2961
return false
2964
2962
}
2965
2963
@@ -3075,19 +3073,19 @@ export class LGraphNode
3075
3073
slot = this . findInputSlot ( slot )
3076
3074
if ( slot == - 1 ) {
3077
3075
if ( LiteGraph . debug )
3078
- console . log ( `Connect: Error, no slot of name ${ slot } ` )
3076
+ console . error ( `Connect: Error, no slot of name ${ slot } ` )
3079
3077
return false
3080
3078
}
3081
3079
} else if ( ! this . inputs || slot >= this . inputs . length ) {
3082
3080
if ( LiteGraph . debug ) {
3083
- console . log ( 'Connect: Error, slot number not found' )
3081
+ console . error ( 'Connect: Error, slot number not found' )
3084
3082
}
3085
3083
return false
3086
3084
}
3087
3085
3088
3086
const input = this . inputs [ slot ]
3089
3087
if ( ! input ) {
3090
- console . debug ( 'disconnectInput: input not found' , slot , this . inputs )
3088
+ console . error ( 'disconnectInput: input not found' , slot , this . inputs )
3091
3089
return false
3092
3090
}
3093
3091
@@ -3116,19 +3114,16 @@ export class LGraphNode
3116
3114
3117
3115
const target_node = graph . getNodeById ( link_info . origin_id )
3118
3116
if ( ! target_node ) {
3119
- console . debug (
3120
- 'disconnectInput: target node not found' ,
3121
- link_info . origin_id
3117
+ console . error (
3118
+ 'disconnectInput: output not found' ,
3119
+ link_info . origin_slot
3122
3120
)
3123
3121
return false
3124
3122
}
3125
3123
3126
3124
const output = target_node . outputs [ link_info . origin_slot ]
3127
3125
if ( ! output ?. links ?. length ) {
3128
- console . debug (
3129
- 'disconnectInput: output not found' ,
3130
- link_info . origin_slot
3131
- )
3126
+ // Output not found - may have been removed
3132
3127
return false
3133
3128
}
3134
3129
0 commit comments