-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to set the default prim for the stage through the UI #3335
Comments
You are in luck. We are working on support for setting the default prim for a USD stage in a mayaUsdProxy right now. We are also adding support to choose a prim path when adding a reference which will improve the workflows with referencing in general but also accommodate referencing USD files that don't specify a default prim. As for the exporter, the team and I will discuss. |
Hey @BigRoy, we'd love to get your feedback on some designs!
Any concerns with what you're seeing here? Thanks! |
Thanks Scott - these are all looking really nice. Some thoughts that popped up: Referencing with default prim
Exporting default prim
|
Hey @BigRoy, Thanks for the quick response! Referencing with default prim
Exporting default prim
ex: Cheers, |
Thanks Scott, that all sounds great!
This would have to at least report a useful error to the end user as to why it can't be deleted.
Ha, I was just looking for that "Export Roots" option in the UI - did appear to be missing indeed.
Well I'd keep that behind an export flag - so that the user can e.g. say "Export Selection" and by default include ancestor paths (which I believe for most exporters is the default behavior, at least from Maya) and then have an option in the UI to export the selection as roots instead - which could be labeled anything from "Export selected as root" or "Exclude ancestors" (or reverse by default have "Include parents" enabled). At least using terminology maya users are familiar with. Whenever that option would be toggled then the default prims list should update along I suppose. I always feel from a user perspective the AnimBot tooltips are incredibly nice. It would be epic if the "Include parent hierarchy" option would e.g. show an animated gif as tooltip of the difference in output paths or alike. |
Agreed, thanks a bunch @BigRoy! |
Issue synced internally to EMSUSD-816 |
@scottrenaud Just wanted to add that it'd be nice if in a way it'd be good to visualize and edit what is the So in short, the remark is that it isn't necessarily about setting the default prim for the USD stage (root layer) but also goes for being able to set it for a particular layer in the proxy. What do you think? |
Yep it's a good idea @BigRoy, the team discussed it not too long ago, so it's nice to have your validation! |
So Maya 2024.2 with Maya USD 0.26.0 installed now exposes a "Set default prim" on the Maya USD Proxy Shape. Thanks, nice work! Unfortunately it does not highlight or visualize which prim is the default prim - except for clicking it again it then showing a "Clear default prim" option which for artists might still make it hard to track? A little overlay over the type icon in the outliner might help? Or maybe a color change of the blue line in front of it? Or is the idea that that layer data just isn't as crucial to require highlighting in the outliner? As per my request here I noticed it's not possible to set the default prim of a sublayer: # Error: Cannot set default prim. The stage default prim metadata can only be modified when the root layer [lala.usda] is targeted.
# # Traceback (most recent call last):
# # File "C:\Program Files\Autodesk\Maya2024\Python\lib\site-packages\maya\internal\ufeSupport\ufeCmdWrapper.py", line 32, in doIt
# # self.ufeCmd.execute()
# # RuntimeError: Cannot set default prim. The stage default prim metadata can only be modified when the root layer [lala.usda] is targeted. Which I suppose usually makes sense but as per that comment we might want a "look" layer we're editing in Maya to end up in a Variant Set of an asset. I'm currently not sure how to manage that workflow in Maya without also requiring to define the variant set directly embedded into the layer. How about an option that if a user does that through the UI on a different edit target that they would get a prompt instead that says:
Which could then also offer a little information about the differences? However, once you're able to set it in a layer the question then becomes where do we visualize that and how could the user unset it? :) I can imagine at least a "Apply in root layer" prompt could still help having someone to switch, set it, and switch back? Anyway, since a variant set can't layer in its own sublayers (or can it?) it'd need to be a reference inside the variant set on e.g. the root default prim, that reference itself should then also supply a default prim which would need to be on that layer. Any tips workflow wise to deal with this? Is the need for default prim on the a sublayer invalid? Side note: If I have sublayer that defines a default prim but the composition of sublayers that e.g. that file adds do not have that default prim (thus it's missing) Maya doesn't show that the default prim is still set (and is maybe? invalid). It could be worth still displaying the non-existing default prim in the Attribute Editor, but maybe in italics or alike or with a Note that it seems that Export Selected (from regular maya geometry) still does not provide any settings for setting the default primitive in the UI for as far as I can see. |
I agree at a glance it’s not clear, and a visual indicator would help.
As you suspected, we’re not totally convinced that it’s crucial enough for artists given it’s kind of technical and that this isn’t the only way to view/set it.
Nope, we don't yet have the ability to set default prim on sublayers. Would users want to set the default prim on a sublayer?
I could see this possibly being useful if an artist works on an asset(s) in context (ex: modelling a slide asset in context of a park) and wants to ensure default prim is set without having to open a new stage to do it. However one can hope that automations (if done well) could free artists from caring about this detail.
That's right, when a default prim is deemed invalid after composition we display the empty value in the dropdown.
This one isn’t ready yet. Thanks again @BigRoy ! |
Closing this issue as this feature has been implemented |
Is your feature request related to a problem? Please describe.
I couldn't find a way through the Maya UI to set the default prim of a stage.
Describe the solution you'd like
It'd be great if the UI exposes a way to manage the default prim for a USD stage in a
mayaUsdProxy
. (So that one can manage the USD layers like that)Similarly, I'd expect the
USD Export
settings for Export Selection to also allow to define a default prim in the output - but I suppose achaser
could solve that in that case.Describe alternatives you've considered
As an alternative I have this example Python snippet to set the default prim:
The text was updated successfully, but these errors were encountered: