ynput / ayon-houdini

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

Layer Muting fails with USD Asset Resolver enabled #151

Closed BigRoy closed 2 weeks ago

BigRoy commented 4 weeks ago

Is there an existing issue for this?

Description

Current Behavior

Muting USD layers of the asset contribution workflow seems to fail with asset resolvers enabled. It just doesn't mute that layer or its children. Disabling e.g. the ayon-usd addon resolves the issue. It may have to do with the usage of :SDF_FORMAT_ARGS: in certain file paths in the contribution workflow.

Expected Behavior

Muting layers should work, and be super easy.

Steps To Reproduce:

Enable ayon-usd addon with the USD Asset Resolver enabled.

  1. Publish USD asset with model and look layers
  2. Create AYON Mute Layers node
  3. Set it to mute the look layer.
  4. The materials remain (the layer is not muted)

Additional context:

No response

Relevant log output:

No response

BigRoy commented 4 weeks ago

@Lypsolon was kind enough to do a test run and reproduce this.

Here's his setup:

Image

This layer muting works:

Image

But this does not:

Image

It seems to NOT mute the child layer (and since I suppose that should not be possible to include a child layer if the parent is muted I assume it's not actually muting that layer even though it's set to 'muted' visually in Houdini).

Looking at which works and which fails - it's very likely due to some behavior with the :SDF_FORMAT_ARGS:

I do think it's:

BigRoy commented 3 weeks ago

Reassigned to @Lypsolon since it's likely easier for him to investigate from the resolver itself. Plus I've heard he just really likes issues! 🥇

Lypsolon commented 2 weeks ago

@BigRoy i tested this issue with the new Resolvers we have in https://lake.ayon.cloud/repositories/ayon-usd/objects?ref=Nightly&path= i believe this issue was cause because of the removal of the SDF_FORMAT_ARGS then new system now appends them at the end again.

i tested this with "Normal" paths and with URIs and both look like they work. this will now also be tested in the internal Usd Project.

BigRoy commented 2 weeks ago

Feel free to close when fix is merged and released.

Lypsolon commented 2 weeks ago

this has been solved and tested in the internal AyonUsd Project where the issue was first found.

the issue was that the _CreateIdentifier function removed the SDF_ARGS from the input path and thereby created an identifier for an wrong layer.