Batch material

From shuotao/REVIT_MCP_study · View interactive version

Batch material is an AI agent skill from the GitHub repository shuotao/REVIT_MCP_study. 批次材質修改(複製原材質模式):為每個 Type 的原材質建立複本,只修改複本的 Appearance diffuse color,保留 Graphics 顏色與其他屬性。適用於渲染白模(Enscape/V-Ray 看到白色,平面圖切割圖案維持原材質)。也支援復原(assign_existing_material)。觸發條件:使用者提到材質、material、白色模型、white model、渲染、render、批次換材質、統一材質、復原材質、restore material。工具:get_types_by_category、batch_set_material、assign_existing

How to use this skill

Skill file

批次材質修改

核心設計:複製原材質模式

不是建立單一共用的白色材質,而是為每個原材質獨立複製一份:

只修改複本的 Appearance Asset(Enscape/V-Ray 渲染色):

複合構造(牆/樓板)只改 Layer 0(最外層),其他層保留原材質。

Prerequisites

Workflow

步驟 1:查詢類別與類型

使用 get_types_by_category 查詢使用者指定的類別:

整理成表格展示每個 type 的名稱、族群、數量、目前材質。

步驟 2:使用者確認

將表格展示給使用者,詢問:

必須等使用者明確回覆後才進入步驟 3。

步驟 3:執行修改

使用 batch_set_material:

batch_set_material({
    typeIds: [...],
    color: { r: 245, g: 245, b: 240 },
    materialName: "護眼白_MCP"    // 當作 suffix 用
})

步驟 4:確認結果

復原步驟(Undo)

如果使用者想恢復原材質,使用 assign_existing_material:

assign_existing_material({
    typeIds: [...],
    materialName: "鋼 AISI 1015"    // 要恢復的既有材質名
})

復原時 SetCompoundStructureAllLayers 會把 CompoundStructure 全層都設回同一材質(不只是 Layer 0)。

注意事項

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.