-
Notifications
You must be signed in to change notification settings - Fork 26
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
Initial Sparse Array Edits Proposal #76
base: main
Are you sure you want to change the base?
Conversation
I am wondering about a general resize operation (which I don't think I spotted). I'm thinking of a case like wanting to always successfully set the 3rd element of an array to some value. The proposal says that excess elements are ignored, and so I imagine that if the 3rd element is beyond the end of the array, my value is an excess element. So then, I notice that insert and remove change an array size, so I could imagine first doing three insertions at the end of the array in order to force that the array is at least three long, and now my write will succeed. Was something like |
For visibility, mentioning that I posted my feedback as issues on the repository (to enable threaded discussions): |
Thanks Alex, this proposal was excellent to read. Array edits open up a lot of possibilities. I do want to ask some questions about the set of ops and their usage. Specifically, because If tooling supports "sparse insertion", it's likely that that the user may repeat that action multiple times. An indecisive user may repeatedly The use cases enumerated in the proposal include
It wasn't clear to me that these required insertion. I'm wondering if "array edits" could be formulated more like SdfListOps. Instead of arbitrary insertion, provide two edit operations that allow concatenation on either side of an array. That would avoid the need for lists of insertions and simplify flows around inspecting and modifying "array edits". This formulation shouldn't impact replace or delete edit operations. Their indices can be specified to be pre-concatenation indices. Example:
I'm really excited by the array edits proposal, how well it describes its interaction with value resolution, and the prospect of additional value types like dictionaries. My hope is avoiding sequences of edits (in the spirit of list ops) minimizes some of the complexities in authoring and tooling (ie. "construction history") without impacting the proposed use cases. |
Description of Proposal
This proposal introduces a new value type,
VtArrayEdit
that can sparsely edit weakerVtArray
opinions by inserting, erasing, and overwriting elements via a simple editing language, and a general framework for handling sparse attribute value opinions of any type in USD, including time-varying opinions in time samples and value clips.Sparse Array-Editing Attribute Overrides in OpenUSD
Contributing