You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some properties can be None and this should be indicated by declaring them with typing.Optional.
Properties do have an is_never_none attribute, but it's mostly used for properties that have an equivalent 'falsey' value, such as string properties that will be '' when there is no value set. Additionally, is_never_none can't be trusted, since bpy.types.Object.image_user has is_never_none, yet can actually be None.
I don't know if there's actually a way to tell if a property is optional. The is_required attribute sounds promising, but appears to only be used for function parameters.
The text was updated successfully, but these errors were encountered:
Some properties can be None and this should be indicated by declaring them with
typing.Optional
.Properties do have an
is_never_none
attribute, but it's mostly used for properties that have an equivalent 'falsey' value, such as string properties that will be''
when there is no value set. Additionally,is_never_none
can't be trusted, sincebpy.types.Object.image_user
hasis_never_none
, yet can actually beNone
.I don't know if there's actually a way to tell if a property is optional. The
is_required
attribute sounds promising, but appears to only be used for function parameters.The text was updated successfully, but these errors were encountered: