diff --git a/attract/node_types/shot.py b/attract/node_types/shot.py index a70af49..91739d2 100644 --- a/attract/node_types/shot.py +++ b/attract/node_types/shot.py @@ -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', } diff --git a/attract/shots_and_assets/__init__.py b/attract/shots_and_assets/__init__.py index 65bebb9..5aee8cc 100644 --- a/attract/shots_and_assets/__init__.py +++ b/attract/shots_and_assets/__init__.py @@ -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', diff --git a/tests/test_shots.py b/tests/test_shots.py index 5d75126..0ded57e 100644 --- a/tests/test_shots.py +++ b/tests/test_shots.py @@ -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,