There was a problem with separate mantra node rendering with custom command more than 100 frames. Basically if first frame began with the same digit as the beginning of the last - it added a number to the ifd sequence thus failing mantra render.
example:
first frame: name_1.ifd
last frame: name_100.ifd
output: name_1.@#@.ifd
expected output: name_.@#@.ifd
Here is a fix (commented the fixed part)
Code: Select all
def splitPathsDifference(path_a, path_b):
"""Split paths searching for difference, return equal part before
difference, difference length, part after difference
:param str path_a:
:param str path_b:
"""
part_1 = path_a
part_2 = ''
diflength = 0
len_a = len(path_a)
len_b = len(path_b)
len_min = len_a
if len_min > len_b:
len_min = len_b
if len_min < 1:
return part_1, diflength, part_2
# This part did not check if last equal symbol is not a digit
len_begin = -1
for c in range(len_min):
if path_a[c] == path_b[c]:
continue
if str(c) not in Digits: # I added that check
len_begin = c
else:
len_begin = c-1 # If digit - last equal symbol should be the one before
break
if len_begin < 1:
return part_1, diflength, part_2
len_end = -1
for c in range(len_min):
if path_a[len_a - c - 1] == path_b[len_b - c - 1]:
continue
len_end = c
break
if len_end < 1:
return part_1, diflength, part_2
for c in range(len_begin):
if path_a[len_begin - c] in Digits:
continue
len_begin = len_begin - c + 1
break
for c in range(len_end):
if path_a[len_a - len_end + c] in Digits:
continue
len_end -= c
break
diflength = 1
if len_a == len_b:
diflength = len_a - len_begin - len_end
part_1 = path_a[0:len_begin]
part_2 = path_a[len_a - len_end:len_a]
return part_1, diflength, part_2