[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FA36ZCRNP9QAVWX5NDSMDF":3,"skill-same:01M7FA36ZCRNP9QAVWX5NDSMDF":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7FA36ZCRNP9QAVWX5NDSMDF","blender-syntax-animation",null,"Use when creating animations programmatically in Blender -- keyframes, FCurves, Actions, NLA strips, drivers, or armature operations. Prevents the breaking change pitfall of using bone.layers (removed in 4.0) instead of BoneCollection. Covers keyframe_insert, FCurve access, Action data blocks, NLA system, driver expressions, and timeline control. Keywords: keyframe, FCurve, Action, NLA, BoneCollection, armature, driver, animation, bone layers, timeline, bpy.ops.anim, set keyframe from script, animate object, move object over time.","lagzgabrielmuller-dot\u002Fkit-ingenieria-3d","lagzgabrielmuller-dot","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F333339260?v=4","01M7F985KYC0XB2XZ97B5YWH4C","01M7F985MHK8N2NVE4VAR5WBWS",0,"MIT","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-animation\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: blender-syntax-animation\ndescription: >\n  Use when creating animations programmatically in Blender -- keyframes, FCurves, Actions,\n  NLA strips, drivers, or armature operations. Prevents the breaking change pitfall of using\n  bone.layers (removed in 4.0) instead of BoneCollection. Covers keyframe_insert, FCurve\n  access, Action data blocks, NLA system, driver expressions, and timeline control.\n  Keywords: keyframe, FCurve, Action, NLA, BoneCollection, armature, driver, animation, bone layers, timeline, bpy.ops.anim, set keyframe from script, animate object, move object over time.\nlicense: MIT\ncompatibility: \"Designed for Claude Code. Requires Blender 3.x\u002F4.x\u002F5.x with Python.\"\nmetadata:\n  author: OpenAEC-Foundation\n  version: \"1.0\"\n---\n\n# blender-syntax-animation\n\n## Quick Reference\n\n### Critical Warnings\n\n**ALWAYS** set the property value BEFORE calling `keyframe_insert()` — keyframes record the current value at call time.\n\n**ALWAYS** call `fcurve.update()` after manually adding or modifying keyframe points via `keyframe_points.add()` or direct `.co` assignment.\n\n**NEVER** access `edit_bones` outside of Edit Mode — the collection is empty\u002Finaccessible in Object or Pose Mode.\n\n**NEVER** use `bone.layers` or `pose.bone_groups` in Blender 4.0+ — these are removed. Use `BoneCollection` instead.\n\n**NEVER** use `driver.expression` referencing `self` without enabling `driver.use_self = True`.\n\n**ALWAYS** create `animation_data` before accessing `.action` or `.nla_tracks` — call `obj.animation_data_create()` if `obj.animation_data is None`.\n\n### Decision Tree: Animation Approach\n\n```\nNeed to animate a property?\n├─ Simple keyframe on existing property?\n│  └─ Use obj.keyframe_insert(data_path=..., frame=...)\n├─ Need programmatic control over curve shape?\n│  └─ Use FCurve API: action.fcurves.new() + keyframe_points.add()\n├─ Need to combine\u002Flayer multiple animations?\n│  └─ Use NLA system: nla_tracks.new() + track.strips.new()\n├─ Need property driven by expression or other property?\n│  └─ Use Drivers: obj.driver_add() + driver.expression\n├─ Need to organize armature bones into groups (4.0+)?\n│  └─ Use BoneCollection: armature.collections.new()\n└─ Need parametric mesh deformation?\n   └─ Use Shape Keys: obj.shape_key_add() + keyframe on .value\n```\n\n### Version Matrix: Animation Features\n\n| Feature | Blender 3.x | Blender 4.0+ | Blender 5.x |\n|---------|-------------|--------------|-------------|\n| `keyframe_insert()` | Available | Available | Available |\n| `FCurve` \u002F `Action` | Available | Available | Available |\n| `NLA` system | Available | Available | Available |\n| `bone.layers[i]` | Available | **REMOVED** | **REMOVED** |\n| `pose.bone_groups` | Available | **REMOVED** | **REMOVED** |\n| `BoneCollection` | Not available | **NEW** | Available |\n| `BoneCollection.color_tag` | Not available | **NEW** | Available |\n| Drivers | Available | Available | Available |\n| Shape Keys | Available | Available | Available |\n\n---\n\n## Essential Patterns\n\n### Pattern 1: Keyframe Insertion\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: insert keyframes on animatable properties\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\nif obj is None:\n    raise RuntimeError(\"Object 'Cube' not found\")\n\n# ALWAYS set value BEFORE inserting keyframe\nobj.location = (0.0, 0.0, 0.0)\nobj.keyframe_insert(data_path=\"location\", frame=1)\n\nobj.location = (5.0, 0.0, 3.0)\nobj.keyframe_insert(data_path=\"location\", frame=60)\n\n# Single axis only (index: 0=X, 1=Y, 2=Z, -1=all)\nobj.keyframe_insert(data_path=\"location\", frame=30, index=2)  # Z only\n\n# Group parameter organizes FCurves in the Action Editor\nobj.keyframe_insert(data_path=\"rotation_euler\", frame=1, group=\"Transform\")\n```\n\n**Parameters for `keyframe_insert()`:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `data_path` | `str` | RNA path to property (`\"location\"`, `\"rotation_euler\"`, `\"scale\"`) |\n| `index` | `int` | Array index for vector properties (-1 = all, 0 = X, 1 = Y, 2 = Z) |\n| `frame` | `float` | Frame number for the keyframe |\n| `group` | `str` | Action group name for this FCurve |\n| `options` | `set` | `{'INSERTKEY_NEEDED'}`, `{'INSERTKEY_VISUAL'}`, etc. |\n\n### Pattern 2: FCurve Access and Manipulation\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: direct FCurve manipulation\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Ensure animation data exists\nanim_data = obj.animation_data\nif anim_data is None:\n    anim_data = obj.animation_data_create()\n\n# Ensure action exists\naction = anim_data.action\nif action is None:\n    action = bpy.data.actions.new(name=\"MyAction\")\n    anim_data.action = action\n\n# Create FCurve for X location\nfcurve = action.fcurves.new(data_path=\"location\", index=0)\n\n# Add keyframe points in bulk\nfcurve.keyframe_points.add(count=3)\nfcurve.keyframe_points[0].co = (1.0, 0.0)    # (frame, value)\nfcurve.keyframe_points[1].co = (30.0, 5.0)\nfcurve.keyframe_points[2].co = (60.0, 0.0)\n\n# Set interpolation per keyframe\nfor kp in fcurve.keyframe_points:\n    kp.interpolation = 'BEZIER'\n    kp.handle_left_type = 'AUTO_CLAMPED'\n    kp.handle_right_type = 'AUTO_CLAMPED'\n\n# ALWAYS call update after manual changes\nfcurve.update()\n```\n\n### Pattern 3: Drivers\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: add driver to a property\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Add driver to Z location (returns FCurve with .driver attribute)\ndriver_fcurve = obj.driver_add(\"location\", 2)\ndriver = driver_fcurve.driver\n\n# Set driver type\ndriver.type = 'SCRIPTED'  # 'AVERAGE', 'SUM', 'SCRIPTED', 'MIN', 'MAX'\n\n# Add a variable referencing another object's transform\nvar = driver.variables.new()\nvar.name = \"ctrl_z\"\nvar.type = 'TRANSFORMS'\n\ntarget = var.targets[0]\ntarget.id = bpy.data.objects[\"ControlEmpty\"]\ntarget.transform_type = 'LOC_Z'\ntarget.transform_space = 'WORLD_SPACE'\n\n# Set expression\ndriver.expression = \"ctrl_z * 2.0\"\n\n# Remove a driver\n# obj.driver_remove(\"location\", 2)\n```\n\n### Pattern 4: NLA System\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: NLA workflow\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\nanim_data = obj.animation_data\nif anim_data is None:\n    anim_data = obj.animation_data_create()\n\n# Create NLA track\ntrack = anim_data.nla_tracks.new()\ntrack.name = \"MovementTrack\"\n\n# Push action as NLA strip\naction = bpy.data.actions.get(\"MoveAction\")\nif action is not None:\n    strip = track.strips.new(name=\"Move\", start=1, action=action)\n    strip.blend_type = 'REPLACE'   # 'REPLACE','COMBINE','ADD','SUBTRACT','MULTIPLY'\n    strip.use_auto_blend = True\n    strip.repeat = 1.0\n    strip.scale = 1.0\n    strip.mute = False\n```\n\n### Pattern 5: Bone Collections (4.0+)\n\n```python\n# Blender 4.0+\u002F5.x: bone collections replace bone layers and bone groups\nimport bpy\n\narmature_data = bpy.data.armatures.new(\"MyArmature\")\narmature_obj = bpy.data.objects.new(\"MyArmature\", armature_data)\nbpy.context.collection.objects.link(armature_obj)\n\n# MUST enter Edit Mode to create\u002Fedit bones\nbpy.context.view_layer.objects.active = armature_obj\nbpy.ops.object.mode_set(mode='EDIT')\n\nroot = armature_data.edit_bones.new(\"Root\")\nroot.head = (0, 0, 0)\nroot.tail = (0, 0, 1)\n\nchild = armature_data.edit_bones.new(\"Child\")\nchild.head = (0, 0, 1)\nchild.tail = (0, 0, 2)\nchild.parent = root\n\nbpy.ops.object.mode_set(mode='OBJECT')\n\n# Create bone collections (4.0+ only)\ndeform_col = armature_data.collections.new(\"Deform\")\ncontrol_col = armature_data.collections.new(\"Controls\")\n\n# Assign bones to collections\ndeform_col.assign(armature_data.bones[\"Root\"])\ncontrol_col.assign(armature_data.bones[\"Child\"])\n\n# Set visibility and color\ndeform_col.is_visible = True\ncontrol_col.is_visible = True\ncontrol_col.color_tag = 'THEME01'  # THEME01..THEME20 or COLOR_01..COLOR_20\n```\n\n### Pattern 6: Shape Keys\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: shape keys for parametric deformation\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Add basis shape key FIRST (required)\nbasis = obj.shape_key_add(name=\"Basis\", from_mix=False)\n\n# Add deformed shape key\ndeformed = obj.shape_key_add(name=\"Open\", from_mix=False)\nfor i, vert in enumerate(deformed.data):\n    vert.co.z += 0.5  # Modify relative to Basis\n\n# Animate shape key value\nkey_block = obj.data.shape_keys.key_blocks[\"Open\"]\nkey_block.value = 0.0\nkey_block.keyframe_insert(data_path=\"value\", frame=1)\nkey_block.value = 1.0\nkey_block.keyframe_insert(data_path=\"value\", frame=30)\n```\n\n---\n\n## Common Operations\n\n### Timeline Control\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: scene timeline settings\nimport bpy\n\nscene = bpy.context.scene\n\n# Set frame range\nscene.frame_start = 1\nscene.frame_end = 250\n\n# Set current frame\nscene.frame_set(50)         # Updates depsgraph\nscene.frame_current = 50    # Direct assignment (no depsgraph update)\n\n# Get FPS\nfps = scene.render.fps \u002F scene.render.fps_base\n```\n\n### Reading FCurve Data\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: iterate and query FCurves\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\nif obj.animation_data and obj.animation_data.action:\n    action = obj.animation_data.action\n    for fcurve in action.fcurves:\n        print(f\"Path: {fcurve.data_path}[{fcurve.array_index}]\")\n        print(f\"  Range: {fcurve.range()}\")\n        # Evaluate at specific frame\n        val = fcurve.evaluate(frame=25.0)\n        print(f\"  Value at frame 25: {val}\")\n```\n\n### FCurve Modifiers\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: add modifiers to FCurves\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\naction = obj.animation_data.action\nfcurve = action.fcurves[0]\n\n# Add Noise modifier\nnoise = fcurve.modifiers.new(type='NOISE')\nnoise.scale = 5.0\nnoise.strength = 0.3\nnoise.phase = 0.0\n\n# Add Cycles modifier (loop animation)\ncycles = fcurve.modifiers.new(type='CYCLES')\ncycles.mode_before = 'REPEAT'\ncycles.mode_after = 'REPEAT'\n```\n\n### Constraints\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: add constraints to objects\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Copy Location constraint\nconstraint = obj.constraints.new('COPY_LOCATION')\nconstraint.name = \"Follow\"\nconstraint.target = bpy.data.objects.get(\"Empty\")\nconstraint.influence = 0.5\n\n# IK constraint on pose bone\narmature = bpy.data.objects.get(\"Armature\")\nif armature:\n    pose_bone = armature.pose.bones.get(\"Hand\")\n    if pose_bone:\n        ik = pose_bone.constraints.new('IK')\n        ik.target = bpy.data.objects.get(\"IKTarget\")\n        ik.chain_count = 3\n```\n\n### Bone Access by Mode\n\n| Mode | Collection | Access Type | Use Case |\n|------|-----------|-------------|----------|\n| Edit Mode | `armature.edit_bones` | Read\u002FWrite | Create, delete, reparent bones |\n| Object Mode | `armature.bones` | Read-only properties | Read rest pose, check collections |\n| Pose Mode | `armature.pose.bones` | Transforms, constraints | Animate, add constraints |\n\n---\n\n## Version Migration: Bone Layers to Bone Collections\n\n### Blender 3.x (Legacy: BROKEN in 4.0+)\n\n```python\n# BROKEN in 4.0+: DO NOT USE\n# bone.layers[0] = True              # REMOVED\n# bone.layers[16] = True             # REMOVED\n# pose_bone_group = pose.bone_groups.new(name=\"Controls\")  # REMOVED\n# pose_bone_group.color_set = 'THEME01'                    # REMOVED\n```\n\n### Blender 4.0+ (Current)\n\n```python\n# Blender 4.0+\u002F5.x: bone collections API\narmature = bpy.data.armatures[\"MyArmature\"]\n\n# Create collections\ncol = armature.collections.new(\"MyGroup\")\n\n# Assign bones\ncol.assign(armature.bones[\"BoneName\"])\n\n# Unassign bones\ncol.unassign(armature.bones[\"BoneName\"])\n\n# Check membership\nis_member = armature.bones[\"BoneName\"] in col.bones\n\n# Color (replaces bone_groups color)\ncol.color_tag = 'THEME05'\n\n# Visibility (replaces bone layers visibility)\ncol.is_visible = False\n```\n\n### Version-Safe Pattern\n\n```python\nimport bpy\n\ndef assign_bone_to_group(armature_data, bone_name, group_name, color_tag='THEME01'):\n    \"\"\"Assign bone to a named group. Works in 4.0+ only.\"\"\"\n    if bpy.app.version \u003C (4, 0, 0):\n        raise RuntimeError(\"BoneCollection requires Blender 4.0+\")\n    col = armature_data.collections.get(group_name)\n    if col is None:\n        col = armature_data.collections.new(group_name)\n        col.color_tag = color_tag\n    bone = armature_data.bones.get(bone_name)\n    if bone is not None:\n        col.assign(bone)\n    return col\n```\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Complete API signatures for keyframe_insert, FCurve, Action, NLA, BoneCollection, Driver\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Working code examples for animation workflows\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — What NOT to do with animation APIs\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.FCurve.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Keyframe.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Action.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.NlaTrack.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.NlaStrip.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Driver.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.DriverVariable.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.BoneCollection.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.ShapeKey.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.EditBone.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.FCurveKeyframePoints.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F4.0\u002Fupgrading\u002Fbone_collections\u002F\n","# blender-syntax-animation\n\n## Quick Reference\n\n### Critical Warnings\n\n**ALWAYS** set the property value BEFORE calling `keyframe_insert()` — keyframes record the current value at call time.\n\n**ALWAYS** call `fcurve.update()` after manually adding or modifying keyframe points via `keyframe_points.add()` or direct `.co` assignment.\n\n**NEVER** access `edit_bones` outside of Edit Mode — the collection is empty\u002Finaccessible in Object or Pose Mode.\n\n**NEVER** use `bone.layers` or `pose.bone_groups` in Blender 4.0+ — these are removed. Use `BoneCollection` instead.\n\n**NEVER** use `driver.expression` referencing `self` without enabling `driver.use_self = True`.\n\n**ALWAYS** create `animation_data` before accessing `.action` or `.nla_tracks` — call `obj.animation_data_create()` if `obj.animation_data is None`.\n\n### Decision Tree: Animation Approach\n\n```\nNeed to animate a property?\n├─ Simple keyframe on existing property?\n│  └─ Use obj.keyframe_insert(data_path=..., frame=...)\n├─ Need programmatic control over curve shape?\n│  └─ Use FCurve API: action.fcurves.new() + keyframe_points.add()\n├─ Need to combine\u002Flayer multiple animations?\n│  └─ Use NLA system: nla_tracks.new() + track.strips.new()\n├─ Need property driven by expression or other property?\n│  └─ Use Drivers: obj.driver_add() + driver.expression\n├─ Need to organize armature bones into groups (4.0+)?\n│  └─ Use BoneCollection: armature.collections.new()\n└─ Need parametric mesh deformation?\n   └─ Use Shape Keys: obj.shape_key_add() + keyframe on .value\n```\n\n### Version Matrix: Animation Features\n\n| Feature | Blender 3.x | Blender 4.0+ | Blender 5.x |\n|---------|-------------|--------------|-------------|\n| `keyframe_insert()` | Available | Available | Available |\n| `FCurve` \u002F `Action` | Available | Available | Available |\n| `NLA` system | Available | Available | Available |\n| `bone.layers[i]` | Available | **REMOVED** | **REMOVED** |\n| `pose.bone_groups` | Available | **REMOVED** | **REMOVED** |\n| `BoneCollection` | Not available | **NEW** | Available |\n| `BoneCollection.color_tag` | Not available | **NEW** | Available |\n| Drivers | Available | Available | Available |\n| Shape Keys | Available | Available | Available |\n\n---\n\n## Essential Patterns\n\n### Pattern 1: Keyframe Insertion\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: insert keyframes on animatable properties\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\nif obj is None:\n    raise RuntimeError(\"Object 'Cube' not found\")\n\n# ALWAYS set value BEFORE inserting keyframe\nobj.location = (0.0, 0.0, 0.0)\nobj.keyframe_insert(data_path=\"location\", frame=1)\n\nobj.location = (5.0, 0.0, 3.0)\nobj.keyframe_insert(data_path=\"location\", frame=60)\n\n# Single axis only (index: 0=X, 1=Y, 2=Z, -1=all)\nobj.keyframe_insert(data_path=\"location\", frame=30, index=2)  # Z only\n\n# Group parameter organizes FCurves in the Action Editor\nobj.keyframe_insert(data_path=\"rotation_euler\", frame=1, group=\"Transform\")\n```\n\n**Parameters for `keyframe_insert()`:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `data_path` | `str` | RNA path to property (`\"location\"`, `\"rotation_euler\"`, `\"scale\"`) |\n| `index` | `int` | Array index for vector properties (-1 = all, 0 = X, 1 = Y, 2 = Z) |\n| `frame` | `float` | Frame number for the keyframe |\n| `group` | `str` | Action group name for this FCurve |\n| `options` | `set` | `{'INSERTKEY_NEEDED'}`, `{'INSERTKEY_VISUAL'}`, etc. |\n\n### Pattern 2: FCurve Access and Manipulation\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: direct FCurve manipulation\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Ensure animation data exists\nanim_data = obj.animation_data\nif anim_data is None:\n    anim_data = obj.animation_data_create()\n\n# Ensure action exists\naction = anim_data.action\nif action is None:\n    action = bpy.data.actions.new(name=\"MyAction\")\n    anim_data.action = action\n\n# Create FCurve for X location\nfcurve = action.fcurves.new(data_path=\"location\", index=0)\n\n# Add keyframe points in bulk\nfcurve.keyframe_points.add(count=3)\nfcurve.keyframe_points[0].co = (1.0, 0.0)    # (frame, value)\nfcurve.keyframe_points[1].co = (30.0, 5.0)\nfcurve.keyframe_points[2].co = (60.0, 0.0)\n\n# Set interpolation per keyframe\nfor kp in fcurve.keyframe_points:\n    kp.interpolation = 'BEZIER'\n    kp.handle_left_type = 'AUTO_CLAMPED'\n    kp.handle_right_type = 'AUTO_CLAMPED'\n\n# ALWAYS call update after manual changes\nfcurve.update()\n```\n\n### Pattern 3: Drivers\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: add driver to a property\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Add driver to Z location (returns FCurve with .driver attribute)\ndriver_fcurve = obj.driver_add(\"location\", 2)\ndriver = driver_fcurve.driver\n\n# Set driver type\ndriver.type = 'SCRIPTED'  # 'AVERAGE', 'SUM', 'SCRIPTED', 'MIN', 'MAX'\n\n# Add a variable referencing another object's transform\nvar = driver.variables.new()\nvar.name = \"ctrl_z\"\nvar.type = 'TRANSFORMS'\n\ntarget = var.targets[0]\ntarget.id = bpy.data.objects[\"ControlEmpty\"]\ntarget.transform_type = 'LOC_Z'\ntarget.transform_space = 'WORLD_SPACE'\n\n# Set expression\ndriver.expression = \"ctrl_z * 2.0\"\n\n# Remove a driver\n# obj.driver_remove(\"location\", 2)\n```\n\n### Pattern 4: NLA System\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: NLA workflow\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\nanim_data = obj.animation_data\nif anim_data is None:\n    anim_data = obj.animation_data_create()\n\n# Create NLA track\ntrack = anim_data.nla_tracks.new()\ntrack.name = \"MovementTrack\"\n\n# Push action as NLA strip\naction = bpy.data.actions.get(\"MoveAction\")\nif action is not None:\n    strip = track.strips.new(name=\"Move\", start=1, action=action)\n    strip.blend_type = 'REPLACE'   # 'REPLACE','COMBINE','ADD','SUBTRACT','MULTIPLY'\n    strip.use_auto_blend = True\n    strip.repeat = 1.0\n    strip.scale = 1.0\n    strip.mute = False\n```\n\n### Pattern 5: Bone Collections (4.0+)\n\n```python\n# Blender 4.0+\u002F5.x: bone collections replace bone layers and bone groups\nimport bpy\n\narmature_data = bpy.data.armatures.new(\"MyArmature\")\narmature_obj = bpy.data.objects.new(\"MyArmature\", armature_data)\nbpy.context.collection.objects.link(armature_obj)\n\n# MUST enter Edit Mode to create\u002Fedit bones\nbpy.context.view_layer.objects.active = armature_obj\nbpy.ops.object.mode_set(mode='EDIT')\n\nroot = armature_data.edit_bones.new(\"Root\")\nroot.head = (0, 0, 0)\nroot.tail = (0, 0, 1)\n\nchild = armature_data.edit_bones.new(\"Child\")\nchild.head = (0, 0, 1)\nchild.tail = (0, 0, 2)\nchild.parent = root\n\nbpy.ops.object.mode_set(mode='OBJECT')\n\n# Create bone collections (4.0+ only)\ndeform_col = armature_data.collections.new(\"Deform\")\ncontrol_col = armature_data.collections.new(\"Controls\")\n\n# Assign bones to collections\ndeform_col.assign(armature_data.bones[\"Root\"])\ncontrol_col.assign(armature_data.bones[\"Child\"])\n\n# Set visibility and color\ndeform_col.is_visible = True\ncontrol_col.is_visible = True\ncontrol_col.color_tag = 'THEME01'  # THEME01..THEME20 or COLOR_01..COLOR_20\n```\n\n### Pattern 6: Shape Keys\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: shape keys for parametric deformation\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Add basis shape key FIRST (required)\nbasis = obj.shape_key_add(name=\"Basis\", from_mix=False)\n\n# Add deformed shape key\ndeformed = obj.shape_key_add(name=\"Open\", from_mix=False)\nfor i, vert in enumerate(deformed.data):\n    vert.co.z += 0.5  # Modify relative to Basis\n\n# Animate shape key value\nkey_block = obj.data.shape_keys.key_blocks[\"Open\"]\nkey_block.value = 0.0\nkey_block.keyframe_insert(data_path=\"value\", frame=1)\nkey_block.value = 1.0\nkey_block.keyframe_insert(data_path=\"value\", frame=30)\n```\n\n---\n\n## Common Operations\n\n### Timeline Control\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: scene timeline settings\nimport bpy\n\nscene = bpy.context.scene\n\n# Set frame range\nscene.frame_start = 1\nscene.frame_end = 250\n\n# Set current frame\nscene.frame_set(50)         # Updates depsgraph\nscene.frame_current = 50    # Direct assignment (no depsgraph update)\n\n# Get FPS\nfps = scene.render.fps \u002F scene.render.fps_base\n```\n\n### Reading FCurve Data\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: iterate and query FCurves\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\nif obj.animation_data and obj.animation_data.action:\n    action = obj.animation_data.action\n    for fcurve in action.fcurves:\n        print(f\"Path: {fcurve.data_path}[{fcurve.array_index}]\")\n        print(f\"  Range: {fcurve.range()}\")\n        # Evaluate at specific frame\n        val = fcurve.evaluate(frame=25.0)\n        print(f\"  Value at frame 25: {val}\")\n```\n\n### FCurve Modifiers\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: add modifiers to FCurves\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\naction = obj.animation_data.action\nfcurve = action.fcurves[0]\n\n# Add Noise modifier\nnoise = fcurve.modifiers.new(type='NOISE')\nnoise.scale = 5.0\nnoise.strength = 0.3\nnoise.phase = 0.0\n\n# Add Cycles modifier (loop animation)\ncycles = fcurve.modifiers.new(type='CYCLES')\ncycles.mode_before = 'REPEAT'\ncycles.mode_after = 'REPEAT'\n```\n\n### Constraints\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: add constraints to objects\nimport bpy\n\nobj = bpy.data.objects.get(\"Cube\")\n\n# Copy Location constraint\nconstraint = obj.constraints.new('COPY_LOCATION')\nconstraint.name = \"Follow\"\nconstraint.target = bpy.data.objects.get(\"Empty\")\nconstraint.influence = 0.5\n\n# IK constraint on pose bone\narmature = bpy.data.objects.get(\"Armature\")\nif armature:\n    pose_bone = armature.pose.bones.get(\"Hand\")\n    if pose_bone:\n        ik = pose_bone.constraints.new('IK')\n        ik.target = bpy.data.objects.get(\"IKTarget\")\n        ik.chain_count = 3\n```\n\n### Bone Access by Mode\n\n| Mode | Collection | Access Type | Use Case |\n|------|-----------|-------------|----------|\n| Edit Mode | `armature.edit_bones` | Read\u002FWrite | Create, delete, reparent bones |\n| Object Mode | `armature.bones` | Read-only properties | Read rest pose, check collections |\n| Pose Mode | `armature.pose.bones` | Transforms, constraints | Animate, add constraints |\n\n---\n\n## Version Migration: Bone Layers to Bone Collections\n\n### Blender 3.x (Legacy: BROKEN in 4.0+)\n\n```python\n# BROKEN in 4.0+: DO NOT USE\n# bone.layers[0] = True              # REMOVED\n# bone.layers[16] = True             # REMOVED\n# pose_bone_group = pose.bone_groups.new(name=\"Controls\")  # REMOVED\n# pose_bone_group.color_set = 'THEME01'                    # REMOVED\n```\n\n### Blender 4.0+ (Current)\n\n```python\n# Blender 4.0+\u002F5.x: bone collections API\narmature = bpy.data.armatures[\"MyArmature\"]\n\n# Create collections\ncol = armature.collections.new(\"MyGroup\")\n\n# Assign bones\ncol.assign(armature.bones[\"BoneName\"])\n\n# Unassign bones\ncol.unassign(armature.bones[\"BoneName\"])\n\n# Check membership\nis_member = armature.bones[\"BoneName\"] in col.bones\n\n# Color (replaces bone_groups color)\ncol.color_tag = 'THEME05'\n\n# Visibility (replaces bone layers visibility)\ncol.is_visible = False\n```\n\n### Version-Safe Pattern\n\n```python\nimport bpy\n\ndef assign_bone_to_group(armature_data, bone_name, group_name, color_tag='THEME01'):\n    \"\"\"Assign bone to a named group. Works in 4.0+ only.\"\"\"\n    if bpy.app.version \u003C (4, 0, 0):\n        raise RuntimeError(\"BoneCollection requires Blender 4.0+\")\n    col = armature_data.collections.get(group_name)\n    if col is None:\n        col = armature_data.collections.new(group_name)\n        col.color_tag = color_tag\n    bone = armature_data.bones.get(bone_name)\n    if bone is not None:\n        col.assign(bone)\n    return col\n```\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Complete API signatures for keyframe_insert, FCurve, Action, NLA, BoneCollection, Driver\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Working code examples for animation workflows\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — What NOT to do with animation APIs\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.FCurve.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Keyframe.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Action.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.NlaTrack.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.NlaStrip.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Driver.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.DriverVariable.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.BoneCollection.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.ShapeKey.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.EditBone.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.FCurveKeyframePoints.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F4.0\u002Fupgrading\u002Fbone_collections\u002F\n",{"name":5,"license":14,"metadata":23,"description":26,"compatibility":27},{"author":24,"version":25},"OpenAEC-Foundation","1.0","Use when creating animations programmatically in Blender -- keyframes, FCurves, Actions, NLA strips, drivers, or armature operations. Prevents the breaking change pitfall of using bone.layers (removed in 4.0) instead of BoneCollection. Covers keyframe_insert, FCurve access, Action data blocks, NLA system, driver expressions, and timeline control. Keywords: keyframe, FCurve, Action, NLA, BoneCollection, armature, driver, animation, bone layers, timeline, bpy.ops.anim, set keyframe from script, animate object, move object over time.\n","Designed for Claude Code. Requires Blender 3.x\u002F4.x\u002F5.x with Python.","main","9bb7acf0c2ec4f44373969cb14e55af3c9a8385f","plugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-animation","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot","2026-11-09 13:26:47",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-animation",{"tool":40,"command":41},"bunx","bunx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-animation",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-animation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-animation\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fanti-patterns.md","REFERENCE","参考文档",6742,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-animation\u002Freferences\u002Fanti-patterns.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",16463,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-animation\u002Freferences\u002Fexamples.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fmethods.md",21308,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-animation\u002Freferences\u002Fmethods.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7FBFSZ93YM463CGS91D0TZG","manimce-best-practices","Trigger when: (1) User mentions \"manim\" or \"Manim Community\" or \"ManimCE\", (2) Code contains `from manim import *`, (3) User runs `manim` CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes.\n\nBest practices for Manim Community Edition - the community-maintained Python animation engine. Covers Scene structure, animations, LaTeX\u002FMathTex, 3D with ThreeDScene, camera control, styling, and CLI usage.\n\nNOT for ManimGL\u002F3b1b version (which uses `manimlib` imports and `manimgl` CLI).","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7FB2K59HNNXS9WKHAMWHC3C","drawio","Create, edit, replicate, import, and export draw.io diagrams with an offline YAML-first workflow: architecture, network topologies, flowcharts, UML\u002FER, org charts, Mermaid\u002FCSV conversion, existing .drawio bundles, style presets, themes, and non-publication formula diagrams. For publication figures (paper, thesis, IEEE, camera-ready) use drawio-academic-skills instead.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7FB2BWX7GWK9H2X8BGCYDDD","drawio-academic-skills","Publication-figure overlay for draw.io. Use instead of drawio whenever the diagram is for a paper, thesis, dissertation, journal, conference, IEEE\u002FACM submission, manuscript, camera-ready, Word\u002FLaTeX figure, or other publication. Applies venue, figure-type, color, caption\u002Flegend, formula, and paper-readability gates for architecture, workflow, roadmap, network-topology, and replicated paper figures.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio-academic-skills\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7FB22JESEAV8T15DJT3D444","uncertainty-and-units","Tracks physical units and propagates measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Funcertainty-and-units\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7FB1ANRSG28R335FDY9SA3R","statistical-analysis","Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required sample sizes, or write up results - even if they never name a specific test. Covers t-tests, ANOVA, chi-square, correlation, regression, non-parametric and Bayesian methods. For low-level model APIs, see the statsmodels and pymc skills.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7FB15KRA9D7JCPH4P9T6XJY","simpy","Builds, inspects, tests, and analyzes bounded process-based discrete-event simulations with SimPy. Use for event scheduling, resource queues, interrupts, monitoring, independent replications, warm-up, and reproducible output analysis.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fsimpy\u002FSKILL.md",[],[]]