I believe there will be more addons in the future that apply machine learning.
However, using machine learning frameworks such as PyTorch on Blender requires user skills.
Therefore, I developed a preferences UI that allows users to easily install PyTorch and download models.
Great idea about the progress bar. I usually install modules with import pip and leave Blender freeze for while, not a good idea, but as I see with your code things are better.
Some other comments on the addon, though it might not make a big difference, but at least it would worth mention it, in terms of making the code sharper!
class DownloadClipModel(bpy.types.Operator):
bl_options = {'REGISTER', 'INTERNAL'}
[B]
Though it might be a great deal but you can reuse operators if needed, only to reduce boilerplate. As of these are identical. But only differe slightly.
class DownloadClipModel(bpy.types.Operator):
class DeleteClipModel(bpy.types.Operator):
So you kinda do this:
class DownloadLibrary(bpy.types.Operator):
lib_name: bpy.props.StringProperty()
def execute(self, context):
if self.lib_name == 'A': self.download_a()
elif self.lib_name == 'B': self.download_b()
class MotionGenerateToolsAddonPreferences(bpy.types.AddonPreferences):
def draw(self, _context: bpy.types.Context):
op = col.operator(DownloadLibrary.bl_idname)
op.lib_name = 'A'
I know almost nothing about bl_options.
So your suggesion will help me.
I think you are right, we could be more generalized in how we specify download models and dependent libraries.
For example, it would be a good idea to give requirements.txt.