Apple: Add AuthorshipAPI for recording how a prim was created - #4188
Open
dgovil wants to merge 1 commit into
Open
Apple: Add AuthorshipAPI for recording how a prim was created#4188dgovil wants to merge 1 commit into
dgovil wants to merge 1 commit into
Conversation
Adds UsdMediaAuthorshipAPI, a multiple-apply schema recording who or what authored a prim: the producer tool and its version, an IPTC digital source type, generation inputs, attribution, copyright owner and usage terms. Each applied instance is one record describing one authoring step, so a prim can carry several without them clobbering each other. Implements the schema proposed in OpenUSD-proposals PR PixarAnimationStudios#106. Four collection methods, each taking a searchPrimStack flag that defaults off: - GetAllOnStage(stage) collects records across a stage, reaching into prototypes so records inside native instances are found once. - ComputeAccumulatedRecords(prim) returns the records that apply to a prim: its own plus those it accumulates from its ancestors, sorted so ancestors come first. This is the proposal's convention that a prim's children accumulate the authorship above them without erasing it, so a hand-modelled prim under an AI-authored group carries both records. Nothing is merged, and comparing a record's prim against the queried prim distinguishes inherited from own. - GetAllUnder(prim) returns the records on a prim and everything beneath it. - GetAllInLayer(layer) returns record paths authored in a single layer, composing nothing, so it answers what one layer contributes. Because it does not compose it also reaches specs no stage reports, including those inside variants that are not selected. Paths are returned rather than schema objects because such a record may have no composed prim to attach one to. With searchPrimStack, records are gathered from every contributing SdfPrimSpec rather than the composed prim, which finds three things the composed prim cannot report: - an application shadowed by an explicit apiSchemas list in a stronger layer - properties authored without the schema ever having been applied - the same instance name authored in several layers, where composition keeps only the strongest opinion for each field Nothing is deduplicated in that mode, so a record authored in three layers is returned three times in strongest-to-weakest order; resolving opinions is composition's job, not this method's. Also adds: - usdauthors, a command listing records grouped by the prims they apply to, with --deep for the prim stack search, --layer to report only what a single layer authors, --unloaded, and --summary for a tally of producers (per version) and digital source types - extras/usd/examples/usdApplyAuthorship, applying records from the command line, including converting name=value inputs into the index-matched inputNames and inputValues arrays - tests for the schema and the command, and toolset documentation
Member
|
Filed as internal issue #USD-12569 (This is an automated message. See here for more information.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change(s)
This PR adds support the
UsdMediaAuthorshipAPI, a multiple-apply schema that is meant to meet the needs of regulatory requirements around the world regarding Generative AI use, but also to be more generally useful for human authors as well.The goal of this implementation is ease of adoption for regulatory compliance , and to meet the granular needs of complex OpenUSD authored scenes and workflows in a dynamic nature.
This is not a substitution for C2PA or other provenance standards, but is an implementation that is designed to work with OpenUSD's composition setup. In the future, other developers may opt to make C2PA implementations in USD, and we have talked to the C2PA leads to align this implementation such that it could gracefully and progressively flow into their future implementations.
The schema is multiple apply so that a single prim can be considered as having been authored by multiple algorithms or humans.
In addition to the schema, we also provide:
UsdMediaAuthorshipAPI::GetAll()which finds instances of the schema on a given primUsdMediaAuthorshipAPI::GetAllOnStage()which finds instances of the schema across the stage, and optionally across all prim specs.usdauthors, a command listing records grouped by the prims they apply toextras/usd/examples/usdApplyAuthorship, applying records from the command line, including converting name=value inputs into the index-matched inputNames and inputValues arraysLink to proposal
A thorough proposal is available at the following link with further information and thinking.
Authorship API Proposal
Fixes Issue(s)
Checklist
I have created this PR based on the dev branch
I have followed the coding conventions
I have added unit tests that exercise this functionality (Reference:
testing guidelines)
I have verified that all unit tests pass with the proposed changes
I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)