use animation foreground layer
This commit is contained in:
parent
3a367e8c73
commit
056bc1e6ba
1 changed files with 43 additions and 29 deletions
14
render.py
14
render.py
|
@ -90,6 +90,9 @@ def compose(clips, target=150, base=1024, voice_over=None):
|
||||||
break
|
break
|
||||||
length += clip['duration']
|
length += clip['duration']
|
||||||
|
|
||||||
|
if "foreground" not in clip and "animation" in clip:
|
||||||
|
fg = clip['animation']
|
||||||
|
else:
|
||||||
fg = clip['foreground']
|
fg = clip['foreground']
|
||||||
if 'foley' in clip:
|
if 'foley' in clip:
|
||||||
foley = clip['foley']
|
foley = clip['foley']
|
||||||
|
@ -123,6 +126,7 @@ def compose(clips, target=150, base=1024, voice_over=None):
|
||||||
else:
|
else:
|
||||||
transparency_back = transparency
|
transparency_back = transparency
|
||||||
transparency_front = 0
|
transparency_front = 0
|
||||||
|
if "background" in clip:
|
||||||
scene['front']['V2'].append({
|
scene['front']['V2'].append({
|
||||||
'duration': clip['duration'],
|
'duration': clip['duration'],
|
||||||
'src': clip['background'],
|
'src': clip['background'],
|
||||||
|
@ -137,6 +141,16 @@ def compose(clips, target=150, base=1024, voice_over=None):
|
||||||
'transparency': transparency_back
|
'transparency': transparency_back
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
else:
|
||||||
|
scene['front']['V2'].append({
|
||||||
|
'blank': True,
|
||||||
|
'duration': clip['duration'],
|
||||||
|
})
|
||||||
|
scene['back']['V1'].append({
|
||||||
|
'blank': True,
|
||||||
|
'duration': clip['duration'],
|
||||||
|
})
|
||||||
|
|
||||||
scene['back']['V2'].append({
|
scene['back']['V2'].append({
|
||||||
'duration': clip['duration'],
|
'duration': clip['duration'],
|
||||||
'src': clip['original'],
|
'src': clip['original'],
|
||||||
|
|
Loading…
Reference in a new issue