Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
open_scene

在 3ds Max 中打开一个场景文件。

该工具将加载指定的 .max 场景文件。

Args: file_path: 要打开的场景文件完整路径,必须是 .max 文件。 例如: "C:/Projects/MyScene.max" force: 是否强制打开(不提示保存当前场景)。 "true" 表示强制打开(不保存当前更改), "false"(默认)表示如果当前场景有更改会先尝试保存。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - file_path (str): 打开的文件路径。 - message (str): 操作描述信息。

示例调用: open_scene(file_path="C:/Projects/MyScene.max")

示例调用 - 强制打开(不保存当前场景): open_scene(file_path="C:/Projects/MyScene.max", force="true")

save_scene

保存当前 3ds Max 场景文件。

该工具可以将当前场景保存到文件,支持覆盖保存和另存为。

Args: file_path: 保存的文件路径。 - 如果为空字符串,则保存到当前文件(覆盖保存)。 若当前场景未保存过则会失败。 - 如果指定了路径,则另存为到该路径。 路径必须以 .max 结尾,如 "C:/Projects/MyScene.max"。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - file_path (str): 保存的文件完整路径。 - message (str): 操作描述信息。

示例调用 - 覆盖保存: save_scene()

示例调用 - 另存为: save_scene(file_path="C:/Projects/MyScene.max")

new_scene

在 3ds Max 中新建/重置场景。

该工具将清空当前场景并创建一个新的空场景。

Args: force: 是否强制新建(不提示保存当前场景)。 "true"(默认)表示强制新建,不保存当前更改。 "false" 表示如果当前场景有未保存更改,会先保存。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - message (str): 操作描述信息。

示例调用 - 强制新建: new_scene()

示例调用 - 保存后新建: new_scene(force="false")

get_scene_objects

获取当前 3ds Max 场景中的所有对象信息。

该工具可以列出场景中的所有对象,或者按类型/名称进行过滤。 返回每个对象的名称、类型、位置、是否隐藏等基本信息。

支持的过滤类型(object_type 参数):

  • "": 返回所有对象(默认)

  • "Geometry": 仅返回几何体对象(Box、Sphere、Mesh 等)

  • "Light": 仅返回灯光对象

  • "Camera": 仅返回相机对象

  • "Helper": 仅返回辅助对象(Dummy、Point 等)

  • "Shape": 仅返回样条线/形状对象(Line、Circle、Rectangle 等)

  • "SpaceWarp": 仅返回空间扭曲对象

  • "Bone": 仅返回骨骼对象 也支持具体的类名,如 "Box"、"Sphere"、"Editable_Mesh" 等。

Args: object_type: 按类型过滤对象,可以是超类名(如 "Geometry")或具体类名(如 "Box")。 如果为空字符串则返回所有对象。 name_filter: 按名称过滤对象,支持通配符 ""。 例如: "Box" 匹配所有以 "Box" 开头的对象。 如果为空字符串则不按名称过滤。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - objects (list): 对象信息列表,每个元素包含: - name (str): 对象名称。 - class_name (str): 对象类名。 - super_class (str): 对象超类名。 - position (list): 位置坐标 [x, y, z]。 - is_hidden (bool): 是否隐藏。 - is_frozen (bool): 是否冻结。 - count (int): 返回的对象数量。 - total_in_scene (int): 场景中的总对象数量。 - message (str): 描述信息。

示例调用 - 获取所有对象: get_scene_objects()

示例调用 - 仅获取几何体: get_scene_objects(object_type="Geometry")

示例调用 - 按名称过滤: get_scene_objects(name_filter="Box*")

示例调用 - 按类型和名称组合过滤: get_scene_objects(object_type="Geometry", name_filter="Wall*")

import_file

在 3ds Max 中导入外部文件。

支持的格式包括 FBX、OBJ、Alembic(ABC)、STL、3DS 等 3ds Max 能识别的文件格式。 导入的对象将被添加到当前场景中。

Args: file_path: 要导入的文件完整路径。 支持的常见格式:.fbx, .obj, .abc, .stl, .3ds, .dae 等。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - file_path (str): 导入的文件路径。 - message (str): 操作描述信息。

示例调用: import_file(file_path="C:/Models/character.fbx")

示例调用: import_file(file_path="C:/Models/terrain.obj")

get_scene_info

获取当前 3ds Max 场景的综合信息。

该工具返回当前场景的全面信息,包括文件路径、对象统计、时间范围、 单位设置等,帮助 AI 了解场景的整体状态。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - file_path (str): 当前场景文件的完整路径(未保存时为空)。 - file_name (str): 场景文件名。 - is_saved (bool): 场景是否已保存。 - object_counts (dict): 各类型对象数量统计。 - total (int): 总对象数。 - geometry (int): 几何体数量。 - lights (int): 灯光数量。 - cameras (int): 相机数量。 - helpers (int): 辅助对象数量。 - shapes (int): 样条线数量。 - time_range (dict): 时间/帧范围。 - start (int): 起始帧。 - end (int): 结束帧。 - current (int): 当前帧。 - fps (float): 帧率。 - units (dict): 单位设置。 - system_type (str): 系统单位类型。 - system_scale (float): 系统单位缩放。 - display_type (str): 显示单位类型。 - message (str): 描述信息。

示例调用: get_scene_info()

export_file

从 3ds Max 导出场景或选中的对象到文件。

支持的格式包括 FBX、OBJ、STL、3DS 等。 可以导出场景中的全部对象或仅导出选中的对象。

Args: file_path: 导出文件的完整路径(包含扩展名)。 支持的格式:.fbx, .obj, .stl, .3ds, .dae 等。 selected_only: 是否仅导出选中的对象。 "true" 表示只导出选中对象。 "false"(默认)表示导出场景中所有对象。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - file_path (str): 导出的文件路径。 - selected_only (bool): 是否仅导出选中对象。 - message (str): 操作描述信息。

示例调用 - 导出全部对象为 FBX: export_file(file_path="C:/Export/scene.fbx")

示例调用 - 仅导出选中对象为 OBJ: export_file(file_path="C:/Export/selected.obj", selected_only="true")

assign_material

将材质赋予 3ds Max 场景中的指定物体。

该工具可以将已存在的材质赋予物体,支持通过材质名称或材质编辑器槽位索引来指定材质。

Args: object_name: 目标物体名称。支持通配符 "",如 "Box" 会赋予所有以 Box 开头的物体。 也支持用英文逗号分隔多个名称,如 "Box001,Sphere001"。 material_name: 材质名称。在场景的所有材质中查找匹配的材质。 与 slot_index 二选一,优先使用 material_name。 slot_index: 材质编辑器的槽位索引(1-24)。当 material_name 为空时使用此参数。 默认为 "0"(不使用槽位)。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - assigned (list): 成功赋予材质的物体列表。 - material_name (str): 使用的材质名称。 - message (str): 操作描述信息。

示例调用 - 按材质名称赋予: assign_material(object_name="Box001", material_name="RedMaterial")

示例调用 - 按槽位赋予: assign_material(object_name="Box001", slot_index="1")

示例调用 - 批量赋予: assign_material(object_name="Box*", material_name="WoodMaterial")

create_material

在 3ds Max 中创建一个材质。

该工具可以创建各种类型的材质,并设置基本属性如颜色等。 创建的材质会被放入 3ds Max 的材质编辑器中。

支持的材质类型(material_type 参数):

  • Standard: 标准材质(默认),支持 Blinn/Phong/Metal 等着色器。

  • Physical: 物理材质(PBR),适合写实渲染。

  • VRayMtl: V-Ray 材质(需要安装 V-Ray 插件)。

  • Multi_Sub: 多维子材质(Multi/Sub-Object)。

  • Blend: 混合材质。 以及其他 3ds Max 中可用的材质类名。

Args: material_type: 材质类型名称,默认为 "Standard"。 name: 材质名称。如果为空字符串则使用默认命名。 diffuse_color: 漫反射颜色,格式为 "r,g,b"(0-255),如 "255,0,0" 为红色。 留空则使用默认颜色。 params: 材质额外参数的 JSON 字符串。 例如: '{"opacity": 50, "specularLevel": 80}' 用于 Standard 材质。 留空则使用默认值。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - name (str): 创建的材质名称。 - material_type (str): 材质类型。 - slot_index (int): 材质编辑器中的槽位索引。 - message (str): 操作描述信息。

示例调用 - 创建红色标准材质: create_material(material_type="Standard", name="RedMaterial", diffuse_color="255,0,0")

示例调用 - 创建物理材质: create_material(material_type="Physical", name="MetalMat", diffuse_color="180,180,180")

示例调用 - 创建带参数的标准材质: create_material(material_type="Standard", name="GlassMat", diffuse_color="200,220,255", params='{"opacity": 30, "specularLevel": 90}')

delete_object

删除 3ds Max 场景中的指定物体。

该工具可以删除场景中指定名称的对象。支持通配符 "*" 进行批量删除。

Args: object_name: 要删除的物体名称。支持以下格式: - 精确名称:如 "Box001",删除指定物体。 - 通配符:如 "Box*",删除所有以 "Box" 开头的物体。 - 多个名称:用英文逗号分隔,如 "Box001,Sphere001,Cylinder001"。 - 特殊值 "*":删除场景中所有对象(谨慎使用!)。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - deleted (list): 被删除的对象名称列表。 - deleted_count (int): 被删除的对象数量。 - not_found (list): 未找到的对象名称列表(仅精确匹配时)。 - message (str): 操作描述信息。

示例调用 - 删除单个物体: delete_object(object_name="Box001")

示例调用 - 批量删除(通配符): delete_object(object_name="Box*")

示例调用 - 删除多个指定物体: delete_object(object_name="Box001,Sphere001,Cylinder001")

示例调用 - 删除所有物体: delete_object(object_name="*")

create_object

在 3ds Max 场景中创建一个基础几何体对象。

支持的几何体类型(object_type 参数):

  • Box: 长方体,参数: length, width, height, lengthsegs, widthsegs, heightsegs

  • Sphere: 球体,参数: radius, segments, smooth

  • Cylinder: 圆柱体,参数: radius, height, heightsegs, capsegs, sides, smooth

  • Plane: 平面,参数: length, width, lengthsegs, widthsegs

  • Torus: 圆环体,参数: radius1, radius2, segments, sides, smooth

  • Cone: 圆锥体,参数: radius1, radius2, height, heightsegs, capsegs, sides, smooth

  • Tube: 管状体,参数: radius1, radius2, height, heightsegs, capsegs, sides, smooth

  • Pyramid: 四棱锥,参数: width, depth, height

  • GeoSphere: 几何球体,参数: radius, segs

  • Teapot: 茶壶,参数: radius, segments, smooth

  • Hedra: 多面体,参数: radius, family, p, q

  • Torus_Knot: 圆环结,参数: radius, radius2, p, q, segments, sides 以及 3ds Max 中任何可用的基础创建类名。

Args: object_type: 几何体类型名称,如 "Box"、"Sphere"、"Cylinder" 等。 对于名称含空格的类型,使用下划线代替空格,如 "Torus_Knot"。 name: 对象名称。如果为空字符串则使用 3ds Max 的默认命名。 position: 对象的世界坐标位置,格式为 "x,y,z",如 "0,0,0" 或 "100,50,0"。 默认值为 "0,0,0"(世界原点)。 params: 对象创建参数的 JSON 字符串,键为属性名,值为属性值。 例如: '{"radius": 30, "segments": 32}' 用于创建球体。 例如: '{"length": 50, "width": 40, "height": 30}' 用于创建长方体。 如果为空字符串则使用默认参数。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - name (str): 创建的对象名称。 - object_type (str): 对象类型。 - position (list): 对象的位置坐标 [x, y, z]。 - applied_params (dict): 成功应用的参数。 - message (str): 操作描述信息。

示例调用 - 创建一个默认球体: create_object(object_type="Sphere")

示例调用 - 在指定位置创建带参数的长方体: create_object(object_type="Box", name="MyBox", position="100,0,0", params='{"length": 50, "width": 40, "height": 30}')

示例调用 - 创建圆柱体: create_object(object_type="Cylinder", name="MyCylinder", position="0,50,0", params='{"radius": 20, "height": 60, "sides": 24}')

示例调用 - 创建平面: create_object(object_type="Plane", params='{"length": 200, "width": 200, "lengthsegs": 10, "widthsegs": 10}')

clone_object

克隆 3ds Max 场景中的指定物体。

支持三种克隆模式:

  • Copy: 完全独立的副本(默认)。

  • Instance: 实例,与原对象共享修改器和参数。

  • Reference: 引用,可以在原对象基础上添加新修改器。

Args: object_name: 要克隆的源物体名称。 clone_type: 克隆类型,可选 "copy"、"instance"、"reference"。默认为 "copy"。 new_name: 克隆体的名称。如果为空,则使用 3ds Max 默认命名。 offset: 克隆体相对于原物体的偏移量,格式为 "x,y,z"。 默认为 "0,0,0"(与原物体重叠)。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - source_name (str): 源物体名称。 - clone_name (str): 克隆体名称。 - clone_type (str): 克隆类型。 - position (list): 克隆体位置 [x, y, z]。 - message (str): 操作描述信息。

示例调用 - 复制一个 Box: clone_object(object_name="Box001")

示例调用 - 实例化克隆并偏移: clone_object(object_name="Box001", clone_type="instance", offset="50,0,0")

示例调用 - 带名称的引用克隆: clone_object(object_name="Box001", clone_type="reference", new_name="Box001_Ref", offset="100,0,0")

set_object_transform

设置 3ds Max 场景中指定物体的变换属性(位置/旋转/缩放)。

该工具可以设置物体的位置、旋转和缩放,支持绝对模式和相对模式。 可以同时设置多个变换属性,也可以只设置其中一个。

Args: object_name: 目标物体的名称(场景中已存在的对象)。 position: 位置坐标,格式为 "x,y,z",如 "100,50,0"。 留空则不改变位置。 rotation: 旋转欧拉角(度数),格式为 "x,y,z",如 "0,0,45"。 留空则不改变旋转。 scale: 缩放比例,格式为 "x,y,z",如 "2,2,2"(等比放大2倍)。 也可使用单个值表示等比缩放,如 "1.5"(等同于 "1.5,1.5,1.5")。 留空则不改变缩放。 relative: 是否使用相对模式。"true" 表示在当前值基础上叠加, "false"(默认)表示设置为绝对值。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - object_name (str): 物体名称。 - old_transform (dict): 变换前的值。 - new_transform (dict): 变换后的值。 - message (str): 操作描述信息。

示例调用 - 移动物体到指定位置: set_object_transform(object_name="Box001", position="100,0,50")

示例调用 - 旋转物体45度(Z轴): set_object_transform(object_name="Box001", rotation="0,0,45")

示例调用 - 等比缩放物体: set_object_transform(object_name="Box001", scale="2,2,2")

示例调用 - 相对移动物体(在当前位置基础上偏移): set_object_transform(object_name="Box001", position="10,0,0", relative="true")

示例调用 - 同时设置位置和旋转: set_object_transform(object_name="Box001", position="100,50,0", rotation="0,0,90")

add_modifier

为 3ds Max 场景中的指定物体添加修改器(Modifier)。

该工具可以为场景中已存在的物体添加各种修改器,如 Bend、Twist、Taper、 TurboSmooth、Shell、UVW Map、Noise、Lattice、MeshSmooth 等。

支持的常见修改器类型(modifier_type 参数):

  • Bend: 弯曲修改器

  • Twist: 扭曲修改器

  • Taper: 锥化修改器

  • TurboSmooth: 涡轮平滑

  • MeshSmooth: 网格平滑

  • Shell: 壳修改器(给面片添加厚度)

  • Noise: 噪波修改器

  • Lattice: 晶格修改器

  • UVW_Map: UVW 贴图修改器(注意使用下划线代替空格)

  • Symmetry: 对称修改器

  • FFD_4x4x4: 自由变形修改器

  • Smooth: 平滑修改器

  • Relax: 松弛修改器

  • Push: 推力修改器

  • Stretch: 拉伸修改器

  • Squeeze: 挤压修改器

  • Ripple: 涟漪修改器

  • Wave: 波浪修改器

  • Skew: 倾斜修改器

  • Spherify: 球形化修改器

  • Edit_Poly: 编辑多边形修改器

  • Edit_Mesh: 编辑网格修改器 以及 3ds Max 中任何可用的修改器类名。

Args: object_name: 目标物体的名称(场景中已存在的对象)。 modifier_type: 修改器类型名称,如 "Bend"、"Twist"、"TurboSmooth" 等。 对于名称含空格的修改器,使用下划线代替空格,如 "UVW_Map"。 modifier_params: 修改器参数的 JSON 字符串,键为属性名,值为属性值。 例如: '{"angle": 90, "direction": 45}' 用于 Bend 修改器。 如果为空字符串则使用修改器默认参数。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - object_name (str): 物体名称。 - modifier_type (str): 添加的修改器类型。 - modifier_name (str): 修改器实例名称。 - applied_params (dict): 成功应用的参数。 - message (str): 操作描述信息。

示例调用 - 为物体添加弯曲修改器: add_modifier(object_name="Box001", modifier_type="Bend", modifier_params='{"angle": 90}')

示例调用 - 为物体添加涡轮平滑: add_modifier(object_name="Box001", modifier_type="TurboSmooth", modifier_params='{"iterations": 2}')

示例调用 - 为物体添加壳修改器(添加厚度): add_modifier(object_name="Plane001", modifier_type="Shell", modifier_params='{"innerAmount": 0, "outerAmount": 5}')

get_object_properties

获取 3ds Max 场景中指定物体的详细属性信息。

该工具返回物体的变换信息(位置/旋转/缩放)、几何属性、修改器列表、 材质信息等综合属性数据,帮助 AI 了解物体的当前状态。

Args: object_name: 目标物体的名称(场景中已存在的对象)。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - name (str): 物体名称。 - class_name (str): 物体类名(如 Box, Sphere, Editable_Poly 等)。 - super_class (str): 物体超类名(如 GeometryClass, Light 等)。 - transform (dict): 变换信息。 - position (list): 位置 [x, y, z]。 - rotation (list): 旋转欧拉角 [x, y, z](度数)。 - scale (list): 缩放 [x, y, z]。 - properties (dict): 物体的创建参数(如 radius, length 等)。 - modifiers (list): 修改器列表,每个包含 name 和 class_name。 - material (dict|None): 材质信息(如果有)。 - is_hidden (bool): 是否隐藏。 - is_frozen (bool): 是否冻结。 - wirecolor (list): 线框颜色 [r, g, b]。 - vertex_count (int): 顶点数(如果是网格对象)。 - face_count (int): 面数(如果是网格对象)。 - message (str): 操作描述信息。

示例调用: get_object_properties(object_name="Box001")

示例调用: get_object_properties(object_name="MCP_Sphere")

rename_object

重命名 3ds Max 场景中的指定物体。

Args: object_name: 当前物体名称(场景中已存在的对象)。 new_name: 新的物体名称。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - old_name (str): 原名称。 - new_name (str): 新名称。 - message (str): 操作描述信息。

示例调用: rename_object(object_name="Box001", new_name="Wall_Left")

set_object_property

设置 3ds Max 场景中指定物体的属性值。

该工具可以设置物体的各种属性,包括显示属性和创建参数。

常用属性名称(property_name 参数):

  • wirecolor: 线框颜色,值格式 "r,g,b" (0-255),如 "255,0,0"

  • isHidden: 是否隐藏,值 "true" 或 "false"

  • isFrozen: 是否冻结,值 "true" 或 "false"

  • renderable: 是否可渲染,值 "true" 或 "false"

  • boxMode: 是否以盒模式显示,值 "true" 或 "false"

  • backfaceCull: 是否背面剔除,值 "true" 或 "false"

  • 以及对象的创建参数(如 radius、length、width、height、segments 等)

Args: object_name: 目标物体名称。支持通配符 "*" 进行批量设置。 property_name: 属性名称。 property_value: 属性值(字符串形式)。 数字值: "30"、"1.5" 布尔值: "true"、"false" 颜色值: "255,0,0"(仅 wirecolor 属性使用)

Returns: dict: 操作结果。 - success (bool): 是否成功。 - modified (list): 成功修改的物体列表。 - property_name (str): 属性名称。 - property_value (str): 设置的属性值。 - message (str): 操作描述信息。

示例调用 - 设置线框颜色为红色: set_object_property(object_name="Box001", property_name="wirecolor", property_value="255,0,0")

示例调用 - 隐藏物体: set_object_property(object_name="Box001", property_name="isHidden", property_value="true")

示例调用 - 修改球体半径: set_object_property(object_name="Sphere001", property_name="radius", property_value="50")

示例调用 - 批量冻结所有 Box: set_object_property(object_name="Box*", property_name="isFrozen", property_value="true")

select_objects

在 3ds Max 场景中选择或取消选择对象。

该工具可以按名称或类型选择场景中的对象,也可以清除当前选择。

Args: object_name: 要选择的物体名称。支持以下格式: - 精确名称:如 "Box001" - 通配符:如 "Box*" 选择所有以 Box 开头的物体 - 多个名称:用英文逗号分隔,如 "Box001,Sphere001" - 留空配合 object_type 使用,按类型选择 object_type: 按类型选择,如 "Geometry"、"Light"、"Camera"、"Box"、"Sphere" 等。 可与 object_name 组合使用。 action: 操作类型。 - "select": 选择匹配的对象(默认),替换当前选择。 - "add": 将匹配的对象添加到当前选择中。 - "deselect": 从当前选择中移除匹配的对象。 - "clear": 清除所有选择(忽略 object_name 和 object_type)。 - "invert": 反转当前选择(忽略 object_name 和 object_type)。 - "all": 选择所有对象(忽略 object_name 和 object_type)。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - selected (list): 当前选中的对象名称列表。 - selected_count (int): 当前选中的对象数量。 - message (str): 操作描述信息。

示例调用 - 选择单个对象: select_objects(object_name="Box001")

示例调用 - 按通配符选择: select_objects(object_name="Wall*")

示例调用 - 按类型选择所有灯光: select_objects(object_type="Light")

示例调用 - 清除选择: select_objects(action="clear")

示例调用 - 选择所有对象: select_objects(action="all")

create_light

在 3ds Max 场景中创建一个灯光对象。

支持的灯光类型(light_type 参数):

  • Omni: 泛光灯(点光源),向四周均匀照射(默认)。

  • TargetSpot: 目标聚光灯,带目标点的锥形光源。

  • FreeSpot: 自由聚光灯,无目标点的锥形光源。

  • TargetDirect: 目标平行光,平行方向光照。

  • FreeLight: 自由灯光。

  • Skylight: 天光,模拟天空环境光照。

  • mr_Sky_Portal: Mental Ray 天空门户(需要 MR 插件)。 以及 V-Ray、Arnold 等插件的灯光类型(如 VRayLight、aiAreaLight)。

Args: light_type: 灯光类型名称。默认为 "Omni"。 name: 灯光名称。如果为空则使用默认命名。 position: 灯光位置,格式为 "x,y,z"。默认为 "0,0,100"。 color: 灯光颜色,格式为 "r,g,b" (0-255)。默认为 "255,255,255"(白色)。 intensity: 灯光强度/倍增器,默认 "1.0"。 params: 灯光额外参数的 JSON 字符串。 例如: '{"castShadows": true, "hotspot": 30, "falloff": 60}' 用于聚光灯。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - name (str): 创建的灯光名称。 - light_type (str): 灯光类型。 - position (list): 位置 [x, y, z]。 - message (str): 操作描述信息。

示例调用 - 创建泛光灯: create_light(light_type="Omni", name="MainLight", position="0,0,200", color="255,245,230", intensity="1.5")

示例调用 - 创建聚光灯: create_light(light_type="FreeSpot", name="SpotLight01", position="100,0,150", params='{"hotspot": 30, "falloff": 60}')

示例调用 - 创建天光: create_light(light_type="Skylight", intensity="0.8")

set_keyframe

在 3ds Max 中为指定物体的属性设置关键帧。

该工具可以在指定帧为物体的变换属性(位置/旋转/缩放)或自定义属性设置关键帧。

Args: object_name: 目标物体名称。 frame: 关键帧所在的帧号,如 "0"、"30"、"60"。 position: 在该帧的位置值,格式 "x,y,z"。留空表示不设置位置关键帧。 rotation: 在该帧的旋转值(欧拉角度数),格式 "x,y,z"。留空表示不设置旋转关键帧。 scale: 在该帧的缩放值,格式 "x,y,z" 或单个值如 "2"。留空表示不设置缩放关键帧。 property_name: 自定义属性名(如 "radius"、"height" 等)。与 property_value 配合使用。 property_value: 自定义属性在该帧的值。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - object_name (str): 物体名称。 - frame (int): 关键帧号。 - keys_set (list): 成功设置的关键帧类型列表。 - message (str): 操作描述信息。

示例调用 - 设置位置关键帧: set_keyframe(object_name="Box001", frame="0", position="0,0,0") set_keyframe(object_name="Box001", frame="30", position="100,0,0")

示例调用 - 设置位置和旋转关键帧: set_keyframe(object_name="Box001", frame="0", position="0,0,0", rotation="0,0,0") set_keyframe(object_name="Box001", frame="60", position="100,0,0", rotation="0,0,360")

示例调用 - 设置自定义属性关键帧(如半径动画): set_keyframe(object_name="Sphere001", frame="0", property_name="radius", property_value="10") set_keyframe(object_name="Sphere001", frame="30", property_name="radius", property_value="50")

set_time_range

设置 3ds Max 的时间/帧范围参数。

该工具可以设置动画的帧范围、当前帧位置和帧率。 所有参数都是可选的,只设置你需要修改的参数。

Args: start_frame: 动画起始帧。留空不修改。 end_frame: 动画结束帧。留空不修改。 current_frame: 当前帧(时间滑块位置)。留空不修改。 fps: 帧率。常见值: "24"(电影)、"25"(PAL)、"30"(NTSC)。留空不修改。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - time_range (dict): 设置后的时间范围信息。 - message (str): 操作描述信息。

示例调用 - 设置帧范围: set_time_range(start_frame="0", end_frame="100")

示例调用 - 设置当前帧: set_time_range(current_frame="50")

示例调用 - 设置帧率和范围: set_time_range(start_frame="0", end_frame="240", fps="24")

execute_maxscript

在 3ds Max 中执行一段 MAXScript 代码并返回结果。

该工具允许你发送 MAXScript 代码到 3ds Max 中执行。 适用于某些用 MAXScript 更直接或更方便的操作场景。

使用说明:

  • 脚本中最后一个表达式的值将作为返回结果。

  • 如果需要返回复杂结构,建议将结果构造为字符串或在脚本中使用 print。

  • MAXScript 文档参考: https://help.autodesk.com/view/3DSMAX/2025/ENU/?guid=GUID-MAXScript-Index

Args: script: 要执行的 MAXScript 代码字符串。

Returns: dict: 操作结果。 - success (bool): 是否成功执行。 - result (str): MAXScript 执行结果的字符串表示。 - message (str): 操作描述信息。

示例脚本 - 获取选中对象数量: execute_maxscript(script="selection.count")

示例脚本 - 选中所有 Box 对象: execute_maxscript(script="select (for obj in objects where classOf obj == Box collect obj)")

示例脚本 - 重置场景: execute_maxscript(script="resetMaxFile #noPrompt")

示例脚本 - 设置渲染分辨率: execute_maxscript(script="renderWidth = 1920; renderHeight = 1080")

execute_python_script

在 3ds Max 中执行一段 Python 脚本并返回执行结果。

该工具允许你发送任意 Python 代码到 3ds Max 中执行。 脚本在 3ds Max 的 Python 环境中运行,可以访问 pymxs、MaxPlus 等模块。

使用说明:

  • 脚本中可以通过 import pymxs; rt = pymxs.runtime 来访问 MAXScript 运行时。

  • 脚本中可以使用 print() 输出调试信息(会打印到 3ds Max 控制台)。

  • 如果需要返回结果,请将结果赋值给 _mcp_max_results 变量(字典或可 JSON 序列化的对象)。

  • 如果脚本没有设置 _mcp_max_results,则返回 {"success": True, "message": "脚本已执行完成"}

示例脚本 - 获取场景中所有对象的名称: import pymxs rt = pymxs.runtime names = [str(obj.name) for obj in rt.objects] _mcp_max_results = {"success": True, "object_names": names, "count": len(names)}

示例脚本 - 创建一个球体: import pymxs rt = pymxs.runtime sphere = rt.Sphere(radius=30, pos=rt.Point3(0, 0, 0)) sphere.name = "MCP_Sphere" _mcp_max_results = {"success": True, "name": str(sphere.name), "radius": 30}

Args: script: 要在 3ds Max 中执行的 Python 脚本代码字符串。

Returns: dict: 包含执行结果的字典。 - success (bool): 脚本是否执行成功。 - 其他字段取决于脚本中 _mcp_max_results 的内容。

get_max_version

获取当前 3ds Max 的版本信息和环境信息。

该工具返回 3ds Max 的版本号、构建信息、Python 版本等环境信息, 帮助了解运行环境。

Returns: dict: 操作结果。 - success (bool): 是否成功。 - max_version (str): 3ds Max 版本号。 - max_version_number (int): 3ds Max 版本数字。 - python_version (str): Python 版本。 - message (str): 描述信息。

示例调用: get_max_version()

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/317431629/3dsMaxMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server