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

Apple: Accessibility and Localization API schemas #3271

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Commits on Sep 24, 2024

  1. Apple: Accessibility and Localization API schemas

    This commit adds two applied API schemas to UsdUI as an attempt to make it a Universally Accessible Scene Description.
    
    Disclaimer: This addition does not represent any future feature support in our products. These schemas are borne out of discussing the needs for the ecosystem to accommodate a wider range of users.
    
    2. Localization schema as discussed at
    
    ## Overview
    A brief overview of the two schemas:
    
    ### Accessibility API
    [Proposal](https://github.com/PixarAnimationStudios/OpenUSD-proposals/tree/main/proposals/accessibility)
    
    ```
    def "Foo"(
        apiSchemas = ["AccessibilityAPI:default"]
    ) {
        string accessibility:label = "Short Label"
        string accessibility:description = "A longer description of this prim"
        uniform token priority = "standard"
    }
    ```
    
    UsdUIAccessibilityAPI is a multiple apply schema.
    Each instance has three attributes:
    
    label: A short description of the prim
    description: An extended description of the prim
    priority: A hint to a runtime on how this instance should be valued
    
    The default instance does not namespace itself with the instance name as we believe it will be the only one specified in many cases, and the excess namespace doesn't add clarity.
    
    As a convenience, the API specifies a default name so users of Apply() do not need to specify a name most of the time.
    
    ### Localization API
    [Proposal](https://github.com/PixarAnimationStudios/OpenUSD-proposals/tree/main/proposals/language)
    
    ```
    def "Foo" (
        apiSchemas = ["LocalizationAPI:default", "LocalizationAPI:fr_CA"]
    )
    {
         uniform token localization:lang = "en_US"
         custom string foo = "Hello"
         custom string foo:lang:fr_CA = "Bonjour"
         custom string foo:lang:hi_IN = "नमस्ते"
    }
    
    ```
    
    UsdUILocalizationAPI is also a multiple apply schema.
    However here it uses the multiple apply to denote what language are available or that a default localization is available on a prim.
    
    It includes one attribute that doesn't use an instance name called `localization:langauge` which specifies the default language to assume.
    
    All other applications are suffixed to properties with `:lang:<language>`
    
    ## Feedback and Remaining Work
    
    It would be greatly appreciated if feedback could be provided with a focus on the schema first so we can nail down how to represent the data in the USD.
    
    I also haven't finished wrapping the LocalizationAPI methods in Python because I would like to first get feedback on the C++ API so that I may iterate faster. Once we feel the API looks good, I'll handle the Python bindings and write appropriate tests for them as well.
    dgovil committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b1102cb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1803dd9 View commit details
    Browse the repository at this point in the history
  3. Codify validation rules

    dgovil committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    007b408 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8e960c5 View commit details
    Browse the repository at this point in the history
  5. Add documentation for validate

    dgovil committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    08211f9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f3418ea View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    88ce736 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    eb0d184 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5045810 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a3b7000 View commit details
    Browse the repository at this point in the history
  4. Fix newline

    dgovil committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    cf383aa View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Configuration menu
    Copy the full SHA
    c4bce75 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2024

  1. Revert "Use extraIncludes instead of manually declaring the include f…

    …or primvars"
    
    This reverts commit c4bce75.
    dgovil committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    e343310 View commit details
    Browse the repository at this point in the history