Open proteus2000 opened 2 months ago
Screenshot
A tuple is just an immutable list. There's probably a node out there capable of indexing lists, but here's a quick and dirty standalone node you can put in custom_nodes/vhs_filenames.py which will do the trick.
class SELECT_VHS_FILENAME:
@classmethod
def INPUT_TYPES(s):
return {"required": {"filenames": ("VHS_FILENAMES",), "index": ("INT", {"default": -1, "step": 1, "min": -1})}}
RETURN_TYPES = ("STRING",)
RETURN_NAMES =("Filename",)
CATEGORY = "Video Helper Suite 🎥🅥🅗🅢"
FUNCTION = "select_filename"
def select_filename(self, filenames, index):
return (filenames[1][index],)
NODE_CLASS_MAPPINGS = {
"SELECT_VHS_FILENAME": SELECT_VHS_FILENAME,
}
wow thanks alot. will try that out
This works great, thank you @AustinMroz @Kosinkadink Can you add an official node that does this... =]
Hi
this is not really an issue. more like a question/ request.
i would like to get the output of the video combine node called filenames as a string. it seems it is a "tuple". do you have an idea how to convert the png and the mp4 filenames to a strings with existing nodes. Or would it be possible to add extra string outputs containing the filenames to the node? would be helpful to directly open files from disk by copy/paste in explorer. and useful to use text in a more complex workflow. Thank you, Boris