Input and Default value for boolean


I’m making a custom node with a Boolean Input.
The custom Node work if I connect something to my input but I want he work with a default value?

I write:
InputName : bool = false

Someone has an idea? Maybe is not possible to affect default value for a Boolean Input?

InputName:bool dont work.
I’ve no control of my Input type

@Severin I suppose this is what you want

Within the custom node, you do this …

1 Like

Hello Vikram,

It’s what I do but … it’s strange it’s not completely stable. I’ve the same redaction than you, but with boolean it’s work. If a change for an other name after it’s work again???

by the way, if I code:


and put an other type for my input,like a number or a string, it’s work.
""; or 0; for false, anything other for true.

So thank Vikram

1 Like

@Severin It works with other variable names for me.
However your observation about returning true for anything other than “” , 0 and_false_ is correct.
If you feel it’s and issue and have suggestions for improvement please post them here.