janction-render 0.4.1__tar.gz → 0.4.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janction-render
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Cloud GPU render farm for Blender, for AI agents: MCP server (remote + stdio) and CLI. Render Blender without a GPU from Claude, ChatGPT, Claude Code, Codex, Cursor.
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -116,7 +116,7 @@ Then, in Claude Code:
116
116
  | `scene_info(scene_script | scene_url | scene_path | scene_id, assets?)` | cameras, frame range, fps, resolution, objects, lights, missing files. No render. |
117
117
  | `render_preview(..., frames="1-24", environment?, blender?)` | up to 4 frames (720p budget) tiled with frame labels; returns the image inline |
118
118
  | `render_estimate(scene_id, frame_start, frame_end, width, height, samples)` | GPU seconds, queue wait, "about N minutes", fits today's free quota? No GPU time used |
119
- | `render_final(scene_id, frame_start, frame_end, width, height, samples, fps, output, environment?, blender?, engine?)` | frames (png / exr) or video (mp4 / webm / prores); returns job_id + estimate |
119
+ | `render_final(scene_id, frame_start, frame_end, width, height, samples, fps, output, environment?, blender?, engine?, transparent?, notify_url?)` | frames (png / exr) or video (mp4 / webm / prores / gif / webp); `transparent=True` keeps an alpha background (png / exr / webm / gif / webp); `notify_url` gets one JSON POST when the job finishes; returns job_id + estimate |
120
120
  | `render_status(job_id)` | progress and ETA (`eta.human`); `render_download(job_id, only="mp4" / "frames" / "all")` files or links; `render_cancel(job_id)` |
121
121
  | `billing()` | free-beta quota (used today, daily limit, reset time); later balance and top-up link |
122
122
  | `render_info()` | workers online or gated (GPU lent to another workload), queue, expected wait, supported inputs, environment presets, Blender versions |
@@ -155,7 +155,7 @@ POST /v1/keys -> {api_key} (header X-A
155
155
  POST /v1/files multipart "file" (.blend|.py|.glb|.fbx|.usd|.obj|...) -> {scene_id}
156
156
  POST /v1/files/{id}/assets multipart "files" textures, glTF .bin ... GET /v1/files/lookup?sha256= reuse an upload
157
157
  POST /v1/estimate {kind, frames|frame_start/frame_end, width, height, samples, scene_id?} -> seconds, wall_seconds, human, quota
158
- POST /v1/jobs {scene_id, kind: info|preview|final, frames|frame_start/frame_end, width, height, samples, camera, fps, output (png|exr|mp4|webm|prores), engine (cycles|eevee),
158
+ POST /v1/jobs {scene_id, kind: info|preview|final, frames|frame_start/frame_end, width, height, samples, camera, fps, output (png|exr|mp4|webm|prores|gif|webp), transparent, notify_url (https), engine (cycles|eevee),
159
159
  environment, environment_strength, environment_visible, blender, orbit, orbit_frames, orbit_elevation}
160
160
  GET /v1/jobs/{id} status, progress, eta, artifacts[], cost, warnings, info DELETE /v1/jobs/{id} cancel
161
161
  GET /v1/jobs/{id}/artifacts/{name} PNG / MP4
@@ -99,7 +99,7 @@ Then, in Claude Code:
99
99
  | `scene_info(scene_script | scene_url | scene_path | scene_id, assets?)` | cameras, frame range, fps, resolution, objects, lights, missing files. No render. |
100
100
  | `render_preview(..., frames="1-24", environment?, blender?)` | up to 4 frames (720p budget) tiled with frame labels; returns the image inline |
101
101
  | `render_estimate(scene_id, frame_start, frame_end, width, height, samples)` | GPU seconds, queue wait, "about N minutes", fits today's free quota? No GPU time used |
102
- | `render_final(scene_id, frame_start, frame_end, width, height, samples, fps, output, environment?, blender?, engine?)` | frames (png / exr) or video (mp4 / webm / prores); returns job_id + estimate |
102
+ | `render_final(scene_id, frame_start, frame_end, width, height, samples, fps, output, environment?, blender?, engine?, transparent?, notify_url?)` | frames (png / exr) or video (mp4 / webm / prores / gif / webp); `transparent=True` keeps an alpha background (png / exr / webm / gif / webp); `notify_url` gets one JSON POST when the job finishes; returns job_id + estimate |
103
103
  | `render_status(job_id)` | progress and ETA (`eta.human`); `render_download(job_id, only="mp4" / "frames" / "all")` files or links; `render_cancel(job_id)` |
104
104
  | `billing()` | free-beta quota (used today, daily limit, reset time); later balance and top-up link |
105
105
  | `render_info()` | workers online or gated (GPU lent to another workload), queue, expected wait, supported inputs, environment presets, Blender versions |
@@ -138,7 +138,7 @@ POST /v1/keys -> {api_key} (header X-A
138
138
  POST /v1/files multipart "file" (.blend|.py|.glb|.fbx|.usd|.obj|...) -> {scene_id}
139
139
  POST /v1/files/{id}/assets multipart "files" textures, glTF .bin ... GET /v1/files/lookup?sha256= reuse an upload
140
140
  POST /v1/estimate {kind, frames|frame_start/frame_end, width, height, samples, scene_id?} -> seconds, wall_seconds, human, quota
141
- POST /v1/jobs {scene_id, kind: info|preview|final, frames|frame_start/frame_end, width, height, samples, camera, fps, output (png|exr|mp4|webm|prores), engine (cycles|eevee),
141
+ POST /v1/jobs {scene_id, kind: info|preview|final, frames|frame_start/frame_end, width, height, samples, camera, fps, output (png|exr|mp4|webm|prores|gif|webp), transparent, notify_url (https), engine (cycles|eevee),
142
142
  environment, environment_strength, environment_visible, blender, orbit, orbit_frames, orbit_elevation}
143
143
  GET /v1/jobs/{id} status, progress, eta, artifacts[], cost, warnings, info DELETE /v1/jobs/{id} cancel
144
144
  GET /v1/jobs/{id}/artifacts/{name} PNG / MP4
@@ -1,3 +1,3 @@
1
1
  """JANCTION Render — ターミナルの AI エージェントから GPU で 3DCG を描く。"""
2
2
 
3
- __version__ = "0.4.1"
3
+ __version__ = "0.4.2"
@@ -98,7 +98,8 @@ def cmd_render(c: Client, args: argparse.Namespace) -> int:
98
98
  w, h = args.size
99
99
  fs, fe = args.frames
100
100
  j = c.submit(sid, kind="final", frame_start=fs, frame_end=fe, width=w, height=h,
101
- samples=args.samples, fps=args.fps, output=args.output, camera=args.camera, engine=args.engine)
101
+ samples=args.samples, fps=args.fps, output=args.output, camera=args.camera, engine=args.engine,
102
+ transparent=args.transparent or None, notify_url=args.notify_url or None)
102
103
  print(f"job {j['job_id']} queued: {fe - fs + 1} frames in {j['progress']['chunks_total']} chunks, "
103
104
  f"estimate ~{j['estimate']['seconds']}s", file=sys.stderr)
104
105
  if not args.wait:
@@ -200,8 +201,10 @@ def build_parser() -> argparse.ArgumentParser:
200
201
  s.add_argument("--samples", type=int, default=128)
201
202
  s.add_argument("--engine", choices=["cycles", "eevee"], default=None, help="cycles (default) or eevee (cheaper drafts)")
202
203
  s.add_argument("--fps", type=int, default=24)
203
- s.add_argument("--output", choices=["auto", "png", "exr", "mp4", "webm", "prores"], default="auto",
204
- help="png/exr = frames, mp4/webm/prores = video (auto: mp4 for a range, png for one frame)")
204
+ s.add_argument("--output", choices=["auto", "png", "exr", "mp4", "webm", "prores", "gif", "webp"], default="auto",
205
+ help="png/exr = frames, mp4/webm/prores/gif/webp = video (auto: mp4 for a range, png for one frame)")
206
+ s.add_argument("--transparent", action="store_true", help="transparent background (png/exr/webm/gif/webp)")
207
+ s.add_argument("--notify-url", default=None, help="https URL that receives one JSON POST when the job finishes")
205
208
  s.add_argument("--camera", default=None)
206
209
  s.add_argument("--out", default=None)
207
210
  s.add_argument("--wait", action="store_true", help="wait until done and download")
@@ -92,6 +92,8 @@ function render() {
92
92
  const links = job.links || {};
93
93
  if (status === "done" && out && /\.(mp4|webm|mov)(\?|$)/.test(out)) {
94
94
  html += `<video controls playsinline src="${esc(out)}"></video>`;
95
+ } else if (status === "done" && out && /\.(gif|webp)(\?|$)/.test(out)) {
96
+ html += `<img class="sheet" src="${esc(out)}" alt="animation">`;
95
97
  }
96
98
  if (status === "done" && isCompare(job)) {
97
99
  html += `<div class="muted">Pick the lighting for the final render:</div><div class="grid">` +
@@ -52,6 +52,13 @@ mcp = MCPServer(
52
52
  ),
53
53
  )
54
54
 
55
+ OUTPUT_DOC = (" output: 'auto' (mp4 for a frame range, png for one frame) | 'png' | 'exr' (16-bit linear OpenEXR frames) | "
56
+ "'mp4' (H.264) | 'webm' (VP9) | 'prores' (ProRes 422 HQ .mov) | 'gif' | 'webp' (animated, at most 960 px wide; "
57
+ "good for chat and web). transparent=True renders on a transparent background (alpha): png / exr frames, webm, gif "
58
+ "and webp keep it, mp4 and prores cannot. notify_url: an https URL that receives one JSON POST when the job "
59
+ "finishes (event job.done / job.failed, artifacts with download links).")
60
+ TRANSPARENT_DOC = (" transparent=True: transparent background (alpha) instead of the world/HDRI backdrop; the preview sheet "
61
+ "shows it over dark grey.")
55
62
  ORBIT_DOC = (" orbit=True: turntable; an orbit camera circles the scene once over orbit_frames frames (default 24, "
56
63
  "elevation orbit_elevation deg, default 18). Flat floors/walls are ignored when framing; orbit_target = an "
57
64
  "object name or 'x,y,z' centres on that, orbit_distance scales the distance (1.0). A preview without frames "
@@ -241,7 +248,24 @@ def scene_info(scene_path: str = "", scene_id: str = "", scene_script: str = "",
241
248
  return _j(_attach_upload_notes(info))
242
249
 
243
250
 
244
- @mcp.tool(structured_output=False, meta=_ui_meta())
251
+ RENDER_PREVIEW_DESCRIPTION = (
252
+ """Render a fast, cheap preview of a Blender scene on a JANCTION GPU and show the image.
253
+
254
+ Use this when the user is making 3DCG with Blender and wants to see how it looks, but has no
255
+ GPU or local rendering is slow. Give the scene as scene_path (a .blend file OR a bpy Python
256
+ script), scene_script (bpy code as text; no file and no local Blender needed), or scene_id
257
+ from a previous call. frames: '' = frame 1;
258
+ '12' = one frame; '1,8,16,24' or '1-24' = up to 4 frames tiled in ONE image (2x2, each tile
259
+ labeled with its frame number) so you can judge camera motion and animation. Same GPU cost as
260
+ one 720p frame. Quality is deliberately low (up to 1280x720, few samples, denoised).
261
+ Look at the returned image, fix the scene, preview again; when it looks right, ask the user and
262
+ call render_final. Returns scene_id (reuse it without re-uploading), job_id, saved PNG paths,
263
+ Blender warnings (e.g. missing textures), GPU seconds, and the expiry time (24h after last use).
264
+ """ + ENV_DOC + ORBIT_DOC + TRANSPARENT_DOC
265
+ )
266
+
267
+
268
+ @mcp.tool(structured_output=False, meta=_ui_meta(), description=RENDER_PREVIEW_DESCRIPTION)
245
269
  def render_preview(
246
270
  scene_path: str = "",
247
271
  scene_id: str = "",
@@ -263,26 +287,15 @@ def render_preview(
263
287
  orbit_target: str = "",
264
288
  orbit_distance: float = 1.0,
265
289
  engine: str = "",
290
+ transparent: bool = False,
266
291
  ) -> list[Any]:
267
- """Render a fast, cheap preview of a Blender scene on a JANCTION GPU and show the image.
268
-
269
- Use this when the user is making 3DCG with Blender and wants to see how it looks, but has no
270
- GPU or local rendering is slow. Give the scene as scene_path (a .blend file OR a bpy Python
271
- script), scene_script (bpy code as text; no file and no local Blender needed), or scene_id
272
- from a previous call. frames: '' = frame 1;
273
- '12' = one frame; '1,8,16,24' or '1-24' = up to 4 frames tiled in ONE image (2x2, each tile
274
- labeled with its frame number) so you can judge camera motion and animation. Same GPU cost as
275
- one 720p frame. Quality is deliberately low (up to 1280x720, few samples, denoised).
276
- Look at the returned image, fix the scene, preview again; when it looks right, ask the user and
277
- call render_final. Returns scene_id (reuse it without re-uploading), job_id, saved PNG paths,
278
- Blender warnings (e.g. missing textures), GPU seconds, and the expiry time (24h after last use).
279
- """ + ENV_DOC + ORBIT_DOC
292
+ """Render a fast, cheap preview of a Blender scene on a JANCTION GPU and show the image. (full description on the tool)."""
280
293
  c = _client()
281
294
  try:
282
295
  frame_list = parse_frames(frames) if (frames or not orbit) else None
283
296
  sid = _resolve_scene(c, scene_path, scene_id, scene_script, assets)
284
297
  j = c.submit(sid, kind="preview", frames=frame_list, camera=camera or None,
285
- width=width, height=height, samples=samples,
298
+ width=width, height=height, samples=samples, transparent=(True if transparent else None),
286
299
  **_job_params(environment, environment_strength, environment_visible, blender, engine=engine),
287
300
  **({"orbit": True, "orbit_frames": orbit_frames, "orbit_elevation": orbit_elevation,
288
301
  "orbit_target": orbit_target, "orbit_distance": orbit_distance} if orbit else {}))
@@ -343,7 +356,20 @@ def render_estimate(scene_id: str = "", kind: str = "final", frame_start: int =
343
356
  return _j(out)
344
357
 
345
358
 
346
- @mcp.tool(meta=_ui_meta())
359
+ RENDER_FINAL_DESCRIPTION = (
360
+ """Render the final frames (or a video) of a Blender scene on JANCTION GPUs.
361
+
362
+ Call this after the user approved a preview. Pass scene_id from render_preview (or scene_path /
363
+ scene_script to upload a new .blend / bpy script / 3D file). frame_start..frame_end are inclusive; several frames are
364
+ split across GPUs and joined into output.mp4 (output='mp4', fps), a single frame gives a PNG
365
+ (output='png'; 'auto' picks). Use the same environment / blender as the approved preview. Returns job_id and a
366
+ time estimate right away; the render runs in the background: poll with render_status, then fetch with
367
+ render_download. Inputs and results are deleted 24 hours after last use, so download them.
368
+ """ + ENV_DOC + ORBIT_DOC + OUTPUT_DOC
369
+ )
370
+
371
+
372
+ @mcp.tool(meta=_ui_meta(), description=RENDER_FINAL_DESCRIPTION)
347
373
  def render_final(
348
374
  scene_path: str = "",
349
375
  scene_id: str = "",
@@ -367,16 +393,10 @@ def render_final(
367
393
  orbit_target: str = "",
368
394
  orbit_distance: float = 1.0,
369
395
  engine: str = "",
396
+ transparent: bool = False,
397
+ notify_url: str = "",
370
398
  ) -> str:
371
- """Render the final frames (or a video) of a Blender scene on JANCTION GPUs.
372
-
373
- Call this after the user approved a preview. Pass scene_id from render_preview (or scene_path /
374
- scene_script to upload a new .blend / bpy script / 3D file). frame_start..frame_end are inclusive; several frames are
375
- split across GPUs and joined into output.mp4 (output='mp4', fps), a single frame gives a PNG
376
- (output='png'; 'auto' picks). Use the same environment / blender as the approved preview. Returns job_id and a
377
- time estimate right away; the render runs in the background: poll with render_status, then fetch with
378
- render_download. Inputs and results are deleted 24 hours after last use, so download them.
379
- """ + ENV_DOC + ORBIT_DOC
399
+ """Render the final frames (or a video) of a Blender scene on JANCTION GPUs. (full description on the tool)."""
380
400
  c = _client()
381
401
  try:
382
402
  sid = _resolve_scene(c, scene_path, scene_id, scene_script, assets)
@@ -388,7 +408,7 @@ def render_final(
388
408
  frame_end = None # type: ignore[assignment] # 1 周ぶんは受付が決める
389
409
  j = c.submit(sid, kind="final", frame_start=frame_start, frame_end=frame_end,
390
410
  width=width, height=height, samples=samples, fps=fps, output=output,
391
- camera=camera or None,
411
+ camera=camera or None, transparent=(True if transparent else None), notify_url=notify_url or None,
392
412
  **_job_params(environment, environment_strength, environment_visible, blender, engine=engine), **extra)
393
413
  except ClientError as exc:
394
414
  block = _payment_block(exc) or _quota_block(exc)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janction-render
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Cloud GPU render farm for Blender, for AI agents: MCP server (remote + stdio) and CLI. Render Blender without a GPU from Claude, ChatGPT, Claude Code, Codex, Cursor.
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -116,7 +116,7 @@ Then, in Claude Code:
116
116
  | `scene_info(scene_script | scene_url | scene_path | scene_id, assets?)` | cameras, frame range, fps, resolution, objects, lights, missing files. No render. |
117
117
  | `render_preview(..., frames="1-24", environment?, blender?)` | up to 4 frames (720p budget) tiled with frame labels; returns the image inline |
118
118
  | `render_estimate(scene_id, frame_start, frame_end, width, height, samples)` | GPU seconds, queue wait, "about N minutes", fits today's free quota? No GPU time used |
119
- | `render_final(scene_id, frame_start, frame_end, width, height, samples, fps, output, environment?, blender?, engine?)` | frames (png / exr) or video (mp4 / webm / prores); returns job_id + estimate |
119
+ | `render_final(scene_id, frame_start, frame_end, width, height, samples, fps, output, environment?, blender?, engine?, transparent?, notify_url?)` | frames (png / exr) or video (mp4 / webm / prores / gif / webp); `transparent=True` keeps an alpha background (png / exr / webm / gif / webp); `notify_url` gets one JSON POST when the job finishes; returns job_id + estimate |
120
120
  | `render_status(job_id)` | progress and ETA (`eta.human`); `render_download(job_id, only="mp4" / "frames" / "all")` files or links; `render_cancel(job_id)` |
121
121
  | `billing()` | free-beta quota (used today, daily limit, reset time); later balance and top-up link |
122
122
  | `render_info()` | workers online or gated (GPU lent to another workload), queue, expected wait, supported inputs, environment presets, Blender versions |
@@ -155,7 +155,7 @@ POST /v1/keys -> {api_key} (header X-A
155
155
  POST /v1/files multipart "file" (.blend|.py|.glb|.fbx|.usd|.obj|...) -> {scene_id}
156
156
  POST /v1/files/{id}/assets multipart "files" textures, glTF .bin ... GET /v1/files/lookup?sha256= reuse an upload
157
157
  POST /v1/estimate {kind, frames|frame_start/frame_end, width, height, samples, scene_id?} -> seconds, wall_seconds, human, quota
158
- POST /v1/jobs {scene_id, kind: info|preview|final, frames|frame_start/frame_end, width, height, samples, camera, fps, output (png|exr|mp4|webm|prores), engine (cycles|eevee),
158
+ POST /v1/jobs {scene_id, kind: info|preview|final, frames|frame_start/frame_end, width, height, samples, camera, fps, output (png|exr|mp4|webm|prores|gif|webp), transparent, notify_url (https), engine (cycles|eevee),
159
159
  environment, environment_strength, environment_visible, blender, orbit, orbit_frames, orbit_elevation}
160
160
  GET /v1/jobs/{id} status, progress, eta, artifacts[], cost, warnings, info DELETE /v1/jobs/{id} cancel
161
161
  GET /v1/jobs/{id}/artifacts/{name} PNG / MP4
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "janction-render"
7
- version = "0.4.1"
7
+ version = "0.4.2"
8
8
  description = "Cloud GPU render farm for Blender, for AI agents: MCP server (remote + stdio) and CLI. Render Blender without a GPU from Claude, ChatGPT, Claude Code, Codex, Cursor."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
File without changes