patch [#25809] Auto-Registration as utility function.
This removes auto-registration, committed by Martin r30961. Realize this is a contentious topic but Brecht and myself both would rather opt-in registration. TODO: - addons need updating. - class list will be modified to use weakrefs (should have been done for existing system too). - will move bpy.types.(un)register functions into bpy.utils.(un)register_class, currently including these functions in a type list is internally ugly, scripts which loop over types also need to check for these.
This commit is contained in:
@@ -369,10 +369,12 @@ def menu_func(self, context):
|
||||
|
||||
|
||||
def register():
|
||||
bpy.utils.register_module(__name__)
|
||||
bpy.types.IMAGE_MT_uvs.append(menu_func)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_module(__name__)
|
||||
bpy.types.IMAGE_MT_uvs.remove(menu_func)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user