Encountered an issue where mesh generation would fail with the error: 'NoneType' object has no attribute 'grease_pencil'. This was caused by attempting to access grease_pencil from a non-existent material.
I added a simple check to ensure the material exists before attempting to access its grease_pencil attribute.
Thank you for the fix!
I found the same issue recently and added the check of empty material slots in some functions. However, I forgot to update this function.
Encountered an issue where mesh generation would fail with the error:
'NoneType' object has no attribute 'grease_pencil'
. This was caused by attempting to access grease_pencil from a non-existent material.I added a simple check to ensure the material exists before attempting to access its grease_pencil attribute.