Upload files to 'studio'

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2020-12-23 14:12:06 +00:00
parent f735f00f86
commit 1702a9b3ef

View file

@ -254,7 +254,8 @@ def get_legacy(project_location):
if os.path.exists(project_location\
+"/rnd/"+scenename+"/"+shot[1]+"/shot.progress"):
check = checklist.get_list(project_location+"/project.progress")
check = checklist.get_list(project_location\
+"/rnd/"+scenename+"/"+shot[1]+"/shot.progress")
shotsfractions.append(check["fraction"])
else:
@ -659,6 +660,59 @@ def load(project):
} # function as events. But will have no text data with in
# it. It will be more like Blender's node editor's Frame.
# I forgot to update the scenes analytics lol.
for scenename in data["scenes"]:
shotsfractions = []
for shot in data["scenes"][scenename]["shots"]:
if shot[0] == "shot_block":
# Let's see if it has a checklist.
if os.path.exists(project\
+"/rnd/"+scenename+"/"+shot[1]+"/shot.progress"):
check = checklist.get_list(project\
+"/rnd/"+scenename+"/"+shot[1]+"/shot.progress")
shotsfractions.append(check["fraction"])
else:
folder = project\
+"/rnd/"+scenename+"/"+shot[1]
try:
if len(os.listdir(folder+"/rendered")) > 0:
shotsfractions.append(1.0)
elif len(os.listdir(folder+"/test_rnd")) > 0:
shotsfractions.append(0.8)
elif len(os.listdir(folder+"/opengl")) > 0:
shotsfractions.append(0.6)
elif len(os.listdir(folder+"/storyboard")) > 0:
shotsfractions.append(0.4)
elif len(os.listdir(folder+"/extra")) > 0:
shotsfractions.append(0.2)
except:
shotsfractions.append(0.0)
try:
data["scenes"][scenename]["fraction"] = \
sum(shotsfractions) / len(shotsfractions)
except:
data["scenes"][scenename]["fraction"] = 0.0
print(shotsfractions)
print(data["scenes"][scenename]["fraction"])
print(scenename)
print()
fractions = []
lastarrow = 'start'