Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Studio policy: Connect an AI tool gone when MCP is off; viewport_image checked and audited like other MCP tools
islandmed49f683ed3271
diff --git a/docs/guide/studios.md b/docs/guide/studios.mdindex 82f91192..66e6210c 100644--- a/docs/guide/studios.md+++ b/docs/guide/studios.md@@ -296,7 +296,7 @@ code 2 when it is broken); use it to check a file before you deploy it.| `network.enabled` | `false`: studio mode (see [Offline deployment](#offline-deployment)): no outside connection except `network.allow`, `ai.endpoints`, the identity provider and your update feed || `network.allow` | More URL prefixes that stay reachable while the network is off || `network.localNetwork` | `true`: the Unreal link and phone capture may use the studio network while the network is off |-| `mcp.enabled` | `false`: no AI tool can connect (`sculptforge-cli --mcp` refuses to start) |+| `mcp.enabled` | `false`: no AI tool can connect (`sculptforge-cli --mcp` refuses to start, and **Help > Connect an AI tool** is gone) || `mcp.live` | `"never"`: AI tools work only on their own scene and can never control an open SculptForge window || `mcp.categories` | The kinds of command AI tools may use: `info` (read the scene), `edit` (change it in memory), `files` (open, save, export, bridges), `scripts` (macros), `network` (brush gallery, Unreal), `ai` (AI generation). Left out: all || `audit.path`, `audit.maxMB`, `audit.keep` | Where the [audit log](#audit-log) goes, when it rotates (10 MB) and how many old files it keeps (5) |diff --git a/src/app/PanelAi.cpp b/src/app/PanelAi.cppindex a32777fb..a2af8a6b 100644--- a/src/app/PanelAi.cpp+++ b/src/app/PanelAi.cpp@@ -89,8 +89,8 @@ void App::registerAiActions() {"Brush Lab: describe a brush in words and AI builds it; tweak the recipe with sliders.");flag("ui.generate3d", "Generate 3D", ICON_LC_WAND_SPARKLES, "Generate", &showImageTo3D_,"Turn an image or a description into a sculptable model (Hugging Face, fal.ai, Meshy, ComfyUI or offline).");- // Help > Connect an AI tool (PanelConnectAi.cpp). (Managed policy, feat/studio-ready: register it only when MCP is- // allowed, sf::policy::mcpAllowed().)+ // Help > Connect an AI tool (PanelConnectAi.cpp): not when a studio's policy turns AI tools (MCP) off.+ if (!policy::mcpAllowed()) return;Action connect;connect.id = "help.connect_ai";connect.label = "Connect an AI tool...";diff --git a/src/app/PanelConnectAi.cpp b/src/app/PanelConnectAi.cppindex 56561c2f..356077bc 100644--- a/src/app/PanelConnectAi.cpp+++ b/src/app/PanelConnectAi.cpp@@ -5,6 +5,7 @@// signs in to, the exact command or configuration for this install with Copy buttons. Only while AI features are on// (Preferences > AI): the action is registered in registerAiActions() and removed with the others.#include "app/App.h"+#include "core/ManagedPolicy.h"#include "app/ConnectAi.h"#include "app/I18n.h"@@ -70,6 +71,10 @@ void codeBox(const std::string& text, const std::string& id, ImFont* mono) {void App::drawConnectAi() {if (!showConnectAi_) return;+ if (!policy::mcpAllowed()) { // (a studio's policy turned AI tools off: core/ManagedPolicy.h)+ showConnectAi_ = false;+ return;+ }const float s = uiScale_;ImGui::SetNextWindowSize(ImVec2(720 * s, 640 * s), ImGuiCond_FirstUseEver);ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));