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

RB 10.5 to main #1375

Merged
merged 11 commits into from
Jul 18, 2023
Merged

RB 10.5 to main #1375

merged 11 commits into from
Jul 18, 2023

Conversation

ivanimanishi
Copy link
Member

No description provided.

ivanimanishi and others added 11 commits July 13, 2023 17:01
Previously, you could create a FrameRange object with a negative step,
but it would go into an infinite loop if you tried to get the frame list

Given that we have the ReversedFrameList that achieves the same as a
negative step, it felt like using that was the correct approach.

Note that we still include the support for the negative step in the
parse method, so that we can provide a more useful error message during
init.
FrameRange : Prevent creation of FrameRanges with negative steps
`__dataTypesConversionDict` contains an item that returns a `None` value
which would cause an error.
When converting a list, it was simply using the first match, which would
often not be the desired one. Ex: converting `["abc", "b"]` to
`IECore.CharVectorData( [ 97, 98 ] )`, instead of
`IECore.StringVectorData( [ 'abc', 'b' ] )`.

The solution here is to use, on lists, the already existing flag on the
`__dataTypesConversionDict` entries that indicated the preferred
IECore.Data type for a given source.

The options selected here as the preferred one when there was ambiguity
were the same ones as returned by the simple (non-vector) types.

That required a small update to `dataTypeFromElementType()` in order to
avoid returning a random return, now that `list` entries in
`__dataTypesConversionDict` can have a preferred flag set to `True`.
…orLists

Data type conversion support for lists
@ivanimanishi ivanimanishi merged commit 164643e into main Jul 18, 2023
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants