Skip to content
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

Implement Maya USD Export Chaser to Filter Properties #193

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Dec 10, 2024

Changelog Description

Implement Maya USD Export Chaser to Filter Properties using a SideFX Houdini style pattern matching for all prim properties

Additional review information

For explanation on how the pattern works, see SideFX Houdini Pattern Matching in Parameters which it is loosely based on.

image

Results in:

image

#usda 1.0
(
    defaultPrim = "char_hero"
    metersPerUnit = 0.01
    upAxis = "Y"
)

def Xform "char_hero" (
    kind = "component"
)
{
    double3 xformOp:translate = (-0.4334395286605499, 0.8835878002001145, -0.6190157988997917)
    uniform token[] xformOpOrder = ["xformOp:translate"]

    def Mesh "pCube1"
    {
    }
}

Note how the mesh contains no properties at all - they are completely stripped from the written USD file.

TODO

  • Improve attribute definition tooltip to describe the available pattern and maybe some examples.

Testing notes:

  1. A new attribute "USD Filter Properties" should appear on Maya USD instances
  2. When any pattern is entered, then only those properties would be exported into the output file. For example:
  • Only include xforms: xformOp*
  • Everything but xforms: * ^xformOp*
  • Everything but mesh point data: * ^extent ^points ^faceVertexCounts ^faceVertexIndices ^primvars*

…Houdini style pattern matching for all prim properties
@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Dec 10, 2024
@BigRoy BigRoy requested a review from antirotor December 10, 2024 08:40
@BigRoy BigRoy self-assigned this Dec 10, 2024
@BigRoy BigRoy linked an issue Dec 10, 2024 that may be closed by this pull request
@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 10, 2024

This PR may also solve #82 but only partially.
This PR does not:

  • Strip prim definitions that are empty without properties
  • Turn anything into over instead of def

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AY-7141_Maya USD: Publish USD with properties/attributes filtered
1 participant