Logotipo de Hou Python

Hou Python

Comunidad
rheadsh
hou-python

Write Python (HOM) for SideFX Houdini — procedural modeling, animation, and render automation. Use when scripting the hou module, Python SOPs, parameter expressions, keyframe/animation rigs, ROP/Karma render farming, or translating sculpting and carving workflows into procedural code. Triggers on hou.node, hou.Geometry, Python SOP, hython, .hip automation, or any Houdini Python task.

Descripción general

Editorrheadsh
Repositorioaudiovisual-production-skills
Nombre de la habilidadhou-python
Estrellas
45
Forks
2
Archivos incluidos
11
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 11 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por rheadsh en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Hou Python en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/rheadsh/audiovisual-production-skills/tree/main/hou-python
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rheadsh/audiovisual-production-skills.git /tmp/audiovisual-production-skills
mkdir -p .claude/skills
cp -r /tmp/audiovisual-production-skills/hou-python .claude/skills/hou-python
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Hou Python en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Hou Python automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Hou Python no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Houdini Python (HOM) Scripting

Write Python with the Houdini Object Model (HOM) for procedural modeling, animation, and optimized rendering. The hou package is the root of the API and is auto-imported inside parameter expressions and hython; everywhere else you import hou.

Quick Start

There are four main places Python runs in Houdini:

python
# 1. PARAMETER EXPRESSION (one-liner, language set to Python, auto-cooks)
hou.frame()                                  # current frame
hou.ch("../master/scale")                    # value of another parm
hou.pwd().parm("ty").eval() * 2

# 2. PYTHON SOP (generate/modify geometry per cook)
node = hou.pwd()
geo = node.geometry()
pt = geo.createPoint()
pt.setPosition((0, 1, 0))

# 3. SHELF / SCRIPT / hython (drive the whole scene)
import hou
geo_obj = hou.node("/obj").createNode("geo", "carved_block")
box = geo_obj.createNode("box")
box.parm("scale").set(2.0)

# 4. CALLBACKS & EVENTS (react to parm changes, scene events)
def onParmChanged(node, **kwargs):
    hou.node("/obj/light1").parm("dimmer").set(node.parm("intensity").eval())

Critical Rules

  1. hou.pwd() is the running node — inside a Python SOP it returns that SOP; hou.pwd().geometry() is the geometry to build into.
  2. .eval() to get a value, .set() to write — node.parm("tx").eval() reads; node.parm("tx").set(5) writes. Use parmTuple for vectors: node.parmTuple("t").set((1,2,3)).
  3. Bulk attribute access beats per-element loops — geo.setPointFloatAttribValues(...) / geo.pointFloatAttribValues(...) are an order of magnitude faster than iterating geo.points() in Python.
  4. Never trigger cooks in a tight loop — batch edits, then let Houdini cook once. Wrap large scene edits in with hou.undos.disabler(): for speed when undo isn't needed.
  5. Math runs once per cook in expressions — keep expressions cheap; move heavy work into a Python SOP or cache it as an attribute. Prefer hou.frame()/hou.time() over recomputing time.
  6. Python is single-threaded; VEX is not — for per-point math at scale, generate a Wrangle from Python rather than looping points in Python. (See hou-vex.)

The Core Objects (under the hou module)

python
hou.node("/obj/geo1")          # node by absolute path  -> hou.Node
hou.pwd()                       # the node running this code
hou.parent()                    # parent of the running node
hou.ch("../ctrl/speed")         # quick parm read (expression shorthand)
hou.frame()                     # current frame (float)
hou.time()                      # current time in seconds
hou.fps()                       # scene FPS
hou.playbar.setFrameRange(1,240)
hou.hipFile.path()              # current .hip path
hou.pwd().geometry()            # hou.Geometry of the running SOP

Three Domains This Skill Covers

This skill maps three production domains onto HOM Python. Each has a dedicated reference:

1. Procedural Modeling — carving & sculpting as code. Traditional craft splits into subtractive (carving wood, stone, wax — remove material from a mass) and additive (clay sculpting — push, pinch, and build up form). Both map cleanly to procedural operations. See reference/MODELING.md for the full translation table and recipes:

  • Subtractive (boolean carving, displacement erosion, chiseling with VDBs)
  • Additive (clay-like push/inflate, polymer vs. oil vs. water clay behaviour, smoothing)
  • Build geometry from scratch in a Python SOP, drive HDA carving tools, VDB sculpt loops

2. Animation — the 12 principles, expressions, optimized time math. See reference/ANIMATION.md for keyframing via HOM, expression-driven motion, and how the 12 classic principles (squash & stretch, anticipation, ease in/out, follow-through, etc.) become hou.Keyframe, bezier interpolation, and cheap time functions.

3. Rendering — Python-driven, optimized. See reference/RENDERING.md for batch ROP/Karma rendering, frame-range farming with hython, wedging, dependency-aware output, and the optimization checklist (cook once, freeze sims, defer-load, sane bucket/sample settings).

Common Patterns

See examples/PATTERNS.md for copy-paste templates:

  • Node creation, wiring, and layout
  • Parameter read/write, keyframes, expressions
  • Building geometry in a Python SOP (points, polys, attributes — bulk and per-element)
  • Carving (boolean / VDB) and clay (smooth / inflate) recipes
  • Animation rigs and the 12 principles in code
  • Batch rendering and wedging

Response Format

When providing Houdini Python, always include:

  1. Python code with comments.
  2. Context — where it goes (parameter expression, Python SOP, shelf tool, hython script, or event callback).
  3. Houdini setup — which nodes to create, how to wire them, parameters to set, and whether the parm language must be switched to Python.
  4. Performance note — if the operation could cook heavily, say how to keep it cheap (bulk attrib calls, freeze, cook once).

Writing Process

  1. Identify the context (expression / Python SOP / standalone hython / callback).
  2. Choose Python vs. VEX — heavy per-point math should be VEX generated from Python.
  3. Write the minimal working script, then add error handling.
  4. Note required node connections, parm setup, and the cook/render cost.

Additional Resources

Key Differences from Other Languages

From TouchDesigner Python (td-python):

  • hou.pwd() ≈ me; hou.node(path) ≈ op(path); .eval()/.set() instead of direct par assignment.
  • Houdini cooks a dependency graph on demand — there is no continuous per-frame onCook unless you render or scrub.

From VEX (hou-vex):

  • Python is single-threaded and runs once per cook; VEX runs per-element in parallel.
  • Use Python to orchestrate (build networks, set parms, render); use VEX/Wrangles for per-point math at scale.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Hou Python?

Write Python (HOM) for SideFX Houdini — procedural modeling, animation, and render automation. Use when scripting the hou module, Python SOPs, parameter expressions, keyframe/animation rigs, ROP/Karma render farming, or translating sculpting and carving workflows into procedural code. Triggers on hou.node, hou.Geometry, Python SOP, hython, .hip automation, or any Houdini Python task.

¿Por qué usar Hou Python en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Hou Python está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Hou Python en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/rheadsh/audiovisual-production-skills/tree/main/hou-python. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Hou Python?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Hou Python?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Hou Python con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Hou Python?

Sí. rheadsh la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇