[Durian-svn] [6605] fix for color balance not swapping.
campbell
institute at blender.org
Thu Jul 8 19:00:37 CEST 2010
Revision: 6605
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=6605
Author: campbell
Date: 2010-07-08 19:00:37 +0200 (Thu, 08 Jul 2010)
Log Message:
-----------
fix for color balance not swapping.
Modified Paths:
--------------
pro/scripts/utilities/sequencer_switch_finals.py
Modified: pro/scripts/utilities/sequencer_switch_finals.py
===================================================================
--- pro/scripts/utilities/sequencer_switch_finals.py 2010-07-08 16:41:30 UTC (rev 6604)
+++ pro/scripts/utilities/sequencer_switch_finals.py 2010-07-08 17:00:37 UTC (rev 6605)
@@ -14,6 +14,7 @@
# LOG ERRORS
MISSING_BLENDS = [] # avis that have no blends
MISSING_EXRS = [] # avis that have no exrs
+MISSING_EXRS_FILES = [] # avis that have no exrs
BAD_AVI_LENGTHS = [] # blends that are not the same length as the avis
def blend_path_list(path):
@@ -50,34 +51,47 @@
exr_path_current = os.path.join(EXR_DIR, base_name)
exr_path_final = os.path.join(EXR_DIR, base_name, "final")
+ if os.path.exists(exr_path_final):
+ exr_path = exr_path_final
+ else:
+ exr_path = exr_path_current
+
# print(base_name)
- for exr_path in (exr_path_final, exr_path_current):
- if os.path.exists(exr_path):
- # print(exr_path)
- exrs = []
+ if os.path.exists(exr_path):
+ # print(exr_path)
+ exrs = []
+ '''
+ for f in os.listdir(exr_path):
+ if f.startswith(base_name) and f.endswith(".exr"):
+ f_num = f.split("_")[-1].split(".")[0]
+ val = int(f_num)
+ if val >= frame_start and val <= frame_end:
+ exrs.append(f)
+ else:
+ if DEBUG:
+ print("remove_me", f)
+ '''
- for f in os.listdir(exr_path):
- if f.startswith(base_name) and f.endswith(".exr"):
- f_num = f.split("_")[-1].split(".")[0]
- val = int(f_num)
- if val >= frame_start and val <= frame_end:
- exrs.append(f)
- else:
- if DEBUG:
- print("remove_me", f)
+ for i in range(frame_start, frame_end + 1):
+ exr_name = "%s_%.6d.exr" % (base_name, i)
+ exr_name_full = os.path.join(exr_path, exr_name)
+ if not os.path.exists(exr_name_full):
+ MISSING_EXRS_FILES.append(exr_name_full)
+ else:
+ exrs.append(os.path.basename(exr_name_full))
- if exrs:
- exrs.sort()
- tot = frame_end - frame_start
- if(tot > len(exrs)):
- if DEBUG:
- print("%s missing %d frames" % (base_name, tot - len(exrs)))
- return "", []
- # print("PATH:", exr_path)
- return exr_path, exrs
- else:
- print("\texr path missing: %s" % exr_path)
+ if exrs:
+ tot = frame_end - frame_start
+ if(tot > len(exrs)):
+ if DEBUG:
+ print("%s missing %d frames" % (base_name, tot - len(exrs)))
+ return "", []
+ # print("PATH:", exr_path)
+ return exr_path, exrs
+ else:
+ print("\texr path missing: %s" % exr_path)
+
return "", []
@@ -143,6 +157,12 @@
seq_new = add_strip(image_dir, image_files)
seq_new.swap(seq)
+ # a few things we want to swap back
+ seq.use_color_balance = seq_new.use_color_balance
+ seq.color_balance.lift = seq_new.color_balance.lift
+ seq.color_balance.gain = seq_new.color_balance.gain
+ seq.color_balance.gamma = seq_new.color_balance.gamma
+
# XXX, context only
for s in bpy.context.sequences:
s.selected = False
@@ -159,13 +179,18 @@
print("\t" + blend)
print("\n")
- print("Missing EXRS for AVIS")
+ print("Missing EXR's for AVI's")
for avi in MISSING_EXRS:
# filter out crap
if "/render/" in avi:
print("\t" + avi)
print("\n")
+
+ print("Missing EXR image files")
+ for f in MISSING_EXRS_FILES:
+ print("\t" + f)
+ print("\n")
print("Length mismatch")
for blend in BAD_AVI_LENGTHS:
- print("\t" + " ".join(blend))
+ print("\t" + " ".join(blend))
\ No newline at end of file
More information about the Durian-svn
mailing list