MCPcopy
hub / github.com/ahujasid/blender-mcp / execute

Method execute

addon.py:2551–2564  ·  view source on GitHub ↗
(self, context)

Source from the content-addressed store, hash-verified

2549 bl_label = "Set Free Trial API Key"
2550
2551 def execute(self, context):
2552 prefs = get_blendermcp_addon_preferences(context)
2553 if prefs:
2554 if not prefs.hyper3d_api_key or prefs.hyper3d_api_key == RODIN_FREE_TRIAL_KEY:
2555 prefs.hyper3d_api_key = RODIN_FREE_TRIAL_KEY
2556 else:
2557 self.report(
2558 {'INFO'},
2559 "Using free trial for this session only; saved private key was kept."
2560 )
2561 context.scene.blendermcp_hyper3d_api_key = RODIN_FREE_TRIAL_KEY
2562 context.scene.blendermcp_hyper3d_mode = 'MAIN_SITE'
2563 self.report({'INFO'}, "API Key set successfully!")
2564 return {'FINISHED'}
2565
2566# Operator to start the server
2567class BLENDERMCP_OT_StartServer(bpy.types.Operator):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected