dcc-mcp-cinema4d 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. dcc_mcp_cinema4d-0.1.0/.github/workflows/ci.yml +49 -0
  2. dcc_mcp_cinema4d-0.1.0/.github/workflows/release.yml +66 -0
  3. dcc_mcp_cinema4d-0.1.0/.gitignore +8 -0
  4. dcc_mcp_cinema4d-0.1.0/.release-please-manifest.json +3 -0
  5. dcc_mcp_cinema4d-0.1.0/CHANGELOG.md +9 -0
  6. dcc_mcp_cinema4d-0.1.0/LICENSE +6 -0
  7. dcc_mcp_cinema4d-0.1.0/PKG-INFO +119 -0
  8. dcc_mcp_cinema4d-0.1.0/README.md +86 -0
  9. dcc_mcp_cinema4d-0.1.0/docs/assets/dcc-mcp-cinema4d-dark.svg +22 -0
  10. dcc_mcp_cinema4d-0.1.0/docs/assets/dcc-mcp-cinema4d.svg +22 -0
  11. dcc_mcp_cinema4d-0.1.0/pyproject.toml +55 -0
  12. dcc_mcp_cinema4d-0.1.0/release-please-config.json +16 -0
  13. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/__init__.py +3 -0
  14. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/__version__.py +1 -0
  15. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/bridge.py +632 -0
  16. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/cinema4d_driver.py +522 -0
  17. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/server.py +57 -0
  18. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skill_tools.py +16 -0
  19. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/SKILL.md +24 -0
  20. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/metadata/depends.md +4 -0
  21. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/scripts/add_primitive.py +8 -0
  22. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/scripts/export_document.py +8 -0
  23. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/scripts/import_geometry.py +8 -0
  24. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/scripts/remove_object.py +8 -0
  25. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/scripts/render_document.py +8 -0
  26. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/scripts/transform_object.py +8 -0
  27. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-modeling/tools.yaml +140 -0
  28. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/SKILL.md +26 -0
  29. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/metadata/depends.md +2 -0
  30. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/scripts/create_document.py +8 -0
  31. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/scripts/get_capabilities.py +8 -0
  32. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/scripts/get_status.py +8 -0
  33. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/scripts/inspect_document.py +8 -0
  34. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/scripts/save_copy.py +8 -0
  35. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/scripts/validate_document.py +8 -0
  36. dcc_mcp_cinema4d-0.1.0/src/dcc_mcp_cinema4d/skills/cinema4d-session/tools.yaml +98 -0
  37. dcc_mcp_cinema4d-0.1.0/tests/live_cinema4d_smoke.py +86 -0
  38. dcc_mcp_cinema4d-0.1.0/tests/test_bridge.py +135 -0
  39. dcc_mcp_cinema4d-0.1.0/tests/test_contracts.py +45 -0
  40. dcc_mcp_cinema4d-0.1.0/tests/test_driver.py +21 -0
@@ -0,0 +1,49 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches: [main, "release-please--branches--**"]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ test:
19
+ name: Test Python ${{ matrix.python }} on ${{ matrix.os }}
20
+ runs-on: ${{ matrix.os }}
21
+ timeout-minutes: 15
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ os: [ubuntu-latest, windows-latest, macos-latest]
26
+ python: ["3.9", "3.12"]
27
+ steps:
28
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
29
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
30
+ with:
31
+ python-version: ${{ matrix.python }}
32
+ - run: python -m pip install --upgrade pip
33
+ - run: python -m pip install -e ".[test]"
34
+ - run: python -m pytest -m "not cinema4d"
35
+
36
+ lint-and-build:
37
+ runs-on: ubuntu-latest
38
+ timeout-minutes: 15
39
+ steps:
40
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
41
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
42
+ with:
43
+ python-version: "3.12"
44
+ - run: python -m pip install --upgrade pip
45
+ - run: python -m pip install -e ".[dev]"
46
+ - run: python -m ruff check src tests
47
+ - run: python -m ruff format --check src tests
48
+ - run: python -m build
49
+ - run: python -m twine check dist/*
@@ -0,0 +1,66 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+ inputs:
8
+ tag_name:
9
+ description: Existing tag to rebuild and publish
10
+ required: false
11
+ default: ""
12
+ publish_to_pypi:
13
+ description: Publish a manually rebuilt tag to PyPI
14
+ type: boolean
15
+ required: false
16
+ default: false
17
+
18
+ concurrency:
19
+ group: ${{ github.workflow }}-${{ github.ref }}
20
+ cancel-in-progress: false
21
+
22
+ permissions:
23
+ contents: write
24
+ pull-requests: write
25
+
26
+ jobs:
27
+ release-please:
28
+ runs-on: ubuntu-latest
29
+ timeout-minutes: 10
30
+ if: github.ref == 'refs/heads/main'
31
+ outputs:
32
+ release_created: ${{ steps.release.outputs.release_created }}
33
+ tag_name: ${{ steps.release.outputs.tag_name || inputs.tag_name }}
34
+ steps:
35
+ - uses: googleapis/release-please-action@0dfd8538845b8e92600d271a895a5372865d4062 # v5
36
+ id: release
37
+ with:
38
+ token: ${{ github.token }}
39
+ config-file: release-please-config.json
40
+ manifest-file: .release-please-manifest.json
41
+
42
+ build-and-publish:
43
+ needs: release-please
44
+ if: needs.release-please.outputs.release_created == 'true' || (github.event_name == 'workflow_dispatch' && inputs.tag_name != '' && inputs.publish_to_pypi)
45
+ runs-on: ubuntu-latest
46
+ timeout-minutes: 15
47
+ environment:
48
+ name: pypi
49
+ url: https://pypi.org/p/dcc-mcp-cinema4d
50
+ permissions:
51
+ contents: read
52
+ id-token: write
53
+ steps:
54
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
55
+ with:
56
+ ref: ${{ needs.release-please.outputs.tag_name || inputs.tag_name }}
57
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
58
+ with:
59
+ python-version: "3.12"
60
+ - run: python -m pip install --upgrade pip build twine
61
+ - run: python -m build
62
+ - run: python -m twine check dist/*
63
+ - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
64
+ with:
65
+ verbose: true
66
+ print-hash: true
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0"
3
+ }
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-08-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * add experimental Cinema 4D adapter ([6ffb80d](https://github.com/dcc-mcp/dcc-mcp-cinema4d/commit/6ffb80dbefd4c7cb6d1a2ad4d46edd5dd9388e92))
9
+ * make Cinema 4D adapter production ready ([#1](https://github.com/dcc-mcp/dcc-mcp-cinema4d/issues/1)) ([529af79](https://github.com/dcc-mcp/dcc-mcp-cinema4d/commit/529af797950e9b85728caea954acd82afa8559e8))
@@ -0,0 +1,6 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 loonghao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies.
6
+
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: dcc-mcp-cinema4d
3
+ Version: 0.1.0
4
+ Summary: Production Cinema 4D adapter for typed headless modeling, interchange, inspection, and rendering
5
+ Project-URL: Homepage, https://github.com/dcc-mcp/dcc-mcp-cinema4d
6
+ Project-URL: Repository, https://github.com/dcc-mcp/dcc-mcp-cinema4d
7
+ Project-URL: Issues, https://github.com/dcc-mcp/dcc-mcp-cinema4d/issues
8
+ Author-email: loonghao <hal.long@outlook.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: 3d,automation,c4dpy,cinema4d,dcc,mcp
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.9
21
+ Requires-Dist: dcc-mcp-core<1.0.0,>=0.19.91
22
+ Provides-Extra: dev
23
+ Requires-Dist: build>=1.2; extra == 'dev'
24
+ Requires-Dist: pytest>=8; extra == 'dev'
25
+ Requires-Dist: pyyaml>=6; extra == 'dev'
26
+ Requires-Dist: ruff>=0.8; extra == 'dev'
27
+ Requires-Dist: twine>=6; extra == 'dev'
28
+ Provides-Extra: test
29
+ Requires-Dist: pytest>=8; extra == 'test'
30
+ Requires-Dist: pyyaml>=6; extra == 'test'
31
+ Requires-Dist: ruff>=0.8; extra == 'test'
32
+ Description-Content-Type: text/markdown
33
+
34
+ # dcc-mcp-cinema4d
35
+
36
+ <p align="center">
37
+ <img src="docs/assets/dcc-mcp-cinema4d.svg" alt="DCC-MCP · CINEMA 4D" width="600">
38
+ </p>
39
+
40
+ Typed Cinema 4D document automation for DCC-MCP, executed through Maxon's licensed
41
+ headless `c4dpy` runtime.
42
+
43
+ ## Capabilities
44
+
45
+ - Discover and report the real Cinema 4D, Python, and API versions.
46
+ - Create, inspect, validate, and atomically copy `.c4d` documents.
47
+ - Add typed cube, sphere, cylinder, cone, torus, and plane primitives.
48
+ - Set absolute translation, HPB rotation, and scale; remove named objects safely.
49
+ - Import C4D, OBJ, FBX, glTF/GLB, STL, Alembic, Collada, and 3DS geometry when
50
+ the installed Cinema 4D runtime provides the corresponding importer.
51
+ - Export full documents to C4D, OBJ, FBX, glTF/GLB, STL, Alembic, or Collada
52
+ when the installed runtime provides the corresponding exporter.
53
+ - Render bounded PNG and JPEG images without a GUI.
54
+
55
+ The adapter never accepts arbitrary Python source. Every host call executes a packaged,
56
+ allowlisted driver in a fresh `c4dpy` process with bounded paths, timeouts, output streams,
57
+ and response size. Document mutations use a staged file and atomically replace the durable
58
+ document only after a successful host operation.
59
+
60
+ OBJ import and export form the production-validated interchange baseline. Other formats
61
+ are runtime-dependent; `get_capabilities` reports this boundary and unavailable optional
62
+ importers or exporters fail with a format-specific error.
63
+
64
+ ## Requirements
65
+
66
+ - Cinema 4D R21 or newer with a valid license.
67
+ - The matching `c4dpy` executable shipped with that Cinema 4D installation.
68
+ - Python 3.9 or newer for the DCC-MCP service.
69
+
70
+ Maxon documents that `c4dpy` is a headless Cinema 4D instance capable of loading,
71
+ constructing, saving, and rendering scenes, but it requires a real Cinema 4D installation
72
+ and license.
73
+
74
+ ## Install
75
+
76
+ ```bash
77
+ python -m pip install dcc-mcp-cinema4d
78
+ ```
79
+
80
+ Set the licensed runtime and allowed workspace before starting the adapter:
81
+
82
+ ```powershell
83
+ $env:DCC_MCP_CINEMA4D_C4DPY = "C:\Program Files\Maxon Cinema 4D 2026\c4dpy.exe"
84
+ $env:DCC_MCP_CINEMA4D_ALLOWED_ROOTS = "D:\projects;D:\exports"
85
+ dcc-mcp-cinema4d
86
+ ```
87
+
88
+ `c4dpy` is also discovered from `PATH` and common Maxon installation folders. The default
89
+ allowed root is the adapter's current working directory.
90
+
91
+ ## Agent workflow
92
+
93
+ ```bash
94
+ dcc-mcp-cli list
95
+ dcc-mcp-cli search Cinema 4D status --dcc-type cinema4d
96
+ dcc-mcp-cli load-skill cinema4d-session --dcc-type cinema4d --instance-id <id>
97
+ dcc-mcp-cli describe cinema4d.<id>.get_status
98
+ dcc-mcp-cli call cinema4d.<id>.get_status --json '{}'
99
+ ```
100
+
101
+ Load `cinema4d-modeling` only when modeling, interchange, or rendering tools are needed.
102
+ Use `--wait` for document operations because they run as bounded asynchronous jobs.
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ python -m pip install -e ".[dev]"
108
+ python -m ruff check src tests
109
+ python -m ruff format --check src tests
110
+ python -m pytest -m "not cinema4d"
111
+ python -m build
112
+ python -m twine check dist/*
113
+ ```
114
+
115
+ Real-host acceptance requires a licensed `c4dpy`; CI intentionally does not mock a Maxon
116
+ license.
117
+
118
+ Official references: [c4dpy manual](https://developers.maxon.net/docs/py/2025_1_0/manuals/manual_py_c4dpy.html),
119
+ [Cinema 4D Python SDK](https://developers.maxon.net/docs/py/index.html).
@@ -0,0 +1,86 @@
1
+ # dcc-mcp-cinema4d
2
+
3
+ <p align="center">
4
+ <img src="docs/assets/dcc-mcp-cinema4d.svg" alt="DCC-MCP · CINEMA 4D" width="600">
5
+ </p>
6
+
7
+ Typed Cinema 4D document automation for DCC-MCP, executed through Maxon's licensed
8
+ headless `c4dpy` runtime.
9
+
10
+ ## Capabilities
11
+
12
+ - Discover and report the real Cinema 4D, Python, and API versions.
13
+ - Create, inspect, validate, and atomically copy `.c4d` documents.
14
+ - Add typed cube, sphere, cylinder, cone, torus, and plane primitives.
15
+ - Set absolute translation, HPB rotation, and scale; remove named objects safely.
16
+ - Import C4D, OBJ, FBX, glTF/GLB, STL, Alembic, Collada, and 3DS geometry when
17
+ the installed Cinema 4D runtime provides the corresponding importer.
18
+ - Export full documents to C4D, OBJ, FBX, glTF/GLB, STL, Alembic, or Collada
19
+ when the installed runtime provides the corresponding exporter.
20
+ - Render bounded PNG and JPEG images without a GUI.
21
+
22
+ The adapter never accepts arbitrary Python source. Every host call executes a packaged,
23
+ allowlisted driver in a fresh `c4dpy` process with bounded paths, timeouts, output streams,
24
+ and response size. Document mutations use a staged file and atomically replace the durable
25
+ document only after a successful host operation.
26
+
27
+ OBJ import and export form the production-validated interchange baseline. Other formats
28
+ are runtime-dependent; `get_capabilities` reports this boundary and unavailable optional
29
+ importers or exporters fail with a format-specific error.
30
+
31
+ ## Requirements
32
+
33
+ - Cinema 4D R21 or newer with a valid license.
34
+ - The matching `c4dpy` executable shipped with that Cinema 4D installation.
35
+ - Python 3.9 or newer for the DCC-MCP service.
36
+
37
+ Maxon documents that `c4dpy` is a headless Cinema 4D instance capable of loading,
38
+ constructing, saving, and rendering scenes, but it requires a real Cinema 4D installation
39
+ and license.
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ python -m pip install dcc-mcp-cinema4d
45
+ ```
46
+
47
+ Set the licensed runtime and allowed workspace before starting the adapter:
48
+
49
+ ```powershell
50
+ $env:DCC_MCP_CINEMA4D_C4DPY = "C:\Program Files\Maxon Cinema 4D 2026\c4dpy.exe"
51
+ $env:DCC_MCP_CINEMA4D_ALLOWED_ROOTS = "D:\projects;D:\exports"
52
+ dcc-mcp-cinema4d
53
+ ```
54
+
55
+ `c4dpy` is also discovered from `PATH` and common Maxon installation folders. The default
56
+ allowed root is the adapter's current working directory.
57
+
58
+ ## Agent workflow
59
+
60
+ ```bash
61
+ dcc-mcp-cli list
62
+ dcc-mcp-cli search Cinema 4D status --dcc-type cinema4d
63
+ dcc-mcp-cli load-skill cinema4d-session --dcc-type cinema4d --instance-id <id>
64
+ dcc-mcp-cli describe cinema4d.<id>.get_status
65
+ dcc-mcp-cli call cinema4d.<id>.get_status --json '{}'
66
+ ```
67
+
68
+ Load `cinema4d-modeling` only when modeling, interchange, or rendering tools are needed.
69
+ Use `--wait` for document operations because they run as bounded asynchronous jobs.
70
+
71
+ ## Development
72
+
73
+ ```bash
74
+ python -m pip install -e ".[dev]"
75
+ python -m ruff check src tests
76
+ python -m ruff format --check src tests
77
+ python -m pytest -m "not cinema4d"
78
+ python -m build
79
+ python -m twine check dist/*
80
+ ```
81
+
82
+ Real-host acceptance requires a licensed `c4dpy`; CI intentionally does not mock a Maxon
83
+ license.
84
+
85
+ Official references: [c4dpy manual](https://developers.maxon.net/docs/py/2025_1_0/manuals/manual_py_c4dpy.html),
86
+ [Cinema 4D Python SDK](https://developers.maxon.net/docs/py/index.html).