dynamicprompts icon indicating copy to clipboard operation
dynamicprompts copied to clipboard

If a wildcard is set to 0 disable another wildcard?

Open DivanoDova opened this issue 2 years ago • 3 comments

Is there a way to disable another wildcard if the another one is set to 0

For Example if have this prompt: {0-2$$__mywildcard/chairs__} {0-2$$__mywildcard/colors__}, And i want to avoid using __mywildcard/colors__ if theres is no __mywildcard/chairs__

So what i need is a way to put 0 to __mywildcard/colors__ if __mywildcard/chairs__ is put to 0

Thanks

DivanoDova avatar Apr 09 '23 14:04 DivanoDova

It's not exactly the same, but

{0-2$$__mywildcard/chairs__ __mywildcard/colors__}

would give you 0 to 2 repetitions of chair + color – would that work?

akx avatar Apr 12 '23 06:04 akx

It's not exactly the same, but

{0-2$$__mywildcard/chairs__ __mywildcard/colors__}

would give you 0 to 2 repetitions of chair + color – would that work?

I just tried to do this but it seems to always return one chair and one colors never 0 or 2

DivanoDova avatar Apr 13 '23 16:04 DivanoDova

The reason why that doesn't work is because the variant wildcard syntax only works for wildcards, not other tokens, i.e. {0-2$$_mywildcard/chairs__} works but {0-2$$_mywildcard/chairs__ anything_else_here} won't

I don't think we have a solution for this yet.

adieyal avatar Apr 15 '23 10:04 adieyal