nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.35k stars 96 forks source link

IDMaterials append should accept `None` as a valid argument #127

Closed cmbasnett closed 1 year ago

cmbasnett commented 1 year ago

System Information

Expected behavior

IDMaterials.append should accept None as an argument (i.e., Optional[Material]). Passing None as an argument adds an empty material slot.

Description about the bug

This is probably just a documentation issue. The documentation should be updated to reflect that it can accept a None argument.

Screenshots/Files [Optional]

image

Additional comments [Optional]

nutti commented 1 year ago

@cmbasnett

Thanks. I'm wondering about the handling of Nullable arugment. From the discussion, it seems that all parameters without (Never None) can allow None. https://github.com/nutti/fake-bpy-module/issues/121#issuecomment-1338900563

It helps me a lot if you share the method to distinguish between non-Nullable argument and Nullable argument.

nutti commented 1 year ago

This issue is now fixed.