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

Maya: fix model publishing #2130

Merged
merged 1 commit into from
Oct 17, 2021
Merged

Maya: fix model publishing #2130

merged 1 commit into from
Oct 17, 2021

Conversation

antirotor
Copy link
Member

Model publishing was broken when no sets were found during extraction of model render sets. It will bail out now if no sets are found.

@tokejepsen
Copy link
Member

Should this not be a validator?

@mkolar
Copy link
Member

mkolar commented Oct 14, 2021

Actually it's a mechanism that works on a model when the data is available and shouldn't work when it isn't so probably not best as validator

@davidlatwe
Copy link
Contributor

Linking the original PR that produce this bug : #1955

Cannot test this at the moment, but I think maybe we should modify the ExtractModelRenderSets class's process method instead ?

Like :

class ExtractModelRenderSets(ExtractLook):
    def process(self, instance):
        lookdata = instance.data["lookData"]
        relationships = lookdata["relationships"]
        sets = relationships.keys()
        if sets:
            return super(ExtractModelRenderSets, self).process(instance)
        else:
            self.log.info("No sets found")
            return

I can sumit another PR for this if you agree. :)

@antirotor
Copy link
Member Author

Yeah, but - even for look extraction - empty set is bad thing there too, isn't it? I know it shouldn't get there because of validators...

@davidlatwe
Copy link
Contributor

That's true :P

Adding more context here, linking the validator that validates on family look 👇🏼
https://github.com/pypeclub/OpenPype/blob/7ab4d0d6a38f71b0a8cdb7e23fd503541888f227/openpype/hosts/maya/plugins/publish/validate_look_contents.py#L73-L76

In this case is the family model borrowing look's extractor for optional extra data (rendering sets), and model doesn't run through the above look content validator hence the bug.

But yeah, empty set is bad for look as well. Like the simplicity of this PR.

@mkolar mkolar merged commit 4c1266d into develop Oct 17, 2021
@mkolar mkolar deleted the hotfix/maya-model-publishing branch October 17, 2021 18:54
@mkolar mkolar added the type: bug Something isn't working label Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants