Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya: Multi-shot Layout Creator #5710

Merged
merged 20 commits into from
Oct 16, 2023

Conversation

antirotor
Copy link
Member

@antirotor antirotor commented Oct 6, 2023

Changelog Description

New Multi-shot Layout creator is a way of automating creation of the new Layout instances in Maya, associated with correct shots, frame ranges and Camera Sequencer in Maya.

Additional info

This works by looking at the specified hierarchy and taking all shots under it, calling Layout creator for each and adding corresponding clip to Camera Sequencer with given clipIn/clipOut data. There is and option to associate some task name automatically with created Layouts.

Example

image

in this case, Shot Parent Folder shots has three shots under - sh010, sh020 and sh030. Running it will result in:

image

Note the Camera Sequence window with the timeline. You can also notice that the first layoutMain instance is invalid - that is becase the shot sh010 doesn't have task layout so the Creator wasn't able to associate it with it.

Testing notes:

  1. Start Maya in AYON Mode
  2. Run Multi-shot Layout Creator on some sensible hierarchy of shots
  3. Check Camera Sequencer and Instance data so they match expectations

Documentation PR: ynput/ayon-documentation#82


warning
This creator isn't available in OpenPype, only in AYON

@antirotor antirotor added host: Maya sponsored Client endorsed or requested type: feature Larger, user affecting changes and completely new things labels Oct 6, 2023
@antirotor antirotor self-assigned this Oct 6, 2023
@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

7 similar comments
@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

@ynbot
Copy link
Contributor

ynbot commented Oct 6, 2023

Task linked: OP-6460 Maya: multishot layout publish

@ynbot ynbot added the size/S Denotes a PR changes 100-499 lines, ignoring general files label Oct 6, 2023
@antirotor antirotor force-pushed the feature/OP-6460_maya-multishot-layout branch from 25a7cc5 to 2eea78e Compare October 9, 2023 13:19
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still getting error when trying to create multishot Layout instance in the workfile...

Traceback (most recent call last):
  File "C:\Users\Libor\AppData\Local\Ynput\AYON\addons\openpype_3.17.2-nightly.3\openpype\pipeline\create\context.py", line 2031, in _create_with_unified_error
    result = creator.create(*args, **kwargs)
  File "C:\Users\Libor\AppData\Local\Ynput\AYON\addons\openpype_3.17.2-nightly.3\openpype\hosts\maya\plugins\create\create_multishot_layout.py", line 103, in create
    shots = self.get_related_shots(
  File "C:\Users\Libor\AppData\Local\Ynput\AYON\addons\openpype_3.17.2-nightly.3\openpype\hosts\maya\plugins\create\create_multishot_layout.py", line 201, in get_related_shots
    return [f for f in child_folders if f["folderType"] == "Shot"]
  File "C:\Users\Libor\AppData\Local\Ynput\AYON\addons\openpype_3.17.2-nightly.3\openpype\hosts\maya\plugins\create\create_multishot_layout.py", line 201, in <listcomp>
    return [f for f in child_folders if f["folderType"] == "Shot"]
  File "C:\Users\Libor\AppData\Local\Ynput\AYON\addons\openpype_3.17.2-nightly.3\openpype\vendor\python\common\ayon_api\server_api.py", line 3578, in get_folders
    parent_ids = set(parent_ids)
TypeError: unhashable type: 'list'

@LiborBatek
Copy link
Member

Now it gives me error that no shots present below specified one...no matter if Iam in context of top most shots folder or trying to create multi shot layout instance in any of shots below...always getting the same msg
image

Creator: Multi-shot Layout (io.openpype.creators.maya.multishotlayout)

Error: No shots found under the specified folder.

@BigRoy
Copy link
Collaborator

BigRoy commented Oct 12, 2023

Now it gives me error that no shots present below specified one...no matter if Iam in context of top most shots folder or trying to create multi shot layout instance in any of shots below...always getting the same msg image

Creator: Multi-shot Layout (io.openpype.creators.maya.multishotlayout)

Error: No shots found under the specified folder.

@LiborBatek can you confirm those folders are actually marked as FolderType Shot? :)

It seems to be the requirement here

@antirotor
Copy link
Member Author

can you confirm those folders are actually marked as FolderType Shot? :)

Yes, they need to be of Shot type. I am not sure actually if we should restrict it to it or not - from workflow point of view it makes sense to use shots for that, but does it have to be restricted?

@m-u-r-p-h-y
Copy link
Member

can you confirm those folders are actually marked as FolderType Shot? :)

Yes, they need to be of Shot type. I am not sure actually if we should restrict it to it or not - from workflow point of view it makes sense to use shots for that, but does it have to be restricted?

I would say the folder type should not be important here at all. In Ayon we allow arbitrary per-project folder types and such restriction is just complicating everything.

@LiborBatek
Copy link
Member

Im always creating folder type on Ayon server projects...also can confirm it is that type (see scrngrab)
image

@BigRoy
Copy link
Collaborator

BigRoy commented Oct 13, 2023

Now it gives me error that no shots present below specified one...no matter if Iam in context of top most shots folder or trying to create multi shot layout instance in any of shots below...always getting the same msg image

Creator: Multi-shot Layout (io.openpype.creators.maya.multishotlayout)

Error: No shots found under the specified folder.

Can we also improve the error so if it hits this case that it reports the folder path of the specified folder?

No shots found under specified folder: path/to/folder

@antirotor
Copy link
Member Author

I've removed the restriction and improved error message.

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now no errors whatsoever all seems fine!

It creates all shots with proper clip in and clip out for all shots in the selected shots folder

image

@antirotor antirotor merged commit d5e6025 into develop Oct 16, 2023
1 check passed
@antirotor antirotor deleted the feature/OP-6460_maya-multishot-layout branch October 16, 2023 08:11
@ynbot ynbot added this to the next-patch milestone Oct 16, 2023
@BigRoy BigRoy mentioned this pull request Nov 14, 2023
@BigRoy
Copy link
Collaborator

BigRoy commented Nov 14, 2023

Now no errors whatsoever all seems fine!

It creates all shots with proper clip in and clip out for all shots in the selected shots folder

image

Wait a second, isn't that screenshot showing a lot of errors on the created instances? :)

@LiborBatek
Copy link
Member

LiborBatek commented Nov 16, 2023

@BigRoy yes and no...I was told to ignore those exclamation marks :) ...sort of nature of it? I already forgot what was the case so maybe @antirotor could elaborate on that

@antirotor
Copy link
Member Author

those errors are caused by not having Task set in the publisher - you need to set task on the instance but this creator cannot auto-guess what task it should assign so if it cannot set it, it will leave it empty so artist need to do it by himself. There is option to pre-define task name that should be used if it exists, like layout. So... this is a feature, not bug 🐞

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya size/S Denotes a PR changes 100-499 lines, ignoring general files sponsored Client endorsed or requested type: feature Larger, user affecting changes and completely new things
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants