Skip to content

Commit 9dff4d6

Browse files
committed
Add method to have section group start collapsed
Remove duplicate line
1 parent bf2a940 commit 9dff4d6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

videohelpersuite/documentation.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@ def image(src):
44
'VHS_VideoCombine': ['Video Combine', '<div id=VHS_shortdesc style="font-size: .8em">Combine an image sequence into a video</div>', {
55
'Inputs': {'images': 'The images to be turned into a video','audio':'(optional) audio to add to the video','meta_batch': '(optional) Connect to a Meta Batch manager to divide extremely long image sequences into sub batches. See the documentation for Meta Batch Manager','vae':'(optional) If provided, the node will take latents as input instead of images. This drastically reduces the required RAM (not VRAM) required when working with very long sequences'},
66
'Widgets':{'frame_rate': 'The frame rate which will be used for the output video. Consider converting this to an input and connecting this to a load Video with Video Info(Loaded)->fps. When including audio, failure to properly set this will result in audio desync', 'loop_count': 'The number of additional times the video should repeat.', 'filename_prefix': 'A prefix to add to the name of the output filename. This can include subfolders or format strings.', 'format': 'The output format to use. Formats starting with, \'image\' are saved with PIL, but formats starting with \'video\' utilize the video_formats system. \'video\' options require ffmpeg and selecting one frequently adds additional options to the node.', 'pingpong': 'Play the video normally, then repeat the video in reverse so that it \'pingpongs\' back and forth. This is frequently used to minimize the appearance of skips on very short animations.', 'save_output': 'Specifies if output files should be saved to the output folder, or the temporary output folder'},
7-
'Common Format Widgets': {'crf': 'Determines how much to prioritize quality over filesize. Numbers vary between formats, but on each format that includes it, the default value provides visually loss less output', 'pix_fmt': ['The pixel format to use for output. Alternative options will often have higher quality at the cost of increased file size and reduced compatibility with external software.', {'yuv420p': 'The most common and default format', 'yuv420p10le': 'Use 10 bit color depth. This can improve color quality when combined with 16bit input color depth', 'yuva420p': 'Include transparency in the output video'}], 'input_color_depth': 'VHS supports outputting 16bit images. While this produces higher quality output, the difference usually isn\'t visible without postprocessing and it significantly increases file size and processing time.', 'save_metadata': 'Determines if metadata for the workflow should be included in the output video file'}}]
7+
'Common Format Widgets': {'crf': 'Determines how much to prioritize quality over filesize. Numbers vary between formats, but on each format that includes it, the default value provides visually loss less output', 'pix_fmt': ['The pixel format to use for output. Alternative options will often have higher quality at the cost of increased file size and reduced compatibility with external software.', {'yuv420p': 'The most common and default format', 'yuv420p10le': 'Use 10 bit color depth. This can improve color quality when combined with 16bit input color depth', 'yuva420p': 'Include transparency in the output video', 'collapsed': True}], 'input_color_depth': 'VHS supports outputting 16bit images. While this produces higher quality output, the difference usually isn\'t visible without postprocessing and it significantly increases file size and processing time.', 'save_metadata': 'Determines if metadata for the workflow should be included in the output video file'}}]
88
}
99

1010
sizes = ['1.4','1.2','1']
1111
def as_html(entry, depth=0):
1212
if isinstance(entry, dict):
1313
size = 0.8 if depth < 2 else 1
1414
html = ''
15-
for k in entry:
16-
#html += f'<{tag} title={k}>{k}: {as_html(entry[k], depth=depth+1)}</{tag}>'
17-
html += f'<div vhs_title={k} style=\"display: flex; font-size: {size}em\" class=\"VHS_collapse\"><div style=\"color: #AAA; height: 1.5em\">[-]</div><div>{k}: {as_html(entry[k], depth=depth+1)}</div></div>'
15+
if "collapsed" in entry:
16+
entry.pop("collapsed")
17+
for k in entry:
18+
html += f'<div vhs_title={k} style=\"display: flex; font-size: {size}em\" class=\"VHS_collapse\"><div style=\"color: #AAA; height: 1.5em\">[+]</div><div style=\"overflow-y: hidden; height: 1.5em; color: #CCC;\">{k}: {as_html(entry[k], depth=depth+1)}</div></div>'
19+
else:
20+
for k in entry:
21+
html += f'<div vhs_title={k} style=\"display: flex; font-size: {size}em\" class=\"VHS_collapse\"><div style=\"color: #AAA; height: 1.5em\">[-]</div><div>{k}: {as_html(entry[k], depth=depth+1)}</div></div>'
1822
return html
1923
if isinstance(entry, list):
2024
html = ''

web/js/VHS.core.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ function initHelpDOM() {
219219
el.children[0].innerHTML = '[+]'
220220
el.children[1].style.overflowY = 'hidden'
221221
el.children[1].style.height = '1.5em'
222-
el.children[1].style.height = '1.5em'
223222
el.children[1].style.color = '#CCC'
224223
} else {
225224
el.children[0].innerHTML = '[-]'

0 commit comments

Comments
 (0)