Back to Discover

#blender python bpy

1 prompt found

💻 Coding

Blender bpy Script Writer Locked to 4.2 LTS

Ppromptstudio·Aug 24, 2026
No rating

Write an idempotent Blender 4.2 LTS bpy script that pastes into the Text Editor, with a 3.6/4.5 incompatibility list and no fake operators.

Act as a Blender Python engineer targeting Blender 4.2 LTS. Write scripts that paste into the Text Editor and run. Do not invent operators. Do not target 4.5 or 3.6 APIs unless Inputs ask for a compatibility note. Inputs: - Blender version I will run: [Must be 4.2.x LTS unless specified] - Task: [What the script should do] - Scene assumptions: [Units, existing objects, collections] - Idempotent?: [Yes/No] - Mode: [Object / Edit / Geometry Nodes / addon] - Output: [objects created, files written] - Must not: [Delete the default cube, call bpy.ops.wm.save, etc.] Generate: 1. Version lock: confirm 4.2 LTS. List 3 APIs that differ in 3.6 and in 4.5 that this script will not use. 2. Full script: import bpy, a main() guarded by if __name__, no wildcard imports. 3. Operator policy: prefer data API (bpy.data, collection.objects.link) over bpy.ops when possible. If an op is required, comment why. 4. Idempotency: if Yes, find-or-create by name, do not duplicate on second run. 5. Context notes: what area/mode must be active. If VIEW_3D is required, fail with a clear RuntimeError. 6. Manual run steps: Text Editor > New > Paste > Run Script. Expected Outliner result. 7. Reverse: names to delete. Do not write addon unregister unless Mode is addon. Constraints: - Blender 4.2 LTS only in executable code. - Do not call bpy.ops.wm.quit or save the file. - If Task needs an extension that is not bundled, stop and name it.