ynput / ayon-houdini

Houdini addon for AYON
Apache License 2.0
11 stars 9 forks source link

USD: Validate all contributions are within the default prim #91

Open BigRoy opened 2 months ago

BigRoy commented 2 months ago

Is there an existing issue for this?

Please describe the feature you have in mind and explain what the current shortcomings are?

There is currently a validator that will report whether some of your written opinions in the USD file are outside the default primitive.

If ALL are outside, a validator already invalidates for publishing. However, when creating for example a look then generating materials by default will make them in a global /materials but should be in /{folder_name}/materials however material assignments will be to the actual meshes in the correct hierarchy. As such, your look HAS opinions within the default primitive /{folder_name} however has the materials accidentally outside of it.

Reports show that artists miss (or ignore?) the warnings on publishing regarding the prims being outside and just assume that because it came through that the publish will be fine. However, on load there are no materials leaving artists (who just started with USD) confused about this behavior.

How would you imagine the implementation of the feature?

It should be easy for artists to be aware of such a case that is most likely wrong. My proposal is to add an optional validator that by default ONLY allows contributions inside the hierarchy of the default prim, as it should be - and invalidate anything outside of it.

By making it optional we can still allow bypassing or allow workflows that we may not envision yet (e.g. writing multiple hierarchies, some even outside the default prim).

Are there any labels you wish to add?

Describe alternatives you've considered:

Better documentation and decent templates - but this is hard, and people will still often start without those? 🤷

Additional context:

No response