Very cool script! I’ve only been playing with it a few minutes, but the thing I find strange (which I’m sure you’re probably already working on) is that when you add a new gear either from the add menu or convert an existing mesh object to a gear I would expect it to create a new ‘GearHeadEmpy.***’ empty and not parent it to the same empty. Only when I press the ‘Gear’ button in the modifier panel would I expect it to be parented to the same empty and have it’s drivers set.
Oh! Also I did notice that you are creating a new meshes every time you change any settings even the ‘twin’ and ‘driver’ settings which I think if the gear properties were animated could result in a lot of system memory being use to store lots of meshes with no users, I have never used bmesh but changing line 243 from:
me = bpy.data.meshes.new(“Gear”)
me = g.data
and removing 246:
g.data = me
Seems to fix the problem.
Having used other 3d packages for along time I see the logic of having it in the modifier stack but maybe from a Blender users point of view it should be in the object view or split between the object and object data views. At the very least you need to add a check so it’s only visible if you select a mesh object.
Thank you for sharing this script.