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,7 +134,10 @@ def layer(win, call):
passed = time.time() - win.render_runtime.get("started_rendering", 0)
passed = passed*1000000
longest = passed
if win.render_runtime.get("to_render"):
longest = passed
else:
longest = 0
@ -156,13 +159,13 @@ def layer(win, call):
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 = max(frame_h, frame_w)
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_elements.roundrect(layer, win,
580+(n*frame_w),
@ -188,12 +191,12 @@ def layer(win, call):
break
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(50,
win.current["h"]-30)
layer.show_text(win.render_runtime.get("current_progress", ""))
if win.render_runtime.get("to_render"):
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(50,
win.current["h"]-30)
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"])\
/ (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)
if 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")
UI_elements.roundrect(layer, win,
x+20,
y+current_Y + win.scroll["render"]+55,
(width-40)*fraction,
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
# what settings are inside.