💻 Coding

Blender bpy Script from a Task List (Version-Locked, Idempotent)

Write a version-locked, idempotent Blender bpy script from a task list. No invented operators or addon IDs.

0.0
0Reviews
P
September 1, 2026

Prompt

Act as a Blender Python scripter who only uses a pasted task list. You write a bpy script locked to the named Blender version. The script must be idempotent: running twice does not duplicate objects. You do not invent operators, addon IDs, or file paths that are not in Inputs. This is not a full add-on package and not an asset-store listing.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- Task list I lock: [Tasks]
- Blender version I lock: [Version]
- Object names I lock: [Names]
- Words I must not use: [Banned]
- What I must never invent (operators, addons, paths, extra objects): [Never]
- Output format: [Format]
- Language: [Lang]
- Render engine I may name (or UNKNOWN): [Engine]

Generate:
1. Honesty ledger: Tasks nouns, Version, Names, Engine, Lang. Forbidden: invented operators, addons, paths, extra objects.
2. Idempotent plan: how re-run deletes or reuses Names instead of duplicating.
3. Script: bpy code for Tasks only. Version check. Missing ops write comments NOT IN INPUTS.
4. Refuse list: inventing bpy.ops.export_scene.fbx flags not in Tasks, inventing addon IDs, inventing /Users paths.
5. Compliance pass: quote Banned and Never hits. Cut them. Format as Format.

Constraints:
- bpy script from Tasks only. Version-locked. Idempotent.
- Honor Names. No emojis.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Examples

Example Input

Tasks: add a cube named HeroCube as pasted; set location 0,0,0 as pasted; assign a new material named HeroMat as pasted. Export FBX NOT IN INPUTS. Subdivision NOT IN INPUTS.
Version: 4.2 LTS as pasted (do not invent 4.5)
Names: HeroCube, HeroMat as pasted
Banned: one-click magic, guaranteed, viral
Never: invent operators, invent addon IDs, invent file paths, invent extra objects
Format: ledger + plan + script + refuse + gaps
Lang: English
Engine: UNKNOWN

Example Output

1. Ledger. Tasks: add cube HeroCube; location 0,0,0; material HeroMat. Export FBX NOT IN INPUTS. Subdivision NOT IN INPUTS. Version 4.2 LTS. Names HeroCube, HeroMat. Engine UNKNOWN. Lang English. Forbidden: invented operators, addons, paths, extra objects, one-click magic, guaranteed, viral.

2. Idempotent plan. If bpy.data.objects.get("HeroCube"): unlink and remove before create. If bpy.data.materials.get("HeroMat"): reuse, do not duplicate. Re-run must leave one cube and one material.

3. Script (4.2 LTS).
import bpy
assert bpy.app.version[:2] == (4, 2), "Version lock 4.2 LTS; 4.5 NOT IN INPUTS"
name = "HeroCube"
ob = bpy.data.objects.get(name)
if ob:
    bpy.data.objects.remove(ob, do_unlink=True)
bpy.ops.mesh.primitive_cube_add(location=(0.0, 0.0, 0.0))
bpy.context.object.name = name
mat = bpy.data.materials.get("HeroMat") or bpy.data.materials.new("HeroMat")
cube = bpy.data.objects[name]
if cube.data.materials: cube.data.materials[0] = mat
else: cube.data.materials.append(mat)
# FBX export NOT IN INPUTS. Subdivision NOT IN INPUTS. Engine UNKNOWN so no engine switch. File path NOT IN INPUTS.

4. Refuse. bpy.ops.export_scene.fbx flags: refused. Addon ID: refused. /Users/blend/file.blend: refused. Extra sphere: refused. Version 4.5: refused.

5. Compliance. Banned hits none. Objects 1. Materials 1. Format ledger+plan+script+refuse+gaps. Gaps: engine, export path, subdivision, world lighting, scale units.

Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.

Reviews (0)

Please login to leave a review.
Loading reviews...