# How Blender works inside: DNA, RNA, depsgraph

> DNA stores .blend structs, RNA exposes properties to UI and Python, and the depsgraph evaluates copies for viewports.

Source: https://fullbytedeveloper.com/blog/how-blender-works-inside
Published here: 2026-12-03, updated 2026-12-03

Blender is a large interactive 3D program. Its public core docs split three jobs that game and tool developers recognize in spirit: durable file layout (DNA), rich runtime access (RNA), and dependency-aware evaluation (depsgraph) [1] [2] [3]. This page stays on those Blender docs. Related systems teaching style: [Computer Enhance](https://www.computerenhance.com) [5]. CPU loop primer: [how a CPU runs an instruction](/blog/how-a-cpu-runs-an-instruction).

## Quick start (under a minute)

Open Blender, switch to the **Scripting** workspace, and run in the Python console:

```python
import bpy
mesh = bpy.data.meshes[0]
mesh.vertices[0].co
```

You should get a vector value without manually parsing a `.blend` file [2]. That path is RNA: typed properties with metadata, not raw struct pointer arithmetic in your script.

## DNA: what lands in a .blend file

DNA describes the C structs stored in `.blend` files in a reproducible, forward- and backward-compatible way [1]. At build time, `makesdna` parses headers under `source/blender/makesdna/` and emits Structure DNA (SDNA). Saving embeds SDNA beside the binary blobs so the file can describe itself when structs change later [1].

Anything that must persist in a `.blend` needs a DNA definition so `makesdna` can see it [1]. DNA is low-level and sensitive to padding, pointer size, and endianness [1]. Application code outside Blender should treat `.blend` as opaque unless you intentionally work with Blender's format libraries.

## RNA: properties the UI and Python see

RNA defines structured data with metadata and runtime behavior for UI labels, ranges, callbacks, animation, library overrides, and much of `bpy` [2]. `makesrna` turns those definitions into static runtime tables [2].

Example from the docs' framing: Python such as `bpy.data.meshes["Cube"].vertices[0].co` rides RNA descriptions of what those properties are and how to read them [2]. RNA began wrapping DNA and now also covers structures that are not DNA-backed [2]. The UI button you click and the f-curve you keyframe both consult RNA paths.

## Depsgraph: update only what changed

The dependency graph's job is to update scene data after a change as efficiently as possible: nodes are entities, edges are relations (for example parenting) [3]. It owns dynamic updates (f-curves), not one-shot edit operators like a mesh subdivide [3].

Important design points from the depsgraph docs [3]:

| Idea | Meaning |
|---|---|
| DNA from file | Small persistent representation; no runtime fields on DNA |
| Generated data | Evaluation (modifiers, constraints) runs on a copy |
| No write-back to originals | Results live on the depsgraph; engines consume generated data |
| Window ownership | Interactive depsgraphs are owned per window/workspace context |

That copy-on-write evaluation is why two viewports can show different simplification or animation states without fighting over one mutable ID [3].

## How the three layers stack (teaching picture)

<figure aria-label="Blender file DNA and RNA feeding depsgraph evaluated data into viewport and render">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 320" role="img" aria-hidden="true">
  <defs>
    <marker id="howblenderworksinside-blend-arr" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
      <path d="M0,0 L8,4 L0,8 Z" fill="#14b8a6"/>
    </marker>
  </defs>
  <rect x="0" y="0" width="360" height="320" rx="12" fill="#0b1f3a"/>
  <rect x="108" y="4" width="144" height="40" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="1.8"/>
  <text x="180" y="30" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">.blend on disk [1]</text>
  <line x1="180" y1="40" x2="180" y2="58" stroke="#14b8a6" stroke-width="1.8" marker-end="url(#howblenderworksinside-blend-arr)"/>
  <rect x="90" y="57.5" width="180" height="45" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="1.8"/>
  <text x="180" y="86" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">DNA structs (meshes, materials)</text>
  <line x1="180" y1="98" x2="180" y2="118" stroke="#14b8a6" stroke-width="1.8" marker-end="url(#howblenderworksinside-blend-arr)"/>
  <rect x="72" y="117.5" width="216" height="45" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="1.8"/>
  <text x="180" y="146" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">RNA: UI, bpy, animation metadata [2]</text>
  <line x1="180" y1="158" x2="180" y2="178" stroke="#14b8a6" stroke-width="1.8" marker-end="url(#howblenderworksinside-blend-arr)"/>
  <rect x="81" y="176.5" width="198" height="55" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="1.8"/>
  <text x="180" y="202" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">depsgraph [3]</text>
  <text x="180" y="218" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">evaluate on copies; tag dirty nodes</text>
  <line x1="135" y1="226" x2="99" y2="260" stroke="#14b8a6" stroke-width="1.35" marker-end="url(#howblenderworksinside-blend-arr)"/>
  <line x1="225" y1="226" x2="261" y2="260" stroke="#14b8a6" stroke-width="1.35" marker-end="url(#howblenderworksinside-blend-arr)"/>
  <rect x="28.8" y="259" width="126" height="50" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="1.8"/>
  <text x="91.8" y="290" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">viewport draw</text>
  <rect x="205.2" y="259" width="126" height="50" rx="4" fill="#123052" stroke="#14b8a6" stroke-width="1.8"/>
  <text x="268.2" y="290" text-anchor="middle" font-size="12" fill="#e6edf7" font-family="system-ui,sans-serif">Cycles / export</text>
</svg>
</figure>

Renderers read evaluated meshes and transforms. They should not rewrite the DNA original when a subdivision surface toggles [3]. The UI you click ultimately schedules depsgraph work, not direct DNA pointer edits on every frame [2] [3].

## Worked example: RNA path you can type

With the default Cube scene (Blender 4.x, 2026-12-03), the Python console often prints:

```text
Vector((-1.0, -1.0, -1.0))
```

for the first vertex after `mesh.vertices[0].co` [2]. Changing the value through RNA updates the mesh through Blender's operators and tagging system, which schedules depsgraph refresh. Saving persists DNA, not the transient GPU buffer.

A one-line bpy sanity check for object count:

```python
len(bpy.data.objects)
```

observed:

```text
3
```

(cube, light, camera in the default startup file). Counts change when you add empties or collections; the pattern is the same.

## Build-time tools: makesdna and makesrna

Developers rebuilding Blender run code generation steps that normal users never touch [1] [2]. `makesdna` emits struct layout tables used for I/O. `makesrna` emits property definitions consumed at runtime. If a field is missing from DNA, it will not round-trip in `.blend` files even if Python could fake a dict on the side [1].

Undo stacks sit mostly above DNA on the user action side: operators record steps that mutate IDs, then depsgraph refresh picks up the new state [3]. Crashes during evaluation are different from crashes during save; the file on disk may still be intact even when a viewport draw failed.

## Do not map this to Unreal or Unity

Unreal and Unity also separate assets from evaluated scene graphs. Blender's public names are DNA, RNA, and depsgraph [4]. Do not claim they share implementation. Use Blender docs when teaching Blender.

Casey Muratori's [Computer Enhance](https://www.computerenhance.com) is useful adjacent reading for how CPUs chew through tight loops once your evaluated mesh lands in a draw or trace call [5]. It does not document Blender internals.

Linked libraries and addons still talk RNA paths when they expose panels; a broken RNA registration shows up as missing properties in the UI even when the DNA blob on disk is fine [2]. That split is why a corrupt preference file can blank an addon without touching your project `.blend`.

## More reader questions

**Can I script Blender without learning DNA?** For daily bpy work, yes [2]. DNA matters when you debug file versions, write C patches, or estimate `.blend` size on disk [1].

**Why can two viewports disagree?** Separate depsgraph instances per window context evaluate copies with different overrides or simplification [3].


When two viewports disagree, blame evaluation copies first, not a corrupt `.blend`. The depsgraph can hold per-window state while DNA on disk stays smaller than the expanded runtime graph [3].

## Where people go wrong

Editing evaluated mesh data in Python and expecting a magical save. Some writes go through operators that update originals; others touch evaluated copies only. When in doubt, use documented bpy APIs and save, then reopen [2] [3].

RNA paths are a stable UI contract; DNA may pack fields differently [1] [2].

Docs note per-window ownership; editors and render settings can diverge [3].

Treating `.blend` as JSON. It is binary blobs plus SDNA [1]. Version control text diffs are poor fits without special tools.

Expecting modifiers to run backwards into DNA on every frame. Evaluation is copy-on-write; originals stay small [3].

Open one `.blend`, toggle a modifier, and watch the depsgraph force a re-eval before you chase a render farm. Cycles path tracing sits next door in [how Blender Cycles renders](/blog/how-blender-cycles-renders); hardware choice language is [CPU vs GPU vs NPU vs TPU](/blog/cpu-vs-gpu-vs-npu-vs-tpu).

Send this to the friend who treats Blender as a black box before reading DNA and RNA.

Image: Illustration of a dense solid cube lattice on the left, a pegged path into a hub with cyan links, then glowing wireframe cubes, ending at a larger solid output cube, no people and no readable UI text.
https://fullbytedeveloper.com/media/how-blender-works-inside/how-blender-works-inside-venice.webp
Stored mesh data evaluates through a hub into wireframe copies, then a final solid.

## Sources

1. [Blender Developer Docs: DNA, accessed 2026-12-03](https://developer.blender.org/docs/features/core/dna/)
2. [Blender Developer Docs: RNA, accessed 2026-12-03](https://developer.blender.org/docs/features/core/rna/)
3. [Blender Developer Docs: Dependency Graph, accessed 2026-12-03](https://developer.blender.org/docs/features/core/depsgraph/)
4. [Blender Developer Docs: Core index, accessed 2026-12-03](https://developer.blender.org/docs/features/core/)
5. [Casey Muratori / Computer Enhance (performance teaching style, related reading)](https://www.computerenhance.com)
6. [Full Byte Developer: How Blender Cycles renders a frame](https://fullbytedeveloper.com/blog/how-blender-cycles-renders)
7. [Full Byte Developer: How a CPU runs an instruction](https://fullbytedeveloper.com/blog/how-a-cpu-runs-an-instruction)
