Implement Trim End
This commit is contained in:
@@ -6,6 +6,10 @@ node_type_shot = {
|
||||
'trim_start_in_frames': {
|
||||
'type': 'integer',
|
||||
},
|
||||
# How many frames are trimmed after the end of the shot in the edit.
|
||||
'trim_end_in_frames': {
|
||||
'type': 'integer',
|
||||
},
|
||||
# Duration (of the visible part) of the shot in the edit.
|
||||
'duration_in_edit_in_frames': {
|
||||
'type': 'integer',
|
||||
@@ -43,6 +47,7 @@ task_types = ['layout', 'animation', 'lighting', 'fx', 'rendering']
|
||||
|
||||
human_readable_properties = {
|
||||
'properties.trim_start_in_frames': 'Trim Start',
|
||||
'properties.trim_end_in_frames': 'Trim End',
|
||||
'properties.duration_in_edit_in_frames': 'Duration in Edit',
|
||||
'properties.cut_in_timeline_in_frames': 'Cut-in',
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ VALID_SHOT_PATCH_FIELDS = {
|
||||
u'name',
|
||||
u'picture',
|
||||
u'properties.trim_start_in_frames',
|
||||
u'properties.trim_end_in_frames',
|
||||
u'properties.duration_in_edit_in_frames',
|
||||
u'properties.cut_in_timeline_in_frames',
|
||||
u'properties.status',
|
||||
|
@@ -158,6 +158,7 @@ class PatchShotTest(AbstractShotTest):
|
||||
'$set': {
|
||||
'name': u'"shot" is "geschoten" in Dutch',
|
||||
'properties.trim_start_in_frames': 123,
|
||||
'properties.trim_end_in_frames': 0,
|
||||
'properties.duration_in_edit_in_frames': 4215,
|
||||
'properties.cut_in_timeline_in_frames': 1245,
|
||||
'properties.status': u'on_hold',
|
||||
@@ -168,6 +169,7 @@ class PatchShotTest(AbstractShotTest):
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertEqual(u'"shot" is "geschoten" in Dutch', dbnode['name'])
|
||||
self.assertEqual(123, dbnode['properties']['trim_start_in_frames'])
|
||||
self.assertEqual(0, dbnode['properties']['trim_end_in_frames'])
|
||||
self.assertEqual(u'on_hold', dbnode['properties']['status'])
|
||||
|
||||
@responses.activate
|
||||
@@ -410,6 +412,7 @@ class RequiredAfterCreationTest(AbstractShotTest):
|
||||
shot = {'name': u'test shot',
|
||||
'description': u'',
|
||||
'properties': {u'trim_start_in_frames': 0,
|
||||
u'trim_end_in_frames': 0,
|
||||
u'duration_in_edit_in_frames': 1,
|
||||
u'cut_in_timeline_in_frames': 0},
|
||||
'node_type': node_type_name,
|
||||
|
Reference in New Issue
Block a user