This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/python
Campbell Barton 6a49041be3 Fix string lookups asserting or failing with unsupported collections
A recent change from [0] added an assert when a string lookup was
performed on a collection item with no name-property,
but silently failed with release builds.

This isn't correct in a couple of ways.
The assert makes it seem like the RNA API needs to be updated when
it's in fact valid to have collection items without a name-property.
It also misleads script authors to silently fail since it implies a
key that exists would return a result.

Raise a TypeError exception when string lookups are attempted on
collections that don't support them.

This change also applies to get() & __contains__().

[0]: 5bb3a3f157
2023-04-26 16:16:19 +10:00
..
2023-03-01 22:12:18 +11:00