Logo Blender Rules

Blender Rules

Cộng đồng
TMHSDigital
blender-rules

Blender Python anti-pattern rules (bmesh leaks, bpy.ops in loops, deprecated context-copy overrides, bulk mesh writes, prop annotations and context guards, Extensions manifest, import scale, export modifiers, glTF/FBX axis RNA, the removed bgl module, the normals API removed in 4.1). Use when writing, reviewing or fixing any bpy / Blender add-on or script code.

Tổng quan

Nhà phát hànhTMHSDigital
Kho mãBlender-Developer-Tools
Tên kỹ năngblender-rules
Sao
20
Bản fork
5
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được TMHSDigital công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Blender Rules trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/claude/skills/blender-rules
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TMHSDigital/Blender-Developer-Tools.git /tmp/Blender-Developer-Tools
mkdir -p .claude/skills
cp -r /tmp/Blender-Developer-Tools/claude/skills/blender-rules .claude/skills/blender-rules
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Blender Rules trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Blender Rules ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Blender Rules không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Blender Developer Tools rules (Claude Code)

Apply these when writing or reviewing Blender Python. Each rule links to the full version with Wrong/Right examples.

always-free-bmesh

Flag bmesh.new() calls without a paired bm.free() in a try/finally block. Blender frees an unreferenced BMesh only when its Python wrapper dies, which a traceback, global, closure or modal operator can delay for the whole session; an explicit free() in finally releases it deterministically.

Applies to: **/*.py. Full rule: rules/always-free-bmesh.mdc.

branch-eevee-engine-id

Flag render.engine = 'BLENDER_EEVEE_NEXT' or = 'BLENDER_EEVEE' written without a version branch. EEVEE Next used the id 'BLENDER_EEVEE_NEXT' on 4.2 through 4.5 LTS and took back 'BLENDER_EEVEE' in 5.0; each id raises TypeError (enum not found) on the other side. Branch on bpy.app.version >= (5, 0, 0). See the procedural-materials-and-shaders skill.

Applies to: **/*.py. Full rule: rules/branch-eevee-engine-id.mdc.

no-bgl

Flag import bgl and any bgl. call. The bgl OpenGL wrapper was deprecated in 3.x and is gone in Blender 5.x (importlib.util.find_spec('bgl') is None on 5.0, 5.1 and 5.2), so an add-on that imports it fails to register. Draw with the gpu module, gpu.state and gpu_extras.batch instead; see the gpu-drawing-and-overlays skill.

Applies to: **/*.py. Full rule: rules/no-bgl.mdc.

no-legacy-action-fcurves

Flag action.fcurves, action.groups and action.id_root on an Action. Blender 5.0 removed the flat legacy Action API (AttributeError on 5.x); F-curves live in a channelbag per slot. On 4.4/4.5 LTS the legacy path still runs but is a trap on a fresh Action (it creates a slot without binding it). Reach F-curves through the slot's channelbag, or use obj.keyframe_insert. See the slotted-actions-animation skill.

Applies to: **/*.py. Full rule: rules/no-legacy-action-fcurves.mdc.

no-legacy-vse-sequences

Flag sequence_editor.sequences and .sequences_all. Both are gone in Blender 5.x (AttributeError on 5.0, 5.1 and 5.2), while .strips and .strips_all already exist on 4.5 LTS, so use those everywhere with no version branch. See the vse-python skill.

Applies to: **/*.py. Full rule: rules/no-legacy-vse-sequences.mdc.

no-nodes-modifier-idprop-inputs

Flag writing a Geometry Nodes modifier input as an ID property (mod["Socket_2"] = value, mod[identifier] = value) without a version branch. Blender 5.2 removed that form (it raises TypeError, id properties not supported for this type); 5.2+ writes getattr(mod.properties.inputs, identifier).value, which does not exist on 4.5 LTS or 5.1. Branch on bpy.app.version >= (5, 2, 0). See the geometry-nodes-python skill.

Applies to: **/*.py. Full rule: rules/no-nodes-modifier-idprop-inputs.mdc.

no-removed-normals-api

Flag the mesh normals API removed in Blender 4.1 — use_auto_smooth, auto_smooth_angle, calc_normals_split(), free_normals_split(), create_normals_split(). Each raises AttributeError on 4.5 LTS and 5.x. Use Mesh.set_sharp_from_angle, object.shade_auto_smooth, and Mesh.corner_normals (always current) instead.

Applies to: **/*.py. Full rule: rules/no-removed-normals-api.mdc.

no-unapplied-modifiers-on-export

Flag an export call on objects that still carry unapplied modifiers when the export arguments do not request evaluated geometry. The engine then receives the authored cage, not the modifier result.

Applies to: **/*.py. Full rule: rules/no-unapplied-modifiers-on-export.mdc.

prefer-data-over-ops-in-loops

Flag bpy.ops.* calls inside iteration over many objects, meshes, or frames. Each bpy.ops call triggers a full depsgraph evaluation and UI redraw; loops slow down by orders of magnitude. Use bpy.data.* and bmesh instead.

Applies to: **/*.py. Full rule: rules/prefer-data-over-ops-in-loops.mdc.

prefer-temp-override-over-context-copy

Flag uses of bpy.context.copy() to override context for an operator call. Passing a context dict to an operator was deprecated in Blender 3.2 and removed in 4.0, so it already fails on the 4.5 LTS fallback. Use bpy.context.temp_override(**overrides) as a context manager instead.

Applies to: **/*.py. Full rule: rules/prefer-temp-override-over-context-copy.mdc.

principled-v2-socket-names

Flag Principled BSDF inputs looked up by their 3.x names (inputs["Emission"], ["Specular"], ["Clearcoat"], ["Subsurface"], ["Transmission"], ["Sheen"]) or by index. Principled v2 (Blender 4.0) renamed them, so they raise KeyError on 4.5 LTS and 5.x. Use the 4.0+ names (Emission Color, Specular IOR Level, Coat Weight, ...), which need no version branch. See the procedural-materials-and-shaders skill.

Applies to: **/*.py. Full rule: rules/principled-v2-socket-names.mdc.

target-extensions-platform-format

Flag new Blender add-ons that ship only a legacy bl_info dict without a blender_manifest.toml. New add-ons must use the Extensions Platform format. bl_info may appear alongside as a fallback for backward compatibility, but the manifest is the source of truth.

Applies to: **/__init__.py, **/blender_manifest.toml. Full rule: rules/target-extensions-platform-format.mdc.

type-annotate-props-and-defend-context

Flag two related anti-patterns. (1) bpy.props defined as class-level assignments instead of type annotations (deprecated since 2.8). (2) Code that touches bpy.context.active_object without guarding for None, or that assumes the active object is selected.

Applies to: **/*.py. Full rule: rules/type-annotate-props-and-defend-context.mdc.

use-correct-axis-rna-per-exporter

Flag export_scene.gltf calls that pass FBX axis_forward or axis_up, and export_scene.fbx calls that pass glTF export_yup. The two exporters do not share axis RNA.

Applies to: **/*.py. Full rule: rules/use-correct-axis-rna-per-exporter.mdc.

use-foreach-set-for-bulk-data

Flag Python loops that set vertex coordinates, normals, UVs, or other bulk per-element data one element at a time. For meshes of more than a few thousand elements, this is 100x to 1000x slower than mesh.vertices.foreach_set("co", flat_array), which writes through to C-level storage in one pass.

Applies to: **/*.py. Full rule: rules/use-foreach-set-for-bulk-data.mdc.

validate-imported-mesh-scale

Flag a glTF or FBX import followed by mesh operations with no transform_apply and no unit-scale check. Generated files often arrive with non-identity object scale or a non-meter scene scale; mesh edits then bake the wrong size.

Applies to: **/*.py. Full rule: rules/validate-imported-mesh-scale.mdc.

Câu hỏi thường gặp

Kỹ năng AI Blender Rules làm được gì?

Blender Python anti-pattern rules (bmesh leaks, bpy.ops in loops, deprecated context-copy overrides, bulk mesh writes, prop annotations and context guards, Extensions manifest, import scale, export modifiers, glTF/FBX axis RNA, the removed bgl module, the normals API removed in 4.1). Use when writing, reviewing or fixing any bpy / Blender add-on or script code.

Vì sao nên dùng Blender Rules trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Blender Rules là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Blender Rules trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/claude/skills/blender-rules. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Blender Rules?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Blender Rules với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Blender Rules với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Blender Rules có miễn phí không?

Kỹ năng này được TMHSDigital phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇