Rename 'Node Combiner' to 'Node Collector' and port the old nodes over. Add context outputs to context switch so we don't have to go through another context. Offset the reroute by 5 so it lines up with the grid.

This commit is contained in:
rgthree
2023-08-26 15:44:06 -04:00
parent d420762509
commit be0aba486a
13 changed files with 259 additions and 171 deletions
+13 -10
View File
@@ -20,18 +20,21 @@ class RgthreeContextSwitch:
},
}
RETURN_TYPES = ("RGTHREE_CONTEXT",)
RETURN_NAMES = ("CONTEXT",)
RETURN_TYPES = ("RGTHREE_CONTEXT", "MODEL", "CLIP", "VAE", "CONDITIONING", "CONDITIONING", "LATENT", "IMAGE", "INT",)
RETURN_NAMES = ("CONTEXT", "MODEL", "CLIP", "VAE", "POSITIVE", "NEGATIVE", "LATENT", "IMAGE", "SEED",)
FUNCTION = "switch"
def switch(self, ctx_01=None, ctx_02=None, ctx_03=None, ctx_04=None, prompt=None):
ctx=None
if ctx_01 != None:
return (ctx_01,)
if ctx_02 != None:
return (ctx_02,)
if ctx_03 != None:
return (ctx_03,)
if ctx_04 != None:
return (ctx_04,)
return (None,)
ctx = ctx_01
elif ctx_02 != None:
ctx = ctx_02
elif ctx_03 != None:
ctx = ctx_03
elif ctx_04 != None:
ctx = ctx_04
if ctx != None:
return (ctx, ctx['model'], ctx['clip'], ctx['vae'], ctx['positive'], ctx['negative'], ctx['latent'], ctx['images'], ctx['seed'],)
return (None,None,None,None,None,None,None,None,None,)