Regarding bm->totedge
allocation, we could reduce the allocation to only store an array the size of edges which may be joined.
I'd suspect the benefit to calculating the array size and making…
Overall this seems fine, I've made updates to the PR (!129138) which address the inline comments.
Technically incorrect bpy
should be bpy.utils
... although this will always be set in practice.
Instead of having both addon_utils.disable_all()
, bpy.utils.unregister_startup_scripts()
called from different parts of the WM code, I'd rather have a single shutdown function defined in Python, then we can always add additional cleanup logic there instead of having to add awkward BPY_run_string_eval
calls each time.
Since this runs almost 6000 times, I was worried there might be unnecessary overhead as each call locks Python's GIL.
Since the PR was made except Exception:
was used, same for unregister.
This is such a spesific function which we never want add-on authors to call, I think a _
prefixed name makes more sense ... it can be left out of "all" too.
Actually scanning directories on exit isn't unnecessary,