-
Notifications
You must be signed in to change notification settings - Fork 129
Multiverse: fixed composition write, full docs, cosmetics #3178
Conversation
Fix a bug in extract override where it was selecting a locator that shouldn't be selected.
@@ -129,13 +131,19 @@ def parse_overrides(self, instance, options): | |||
|
|||
return options | |||
|
|||
def get_file_format(self, instance): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You call get_file_format
but it does not return a thing. Instead, it is changing attribute of object so if instance does have empty fileFormats it will use scene_type
of previous instance.
Also not sure what the code should do? If it would be rewritten to simplified version:
instance_file_format = ["usd", "usda"]
file_formats = ["usd", "usda", "usdz"]
some_range = range(len(file_formats)) # that's the same as [0, 1, 2]
# This will never be true as the list with file formats won't be in iter of itegers
if instance_file_format in some_range:
# You change attribut on the class instead of returning it
# + it would crash if it would get here because it's using
# a list to get item from list (TypeError)
self.scene_type = file_formats[instance_file_format]
It kinda looks like you wanted to use for
instead of if
? But that's anti-pythonic way of looping through list. Also only last item would be used in that case it would be better to use:
# Backwards compatibility for instances without fileFormat
file_format = instance.data.get("fileFormat")
# Check if is set
if file_format:
# return last item of the list
return file_format[-1]
# Return default scene type
return self.default_file_format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would be instance.data["fileFormat"]
be a list or tuple in the first place - that sounds confusing?
Why can't it be this?
file_format = instance.data.get("fileFormat",
self.default_file_format)
Or even a hardcoded backwards compatible default:
file_format = instance.data.get("fileFormat",
# Backwards compatibility
"usd")
With this simplification it doesn't need its own get_file_format
method. Nonetheless, like mentioned before.. please return the value instead of storing it on the class if you do end up using a defined method for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. For simplicity, I did your suggestion of using that get
method.
@@ -199,10 +201,10 @@ def process(self, instance): | |||
instance.data["representations"] = [] | |||
|
|||
representation = { | |||
'name': 'usd', | |||
'ext': 'usd', | |||
'name': self.scene_type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iLLiCiTiT would you feel it's wrong if name
would always be usd
no matter the extension? That way updating in the manager can be done even if file format changed in-between. Thoughts?
It might be confusing that the current documentation does already mention Multiverse Looks (e.g. in screenshots). Do you have an ETA on that next PR? |
This extracts the look information from the UsdCompoundShape - it generates "OP look" compatible data structures and lets the rest of the OP publish as normal. It also generates a .usda file with the overrides containing material assignments as needed.
… TDL's generated by 3delight. During collection, we check to see if the TDL's exist beside the original texture, and if they do they get added to the collection. Validation of these will depend on the publish intent and whether `expectMipMap` is True in the publish set. If mipmaps are expected and the intent is correct, the mipmaps will be published along with the original file, which will accelerate rendering, since 3dl will find that TDL and use it instead of having to generate it.
…stance. Renamed `expectMipMap` to `publishMipMap` to make it more clear. Added `linear` & `auto` to possible color spaces.
- better docstrings for pyblish UI - updated images - re-organized Maya content in website by splitting plugin docs and sidebar menu (existing links are not broken since the same entry point doc exists)
@mkolar please note I refactored a bit the Maya docs as the page was too long. I personally think this new organization is easier to read for the user and is also faster to find content. |
Thank you having a look |
That is because we did not release 7.1 yet but it will be released in the next days so that link be valid and you should not worry about it, you can safely merge it :) |
@pberto just for completeness I'll add information we discussed in private conversation. We're happy to merge this, but please first change the family names to be prefixed with Other than that it's looking like great work! Thank you |
Are we sure? The data is just regular To load the multiverse USDs into Houdini I'd then have to allow them to load I admit the Loaders themselves (so that loaded content can be managed correctly in the future) are I can see however how the Extractor might run into a conflict with the family if another pops up - but I think that's much easier to solve in the future than fixing published families. Or did you intend to say that we'd still try to actually register the versions as |
We're actually very wary about It is very much true that if we prefix them, then other USD loaders should be aware of them, but I'm not sure it's a good ideal to now define There is a large discussion required (which btw we'll be invoking within days most probably) on how to work with USD across the board with OP. I have a feeling that the first steps will be as representation of some families (Layout represented as USD, model represented as USD and so on). |
MV structures the USD data in certain way that makes sense from it's perspective and even though they are just native USD files, it's kinda like ditching |
Houdini implementation at the moment is a good example of such mixup. We have |
Thanks for the follow up - I understand. 👍 Definitely worth a good brainstorm on other potential approaches for this across the whole "family". (Pun intended.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check comment in #3178 (comment)
@mkolar as I said in private, no problem, we can change family names. Whats important is that the representation stays "usd" -- which we both agreed on. |
`usdComposition`->`mvUsdComposition`, `usdOverride`->`usdOverride`, specifically within multiverse files. I have left the `usd` family in `integrate_new.py` because that is being used in a bunch of different places (eg: houdini's host integration), and have just added `mvUsd` as a new family.
I have changed names for multiverse related families from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you guys. This is great and I think we can squeeze it into 3.11.0
Brief description
Finalized Multiverse integration.
Description
Documentation
This PR includes also documentation.
Notes
We will add a Multiverse Look creator at the next PR.