Removed empty progress-bars.

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2023-03-07 04:24:14 +00:00
parent 22894b01c9
commit f64384ee92

View file

@ -134,8 +134,11 @@ def layer(win, call):
passed = time.time() - win.render_runtime.get("started_rendering", 0) passed = time.time() - win.render_runtime.get("started_rendering", 0)
passed = passed*1000000 passed = passed*1000000
longest = passed if win.render_runtime.get("to_render"):
longest = passed
else:
longest = 0
save_folder = the_render["save_folder"] save_folder = the_render["save_folder"]
@ -156,13 +159,13 @@ def layer(win, call):
frame_h = 0 frame_h = 0
if win.render_runtime.get("current_frame", 0) == frame: if win.render_runtime.get("current_frame", 0) == frame and win.render_runtime.get("to_render"):
frame_h = (win.current["h"]-200)/3 * (passed / longest) frame_h = (win.current["h"]-200)/3 * (passed / longest)
frame_h = max(frame_h, frame_w) frame_h = max(frame_h, frame_w)
UI_color.set(layer, win, "node_background") UI_color.set(layer, win, "node_background")
if win.render_runtime.get("current_frame", 0) == frame: if win.render_runtime.get("current_frame", 0) == frame and win.render_runtime.get("to_render"):
UI_color.set(layer, win, "progress_active") UI_color.set(layer, win, "progress_active")
UI_elements.roundrect(layer, win, UI_elements.roundrect(layer, win,
580+(n*frame_w), 580+(n*frame_w),
@ -188,12 +191,12 @@ def layer(win, call):
break break
if win.render_runtime.get("to_render"):
UI_color.set(layer, win, "text_normal") UI_color.set(layer, win, "text_normal")
layer.set_font_size(20) layer.set_font_size(20)
layer.move_to(50, layer.move_to(50,
win.current["h"]-30) win.current["h"]-30)
layer.show_text(win.render_runtime.get("current_progress", "")) layer.show_text(win.render_runtime.get("current_progress", ""))
######################################################################### #########################################################################
@ -495,23 +498,24 @@ def layer(win, call):
fraction = (win.renders[render]["current_frame"] - win.renders[render]["start_frame"])\ fraction = (win.renders[render]["current_frame"] - win.renders[render]["start_frame"])\
/ (win.renders[render]["end_frame"] - win.renders[render]["start_frame"]) / (win.renders[render]["end_frame"] - win.renders[render]["start_frame"])
fraction = min(1, fraction) fraction = max(0,min(1, fraction))
UI_color.set(layer, win, "progress_background")
UI_elements.roundrect(layer, win,
x+20,
y+current_Y + win.scroll["render"]+55,
width-40,
0,
5)
UI_color.set(layer, win, "progress_active") if fraction:
UI_elements.roundrect(layer, win, UI_color.set(layer, win, "progress_background")
x+20, UI_elements.roundrect(layer, win,
y+current_Y + win.scroll["render"]+55, x+20,
(width-40)*fraction, y+current_Y + win.scroll["render"]+55,
0, width-40,
5) 0,
5)
UI_color.set(layer, win, "progress_active")
UI_elements.roundrect(layer, win,
x+20,
y+current_Y + win.scroll["render"]+55,
(width-40)*fraction,
0,
5)
# Now selection. When you click on one you expend it. And you can see # Now selection. When you click on one you expend it. And you can see
# what settings are inside. # what settings are inside.