Token导航 LogoToken导航

Agent Skill · 研究检索

cinema4d-mcp(cinema4d MCP 搜索)

cinema4d-mcp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cinema4d-mcp 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 47,601。

总安装 727周安装 30GitHub Stars 3下载 238核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cinema4d-mcp(cinema4d MCP 搜索)
来源仓库:https://github.com/vladmdgolam/agent-skills
仓库路径:skills/cinema4d-mcp
安装命令:
npx skills add https://github.com/vladmdgolam/agent-skills --skill cinema4d-mcp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vladmdgolam/agent-skills --skill cinema4d-mcp

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找和筛选 Cinema 4D 相关资源,支持关键词检索与结果筛选。适合在建模、材质或渲染流程中快速定位候选方案或技术资料。需根据任务场景提供明确关键词,建议结合原始文档验证输出准确性。安装前请确认仓库访问权限,注意可能涉及外部 API 调用和数据读取。

cinema4d-mcp 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/cinema4d-mcp

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vladmdgolam/agent-skills --skill cinema4d-mcp;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cinema4d-mcp 怎么安装?

在终端执行 npx skills add https://github.com/vladmdgolam/agent-skills --skill cinema4d-mcp。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cinema4d-mcp 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cinema4d-mcp 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

cinema4d-mcp 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cinema4d-mcp 用的人多吗?

公开数据是累计安装 727 次,近一周安装 30 次,下载 238 次,GitHub 3 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cinema4d-mcp 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
cinema4d-mcp

cinema4d MCP 搜索 · 本页

7273调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Cinema 4D MCP

Source of Truth

This skill targets Vlad's fork of Cinema 4D MCP: vladmdgolam/cinema4d-mcp.

Relevant fork additions:

  • inspect_redshift_materials - read-only Redshift inspector for assignments, preview-derived colors, readable description/container fields, and best-effort graph probing. Note: this tool may skip RS materials as not_redshift_like (type 5703) — use execute_python_script with the maxon API for full RS node graph extraction instead (see Redshift Material Extraction section).
  • Duplicate-safe material targeting - the inspector accepts material_index and returns stable scene indices plus duplicate-name hints when names collide.
  • Redshift GraphView fallback - when node-space access fails but import redshift works, the inspector falls back to redshift.GetRSMaterialNodeMaster(...) and reports GraphView nodes plus resolved connections.
  • The loaded C4D plugin may lag behind the repo copy. After plugin edits, restart Cinema 4D before trusting new tool behavior.

Tool Selection

Use structured MCP tools (get_scene_info, list_objects, add_primitive, etc.) for simple operations.

Use execute_python_script as the primary path for non-trivial extraction. It avoids wrapper/schema mismatches, gives full c4d + maxon API access, and allows proper frame stepping control. This is especially important for Redshift material extraction — the maxon node-space API gives full access to RS node graphs, which other tools may miss.

Use inspect_redshift_materials as a quick overview of material assignments and preview colors, but be aware it may skip RS materials as not_redshift_like if they use type 5703 wrappers. For full RS node graph data, use execute_python_script with the maxon API pattern documented in the Redshift section.

Health Check (Always First)

  1. get_scene_info - verify connection
  2. execute_python_script with print("ok") - verify Python works
  3. If both work, extraction is possible even when other tools are broken

Critical Rules

1. World vs Local Coordinates

GeGetMoData() returns cloner-local positions. Always apply global matrix:

mg = cloner.GetMg()
world_pos = mg * m.off  # LOCAL -> WORLD

Missing this shifts everything by the cloner's global offset.

2. Visibility Constants Are Swapped

  • MODE_OFF = 1 (not 0!)
  • MODE_ON = 0 (not 1!)
  • MODE_UNDEF = 2 (default/inherit)

Always use c4d.MODE_OFF / c4d.MODE_ON, never raw integers.

3. Sequential Frame Stepping

MoGraph effectors accumulate state. Iterate 0->N sequentially:

for frame in range(start, end + 1):
    doc.SetTime(c4d.BaseTime(frame, fps))
    doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_NONE)
    # NOW read data

Never jump to arbitrary frames. Never skip ExecutePasses.

4. Split Heavy Bakes

MCP scripts timeout on large frame ranges (~20-30s default, some forks 60s). Bake in chunks (e.g., frames 0-200, then 200-400), combine afterward. Log progress with print().

5. Iterative Traversal Only

Use stack-based traversal. Recursive traversal hits Python recursion limits:

def find_obj(name):
    stack = [doc.GetFirstObject()]
    while stack:
        obj = stack.pop()
        while obj:
            if obj.GetName() == name:
                return obj
            if obj.GetDown():
                stack.append(obj.GetDown())
            obj = obj.GetNext()
    return None

6. API Version Compatibility

Constants differ between C4D versions. Use defensive checks:

if hasattr(c4d, "SCENEFILTER_ANIMATION"):
    ...

7. Check Render Visibility

Objects can be disabled via traffic lights (GetRenderMode()), RS Object tags, parent hierarchy inheritance, or Takes system.

Complete Animation Bake Workflow

This is the authoritative end-to-end procedure. Follow it in order — each step gates the next.

Step 1: Health Check

# Tool call: get_scene_info
# Then:
import c4d
print(doc.GetDocumentName(), doc.GetFps(), doc.GetMaxTime().GetFrame(doc.GetFps()))

Confirm: scene name resolves, fps is correct (typically 24/25/30), max frame is the expected end frame.

Step 2: Discover Animation Tracks

Before baking, confirm the cloner actually has animated effectors:

import c4d

def find_obj(name):
    stack = [doc.GetFirstObject()]
    while stack:
        obj = stack.pop()
        while obj:
            if obj.GetName() == name:
                return obj
            if obj.GetDown():
                stack.append(obj.GetDown())
            obj = obj.GetNext()
    return None

fps = doc.GetFps()
cloner = find_obj("MyClonerName")  # replace with actual name

# Check direct tracks on cloner
for t in cloner.GetCTracks():
    did = t.GetDescriptionID()
    ids = [int(did[i].id) for i in range(did.GetDepth())]
    curve = t.GetCurve()
    key_count = curve.GetKeyCount() if curve else 0
    print(f"Track IDs: {ids}, keys: {key_count}")

# Check effector children for their own tracks
child = cloner.GetDown()
while child:
    for t in child.GetCTracks():
        did = t.GetDescriptionID()
        ids = [int(did[i].id) for i in range(did.GetDepth())]
        print(f"  Effector '{child.GetName()}' track IDs: {ids}")
    child = child.GetNext()

If no tracks appear, the animation may be driven by fields or expressions — proceed to bake anyway; ExecutePasses will resolve those.

Step 3: Bake MoGraph (Sequential Frame Stepping)

import c4d
from c4d.modules import mograph as mo
import json

def find_obj(name):
    stack = [doc.GetFirstObject()]
    while stack:
        obj = stack.pop()
        while obj:
            if obj.GetName() == name:
                return obj
            if obj.GetDown():
                stack.append(obj.GetDown())
            obj = obj.GetNext()
    return None

def vec(v):
    return [float(v.x), float(v.y), float(v.z)]

fps = doc.GetFps()
start = 0
end = int(doc.GetMaxTime().GetFrame(fps))
cloner = find_obj("MyClonerName")
mg = cloner.GetMg()  # global matrix for LOCAL->WORLD

frames_data = {}

for frame in range(start, end + 1):
    doc.SetTime(c4d.BaseTime(frame, fps))
    doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_NONE)

    md = mo.GeGetMoData(cloner)
    if md is None:
        print(f"Frame {frame}: no MoData")
        continue

    matrices = md.GetArray(c4d.MODATA_MATRIX)
    clone_indices = md.GetArray(c4d.MODATA_CLONE)

    frame_clones = []
    for i, m in enumerate(matrices):
        world_pos = mg * m.off
        scale = (m.v1.GetLength() + m.v2.GetLength() + m.v3.GetLength()) / 3.0
        frame_clones.append({
            "index": i,
            "position": vec(world_pos),
            "scale": float(scale),
            "clone_index": float(clone_indices[i]) if clone_indices else None
        })

    frames_data[frame] = frame_clones
    if frame % 50 == 0:
        print(f"Baked frame {frame}/{end}")

print(f"Done. Total frames baked: {len(frames_data)}")

Step 4: Extract Keyframes (Optional — for sparse data)

If you need keyframe-only data rather than every-frame bake:

import c4d

fps = doc.GetFps()
obj = find_obj("MyObject")

keyframe_data = {}
for t in obj.GetCTracks():
    did = t.GetDescriptionID()
    ids = [int(did[i].id) for i in range(did.GetDepth())]
    curve = t.GetCurve()
    if not curve:
        continue
    keys = []
    for k in range(curve.GetKeyCount()):
        key = curve.GetKey(k)
        keys.append({
            "frame": key.GetTime().GetFrame(fps),
            "value": float(key.GetValue())
        })
    keyframe_data[str(ids)] = keys

print(json.dumps(keyframe_data))

Step 5: Export JSON

import json

output = {
    "scene": doc.GetDocumentName(),
    "fps": fps,
    "start_frame": start,
    "end_frame": end,
    "clone_count": len(frames_data.get(start, [])),
    "frames": frames_data
}

import tempfile, os
export_path = os.path.join(tempfile.gettempdir(), "mograph_export.json")
with open(export_path, "w") as f:
    json.dump(output, f)

print(f"Exported {len(frames_data)} frames to {export_path}")

Step 6: Validate

Run this after export to catch silent errors before handing data downstream:

import json, math

with open(export_path) as f:
    data = json.load(f)

fps = data["fps"]
start = data["start_frame"]
end = data["end_frame"]
expected_frames = end - start + 1
actual_frames = len(data["frames"])

errors = []

if actual_frames != expected_frames:
    errors.append(f"Frame count mismatch: expected {expected_frames}, got {actual_frames}")

nan_count = 0
for frame_key, clones in data["frames"].items():
    for clone in clones:
        for coord in clone["position"]:
            if math.isnan(coord) or math.isinf(coord):
                nan_count += 1
        if clone.get("clone_index") is not None:
            if not (0.0 <= clone["clone_index"] <= 1.0):
                errors.append(f"Frame {frame_key} clone {clone['index']}: clone_index out of range: {clone['clone_index']}")

if nan_count > 0:
    errors.append(f"NaN/Inf found in {nan_count} position coordinates")

if errors:
    for e in errors:
        print("ERROR:", e)
else:
    print("Validation passed.")
    print(f"  Frames: {actual_frames}, Clones per frame: {data['clone_count']}")

Validation Checklist

Before Baking

  • Frame range set in scene (doc.GetMaxTime() returns expected end frame)
  • All effectors active (check visibility traffic lights and Tags)
  • No interfering Takes (doc.GetTakeData().GetCurrentTake() is the correct take)
  • Test on small range (frames 0-10) first — confirm clone count and positions look right before running full bake

After Baking

  • Total frame count equals end - start + 1 (no off-by-one, no gaps)
  • No NaN or Inf values in position coordinates
  • Clone indices are in range 0.0–1.0 (if using MODATA_CLONE)
  • World positions make sense — spot-check frame 0 and last frame against viewport

MoGraph Extraction Pattern

import c4d
from c4d.modules import mograph as mo

def vec(v):
    return [float(v.x), float(v.y), float(v.z)]

cloner = find_obj("ClonerName")
mg = cloner.GetMg()

for frame in range(start, end + 1, step):
    doc.SetTime(c4d.BaseTime(frame, fps))
    doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_NONE)
    md = mo.GeGetMoData(cloner)
    matrices = md.GetArray(c4d.MODATA_MATRIX)
    for i, m in enumerate(matrices):
        world_pos = mg * m.off
        scale = (m.v1.GetLength() + m.v2.GetLength() + m.v3.GetLength()) / 3.0

Animation Track Discovery

for t in obj.GetCTracks():
    did = t.GetDescriptionID()
    ids = [int(did[i].id) for i in range(did.GetDepth())]
    curve = t.GetCurve()
    keys = []
    if curve:
        for k in range(curve.GetKeyCount()):
            key = curve.GetKey(k)
            keys.append({"frame": key.GetTime().GetFrame(fps), "value": float(key.GetValue())})

Cloner Mode Constants

c4d.ID_MG_MOTIONGENERATOR_MODE: 0=Grid, 1=Linear, 2=Radial, 3=Object, 4=Honeycomb
c4d.MG_GRID_MODE: 0=Endpoint (total span), 1=Per Step (spacing)

Redshift Material Extraction

RS node graphs ARE accessible via the maxon Python API when Redshift is installed. The inspect_redshift_materials MCP tool may report materials as not_redshift_like (type 5703), but the node graph is still readable through the maxon node-space API.

Primary Path: maxon Node-Space API (Proven Working)

RS materials use node space com.redshift3d.redshift4c4d.class.nodespace. Access via:

import c4d
import maxon

RS_NODESPACE = "com.redshift3d.redshift4c4d.class.nodespace"

mat = doc.GetMaterials()[0]
nm = mat.GetNodeMaterialReference()
graph = nm.GetGraph(RS_NODESPACE)  # returns NodesGraphModelRef

# Traverse ALL nodes and ports:
root = graph.GetRoot()
inner = root.GetInnerNodes(maxon.NODE_KIND.ALL_MASK, False)

for n in inner:
    kind = n.GetKind()
    nid = str(n.GetId())

    if kind == 1:  # NODE — e.g. standardmaterial, incandescent, texturesampler
        print(f"Node: {nid}")
    elif kind == 8:  # INPORT — readable port with value
        short_name = nid.split('.')[-1]
        try:
            val = n.GetDefaultValue()
            if val is not None:
                print(f"  {short_name} = {val}")
        except:
            pass

What this gives you:

  • All shader nodes (RS Standard Material, Incandescent, MaxonNoise, TextureSampler, RSRamp, RSColorCorrection, etc.)
  • All input port values (colors, intensities, roughness, refraction weight, texture paths, noise params, ramp stops, etc.)
  • GetDefaultValue() and GetEffectivePortValue() both work

To find specific node types, use:

result = maxon.GraphModelHelper.FindNodesByAssetId(
    graph, "com.redshift3d.redshift4c4d.nodes.core.standardmaterial", True
)

Secondary Path: Legacy GraphView (Older RS Materials)

For older RS shader-network materials where GetGraph() returns None:

import redshift
gv = redshift.GetRSMaterialNodeMaster(mat)
if gv:
    root = gv.GetRoot()
    child = root.GetDown()
    while child:
        print(f"Node: {child.GetName()} op={child.GetOperatorID()}")
        child = child.GetNext()

Fallback: Preview Bitmap Sampling

When neither path works (RS not installed), sample preview bitmaps for approximate colors:

bmp = mat.GetPreview(0)
if bmp:
    r, g, b = bmp.GetPixel(bmp.GetBw() // 2, bmp.GetBh() // 2)

Node Kind Constants

KindValueMeaning
NODE1Shader node (standardmaterial, incandescent, etc.)
INPUTS2Input ports container
OUTPUTS4Output ports container
INPORT8Individual input port (has value)
OUTPORT16Individual output port

Duplicate Names

If the scene contains multiple materials with the same visible name, use material_index instead of material_name with the MCP inspector.

Clone-to-Material Mapping

Use MODATA_CLONE array from GeGetMoData() to get normalized clone indices (0.0–1.0 mapped to child objects):

md = mo.GeGetMoData(cloner)
clone_indices = md.GetArray(c4d.MODATA_CLONE)  # float array, 0.0–1.0

These values map to the cloner's child object cycle. Verify visually — don't assume the cycle matches hierarchy order.

Examples

Example 1: Extract MoGraph Cloner Animation to JSON for Three.js

Scenario: A cloner with 50 spheres driven by a Random effector needs to be exported as per-frame position data for playback in Three.js.

Step-by-step:

  1. Health check — confirm get_scene_info returns scene name and doc.GetFps() returns 30.
  2. Identify the cloner name from list_objects or get_scene_info. Assume it is "SphereCloner".
  3. Run a small test bake (frames 0-10) to confirm data shape:
import c4d
from c4d.modules import mograph as mo

def find_obj(name):
    stack = [doc.GetFirstObject()]
    while stack:
        obj = stack.pop()
        while obj:
            if obj.GetName() == name:
                return obj
            if obj.GetDown():
                stack.append(obj.GetDown())
            obj = obj.GetNext()
    return None

fps = doc.GetFps()
cloner = find_obj("SphereCloner")
mg = cloner.GetMg()

for frame in range(0, 11):
    doc.SetTime(c4d.BaseTime(frame, fps))
    doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_NONE)
    md = mo.GeGetMoData(cloner)
    matrices = md.GetArray(c4d.MODATA_MATRIX)
    world_positions = [list(mg * m.off) for m in matrices]
    print(f"Frame {frame}: {len(world_positions)} clones, first pos: {world_positions[0]}")
  1. Confirm output: 50 clones per frame, positions changing frame to frame, no NaN values.
  2. Run full bake using the Complete Animation Bake Workflow (Steps 3-5 above). The export JSON is saved to the system temp directory.
  3. Convert to Three.js-compatible format — the JSON structure frames[frame][clone_index].position maps directly to BufferAttribute update per frame in an AnimationMixer-driven loop.

Three.js consumption pattern:

// Load the exported JSON
const data = await fetch('/data/spherecloner_export.json').then(r => r.json());
const fps = data.fps;

// On each animation frame:
function updateClones(currentTime) {
    const frame = Math.floor(currentTime * fps);
    const frameData = data.frames[frame];
    if (!frameData) return;
    frameData.forEach((clone, i) => {
        meshes[i].position.set(...clone.position);
    });
}

Example 2: Debug Missing Redshift Colors Using Preview Bitmap Workaround

Scenario: A scene uses Redshift materials. You need to identify which material is which color for a clone-to-material mapping, but mat[c4d.MATERIAL_COLOR_COLOR] returns black or zero for all RS materials.

Why it fails: Redshift materials store color in the RS node graph, not in the standard C4D material container. mat[c4d.MATERIAL_COLOR_COLOR] reads the legacy C4D channel, which is empty for RS materials.

Workaround — preview bitmap sampling:

import c4d

doc_mats = doc.GetMaterials()
material_colors = []

for mat in doc_mats:
    name = mat.GetName()
    bmp = mat.GetPreview(0)  # 0 = default preview size
    if bmp is None:
        material_colors.append({"name": name, "color": None, "error": "no preview"})
        continue

    w = bmp.GetBw()
    h = bmp.GetBh()

    # Sample a 3x3 grid of pixels from the center region to get a representative color
    samples = []
    for sx in [w // 3, w // 2, 2 * w // 3]:
        for sy in [h // 3, h // 2, 2 * h // 3]:
            r, g, b = bmp.GetPixel(sx, sy)
            samples.append((r, g, b))

    avg_r = sum(s[0] for s in samples) // len(samples)
    avg_g = sum(s[1] for s in samples) // len(samples)
    avg_b = sum(s[2] for s in samples) // len(samples)

    material_colors.append({
        "name": name,
        "color_rgb_0_255": [avg_r, avg_g, avg_b],
        "color_hex": f"#{avg_r:02x}{avg_g:02x}{avg_b:02x}"
    })

import json
print(json.dumps(material_colors, indent=2))

Caveats:

  • Preview bitmaps are generated from the last render or interactive preview. If C4D hasn't rendered a preview for a material, GetPreview() may return None or a gray placeholder.
  • Force a preview render by opening the Material Manager and letting thumbnails regenerate before running this script.
  • For multi-layer or metallic RS materials, the sampled color is an approximation — use it for identification (which material is roughly red vs. blue) rather than precise color matching.
  • Cross-reference with MODATA_CLONE indices to build a clone -> material -> color lookup table.

Troubleshooting Quick Reference

SymptomLikely CauseFix
ExecutePasses() fails or returns wrong dataSetTime() called after ExecutePasses() instead of beforeAlways: SetTime → ExecutePasses → read data
MoGraph matrices all identical across framesJumped to frame without sequential steppingStep frames 0→N in order, never skip
World positions far off from viewportNot applying global matrixworld_pos = cloner.GetMg() * m.off
GeGetMoData() returns NoneCloner not yet evaluated at that frameEnsure ExecutePasses ran; check cloner is not muted
Clone count changes per frameObject cloner with animated child visibilityRead md.GetCount() per frame, don't assume fixed count
Script times out on large rangeFrame range too large for single MCP callChunk into 100-200 frame batches, merge results
MODATA_CLONE all 0.0Single-child cloner or no child cyclingExpected behavior — all clones share one child
Keyframes on effector not animating outputTakes system overriding takeCheck doc.GetTakeData().GetCurrentTake()

Known Errors & Workarounds

See references/errors.md for complete Python API and MCP tool error tables.

Advanced Debugging

Raw Socket Fallback

If MCP tools fail entirely but the C4D socket server is alive at 127.0.0.1:5555, you can bypass the MCP layer and send commands directly. This is a last-resort diagnostic tool, not a normal workflow path.

When to use:

  • All MCP tool calls return connection errors
  • execute_python_script fails at the transport level (not a Python error)
  • You need to confirm the C4D server process is alive at all

Working example:

import json
import socket

def c4d_raw(command_dict, host="127.0.0.1", port=5555, timeout=10):
    """
    Send a raw command to the C4D socket server and return the parsed response.
    Commands mirror the MCP tool names: get_scene_info, list_objects, execute_python_script, etc.
    """
    payload = json.dumps(command_dict) + "\n"
    s = socket.create_connection((host, port), timeout=timeout)
    try:
        s.sendall(payload.encode("utf-8"))
        # Read until newline (server responds with a single JSON line)
        response = b""
        while True:
            chunk = s.recv(4096)
            if not chunk:
                break
            response += chunk
            if b"\n" in response:
                break
    finally:
        s.close()
    return json.loads(response.decode("utf-8").strip())

# Example: check connection
result = c4d_raw({"command": "get_scene_info"})
print(result)

# Example: run a Python expression
result = c4d_raw({
    "command": "execute_python_script",
    "params": {"script": "print(doc.GetDocumentName())"}
})
print(result)

Notes:

  • The socket server may not be running if you started C4D without the MCP plugin loaded.
  • Port 5555 is the default. Some forks or configurations may use different ports.
  • Responses are newline-delimited JSON. Large responses (e.g., full scene data) will be chunked — loop on recv until you have a complete JSON object.

Data Output

  • Save to JSON with metadata (scene name, fps, frame range, sampling step)
  • json.dumps() + print() for small results, tempfile.gettempdir() for large data
  • Keep both raw extraction and derived model

Additional References

平台分布

Codex

33.13%
按下载量换算79

Claude

29.48%
按下载量换算70

Cursor

18.59%
按下载量换算44

Gemini CLI

8.94%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills