Skip to content

Commit

Permalink
Merge pull request #94 from BigRoy/bugfix/maya_create_multishot_layou…
Browse files Browse the repository at this point in the history
…t_label

Create Multi-shot layout: Add label only if not same as shot name.
  • Loading branch information
antirotor authored Sep 20, 2024
2 parents 5c6cbb3 + e09f984 commit ceb4de1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/ayon_maya/plugins/create/create_multishot_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ def create(self, product_name, instance_data, pre_create_data):
layout_task_name = pre_create_data["taskName"]
layout_task_entity = task_entities[layout_task_name]

shot_name = f"{shot['name']}%s" % (
f" ({shot['label']})" if shot["label"] else "")
shot_name = shot['name']
if shot["label"] and shot["label"] != shot_name:
shot_name += f" ({shot['label']})"

cmds.shot(sequenceStartTime=shot["attrib"]["clipIn"],
sequenceEndTime=shot["attrib"]["clipOut"],
shotName=shot_name)
Expand Down

0 comments on commit ceb4de1

Please sign in to comment.