diff --git a/python/tank/descriptor/io_descriptor/shotgun_entity.py b/python/tank/descriptor/io_descriptor/shotgun_entity.py index 6761d5c44..ceac702c9 100644 --- a/python/tank/descriptor/io_descriptor/shotgun_entity.py +++ b/python/tank/descriptor/io_descriptor/shotgun_entity.py @@ -89,7 +89,7 @@ def __init__(self, descriptor_dict, sg_connection, bundle_type): self._validate_descriptor( descriptor_dict, required=["type", "entity_type", "id", "version", "field"], - optional=[], + optional=["system_name"], ) # convert to int @@ -132,6 +132,7 @@ def __init__(self, descriptor_dict, sg_connection, bundle_type): self._bundle_type = bundle_type self._entity_type = descriptor_dict.get("entity_type") self._field = descriptor_dict.get("field") + self._system_name = descriptor_dict.get("system_name") # ensure version is an int if specified try: @@ -184,8 +185,11 @@ def get_system_name(self): name = self._name elif self._mode == self._MODE_ID_BASED: - # e.g. 'PipelineConfiguration_1234' - name = "%s_%s" % (self._entity_type, self._entity_id) + if self._system_name: + name = self._system_name + else: + # e.g. 'PipelineConfiguration_1234' + name = "%s_%s" % (self._entity_type, self._entity_id) return filesystem.create_valid_filename(name)