diff --git a/attract/node_types/shot.py b/attract/node_types/shot.py index 8a18f0b..3b3aace 100644 --- a/attract/node_types/shot.py +++ b/attract/node_types/shot.py @@ -36,3 +36,9 @@ node_type_shot = { } task_types = ['layout', 'animation', 'lighting', 'fx', 'rendering'] + +human_readable_properties = { + 'properties.trim_start_in_frames': 'Trim Start', + 'properties.duration_in_edit_in_frames': 'Duration in Edit', + 'properties.cut_in_timeline_in_frames': 'Cut-in', +} diff --git a/attract/shots/eve_hooks.py b/attract/shots/eve_hooks.py index e9e4681..57784b5 100644 --- a/attract/shots/eve_hooks.py +++ b/attract/shots/eve_hooks.py @@ -1,7 +1,7 @@ import itertools import logging -from attract.node_types.shot import node_type_shot +from attract.node_types.shot import node_type_shot, human_readable_properties from pillar.api.nodes import only_for_node_type_decorator import pillar.api.activities import pillar.api.utils.authentication @@ -42,10 +42,15 @@ def activity_after_replacing_shot(shot, original): if len(changes) == 1: (key, val_shot, _) = changes[0] - human_key = key.rsplit('.', 1)[-1] + try: + human_key = human_readable_properties[key] + except KeyError: + human_key = pillar.web.jinja.format_undertitle(key.rsplit('.', 1)[-1]) + if key == 'properties.status': val_shot = pillar.web.jinja.format_undertitle(val_shot) - descr = 'changed %s to %s in shot "%s"' % (human_key, val_shot, shot['name']) + descr = 'changed "%s" to "%s" in shot "%s"' %\ + (human_key, val_shot, shot['name']) else: descr = 'edited shot "%s"' % shot['name']