Files
d2toolbox/d2toolbox/operators.py
2026-07-07 18:15:35 +02:00

30 lines
903 B
Python

import bpy
from . import globals
class D2TOOLBOX_OT_hello(bpy.types.Operator):
"""Example operator - replace with real functionality"""
bl_idname = "d2toolbox.hello"
bl_label = "Hello D2Toolbox"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
self.report({"INFO"}, "D2Toolbox says hello")
return {"FINISHED"}
class D2TOOLBOX_OT_refetch_manifest(bpy.types.Operator):
"""Refetch the Destiny 2 model manifest (run every once in a while to get the latest models)."""
bl_idname = "d2toolbox.refetch_manifest"
bl_label = "Refetch Manifest"
bl_options = {"REGISTER"}
def execute(self, context):
# Placeholder for manifest refresh logic
globals.fetchAndSaveManifest()
self.report({"INFO"}, "Manifest refreshed")
return {"FINISHED"}
classes = (
D2TOOLBOX_OT_hello,
D2TOOLBOX_OT_refetch_manifest
)