# gaming-with-portals/bayonetta2blender2bayonetta architecture

> Architecture diagram of the GitHub repository gaming-with-portals/bayonetta2blender2bayonetta, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gaming-with-portals/bayonetta2blender2bayonetta
- Repository: https://github.com/gaming-with-portals/bayonetta2blender2bayonetta

## Overview

Bayonetta2Blender2Bayonetta is a Blender add-on for importing and exporting PlatinumGames model and companion asset formats. Users select game files in Blender, unpack DAT/DTT archives when needed, and import models, stages, textures, animation, or physics data into a scene; the model workflow centers on WMB import/export. Export operators serialize edited scene data back to game files, with optional combined DAT/DTT packaging. The map emphasizes documented format branches; unsampled modules are included only where the tree and README establish their role, so uncertain call wiring is omitted.

Main entry points: [`dat_dtt/importer/datImportOperator.py`](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/importer/datImportOperator.py) (DAT/DTT Import), [`dat_dtt/exporter/dat_dtt_ui_manager.py`](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/exporter/dat_dtt_ui_manager.py) (Archive Export), [`scr/scr_importer.py`](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/scr/scr_importer.py) (SCR Import), [`wmb/wmbImportOperator.py`](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmbImportOperator.py) (WMB Import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["Models"]
  node_wmb_import_op["WMB Import"]
  node_wmb0_import["WMB0 Import<br/>[wmb_importer.py]"]
  node_wmb3_import["WMB3 Import<br/>[wmb3_importer.py]"]
  node_wmb_export["WMB Export<br/>[wmb_exporter.py]"]
  node_mdb_import["MDB Import<br/>[mdb_importer.py]"]
end

subgraph group_scene["Stages and Archives"]
  node_scr_operator["SCR Operators<br/>[scrOperators.py]"]
  node_scr_import["SCR Import<br/>[scr_importer.py]"]
  node_lyt_import["LYT Import<br/>[lyt_importer.py]"]
  node_dat_operator["DAT/DTT Import"]
  node_dat_unpack["Archive Unpacker<br/>[dat_unpacker.py]"]
  node_dat_export_ui["Archive Export"]
  node_dat_export["DAT/DTT Writer<br/>[export_dat.py]"]
end

subgraph group_textures["Materials and Textures"]
  node_wta_ui["WTA/WTP UI"]
  node_wta_import["WTA/WTP Import<br/>[wta.py]"]
  node_wtp_import_op["WTP Import"]
  node_wta_export["WTA Export<br/>[export_wta.py]"]
  node_wtp_export["WTP Export<br/>[export_wtp.py]"]
  node_texture_decode["Texture Decoder<br/>[pg_texture.py]"]
  node_material_ui["Material Editor<br/>[material_ui.py]"]
end

subgraph group_extras["Animation and Physics"]
  node_mot_operator["MOT Operators<br/>[motOperators.py]"]
  node_mot_import["MOT Import<br/>[mot_importer.py]"]
  node_physics_ui["Physics Editor<br/>[physPanel.py]"]
  node_clp_import["CLP Import<br/>[bClp.py]"]
end

node_artist(("Blender User"))
node_blender["Blender Scene"]
node_game_files["Game Files"]
node_astc_encoder["ASTC Encoder"]

node_artist -->|"selects model"| node_wmb_import_op
node_wmb_import_op -->|"dispatches WMB0"| node_wmb0_import
node_wmb_import_op -->|"dispatches WMB3"| node_wmb3_import
node_wmb0_import -->|"creates scene data"| node_blender
node_wmb3_import -->|"creates scene data"| node_blender
node_artist -->|"edits scene"| node_blender
node_artist -->|"exports model"| node_wmb_export
node_wmb_export -->|"writes WMB"| node_game_files
node_artist -->|"selects MDB"| node_mdb_import
node_mdb_import -->|"imports model"| node_blender
node_artist -->|"selects stage"| node_scr_operator
node_scr_operator -->|"invokes import"| node_scr_import
node_scr_import -->|"imports stage models"| node_wmb_import_op
node_scr_import -->|"extracts textures"| node_texture_decode
node_scr_import -->|"creates stage data"| node_blender
node_artist -->|"selects LYT"| node_lyt_import
node_lyt_import -->|"creates layout data"| node_blender
node_artist -->|"selects archive"| node_dat_operator
node_dat_operator -->|"unpacks files"| node_dat_unpack
node_dat_operator -->|"imports SCR"| node_scr_import
node_dat_operator -->|"imports WMB"| node_wmb_import_op
node_dat_operator -->|"imports LYT"| node_lyt_import
node_dat_unpack -->|"reads archive"| node_game_files
node_artist -->|"starts export"| node_dat_export_ui
node_dat_export_ui -->|"exports WMB step"| node_wmb_export
node_dat_export_ui -->|"exports WTA step"| node_wta_export
node_dat_export_ui -->|"exports WTP step"| node_wtp_export
node_dat_export_ui -->|"writes archive data"| node_dat_export
node_dat_export -->|"writes DAT/DTT"| node_game_files
node_artist -->|"manages textures"| node_wta_ui
node_wta_ui -->|"invokes export"| node_wta_export
node_wta_ui -->|"invokes export"| node_wtp_export
node_wta_import -->|"extracts textures"| node_texture_decode
node_wtp_import_op -->|"decodes WTP"| node_texture_decode
node_texture_decode -.->|"converts ASTC"| node_astc_encoder
node_artist -->|"edits materials"| node_material_ui
node_material_ui -->|"updates material data"| node_blender
node_artist -->|"imports animation"| node_mot_operator
node_mot_operator -->|"invokes import"| node_mot_import
node_mot_import -->|"creates animation data"| node_blender
node_artist -->|"opens physics editor"| node_physics_ui
node_physics_ui -->|"loads CLP"| node_clp_import
node_clp_import -->|"loads physics data"| node_blender

click node_wmb_import_op "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmbImportOperator.py"
click node_wmb0_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmb0/wmb_importer.py"
click node_wmb3_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmb3/wmb3_importer.py"
click node_wmb_export "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmb0/wmb_exporter.py"
click node_mdb_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/mdb/mdb_importer.py"
click node_scr_operator "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/scr/scrOperators.py"
click node_scr_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/scr/scr_importer.py"
click node_lyt_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/scr/lyt_importer.py"
click node_dat_operator "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/importer/datImportOperator.py"
click node_dat_unpack "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/importer/dat_unpacker.py"
click node_dat_export_ui "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/exporter/dat_dtt_ui_manager.py"
click node_dat_export "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/exporter/export_dat.py"
click node_wta_ui "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/exporter/wta_wtp_ui_manager.py"
click node_wta_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/importer/wta.py"
click node_wtp_import_op "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/importer/wtpImportOperator.py"
click node_wta_export "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/exporter/export_wta.py"
click node_wtp_export "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/exporter/export_wtp.py"
click node_texture_decode "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/pg_texture.py"
click node_material_ui "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/ui/material_ui.py"
click node_mot_operator "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/mot/motOperators.py"
click node_mot_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/mot/mot_importer.py"
click node_physics_ui "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/phys/physPanel.py"
click node_clp_import "https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/phys/bClp.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_wmb_import_op,node_wmb0_import,node_wmb3_import,node_wmb_export,node_mdb_import,node_artist toneBlue
class node_scr_operator,node_scr_import,node_lyt_import,node_dat_operator,node_dat_unpack,node_dat_export_ui,node_dat_export toneAmber
class node_wta_ui,node_wta_import,node_wtp_import_op,node_wta_export,node_wtp_export,node_texture_decode,node_material_ui toneMint
class node_mot_operator,node_mot_import,node_physics_ui,node_clp_import toneRose
class node_blender,node_game_files,node_astc_encoder toneIndigo
```

## Components

### Models

- [WMB Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmbImportOperator.py): `wmb/wmbImportOperator.py`
- [WMB0 Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmb0/wmb_importer.py): `wmb/wmb0/wmb_importer.py`
- [WMB3 Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmb3/wmb3_importer.py): `wmb/wmb3/wmb3_importer.py`
- [WMB Export](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/wmb0/wmb_exporter.py): `wmb/wmb0/wmb_exporter.py`
- [MDB Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wmb/mdb/mdb_importer.py): `wmb/mdb/mdb_importer.py`

### Stages and Archives

- [SCR Operators](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/scr/scrOperators.py): `scr/scrOperators.py`
- [SCR Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/scr/scr_importer.py): `scr/scr_importer.py`
- [LYT Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/scr/lyt_importer.py): `scr/lyt_importer.py`
- [DAT/DTT Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/importer/datImportOperator.py): `dat_dtt/importer/datImportOperator.py`
- [Archive Unpacker](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/importer/dat_unpacker.py): `dat_dtt/importer/dat_unpacker.py`
- [Archive Export](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/exporter/dat_dtt_ui_manager.py): `dat_dtt/exporter/dat_dtt_ui_manager.py`
- [DAT/DTT Writer](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/dat_dtt/exporter/export_dat.py): `dat_dtt/exporter/export_dat.py`

### Materials and Textures

- [WTA/WTP UI](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/exporter/wta_wtp_ui_manager.py): `wta_wtp/exporter/wta_wtp_ui_manager.py`
- [WTA/WTP Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/importer/wta.py): `wta_wtp/importer/wta.py`
- [WTP Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/importer/wtpImportOperator.py): `wta_wtp/importer/wtpImportOperator.py`
- [WTA Export](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/exporter/export_wta.py): `wta_wtp/exporter/export_wta.py`
- [WTP Export](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/exporter/export_wtp.py): `wta_wtp/exporter/export_wtp.py`
- [Texture Decoder](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/wta_wtp/pg_texture.py): `wta_wtp/pg_texture.py`
- [Material Editor](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/ui/material_ui.py): `ui/material_ui.py`

### Animation and Physics

- [MOT Operators](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/mot/motOperators.py): `mot/motOperators.py`
- [MOT Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/mot/mot_importer.py): `mot/mot_importer.py`
- [Physics Editor](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/phys/physPanel.py): `phys/physPanel.py`
- [CLP Import](https://github.com/gaming-with-portals/bayonetta2blender2bayonetta/blob/main/phys/bClp.py): `phys/bClp.py`

### Other components

- **Blender User**
- **Blender Scene**
- **Game Files**
- **ASTC Encoder**

## Connections

- Blender User → WMB Import: selects model
- WMB Import → WMB0 Import: dispatches WMB0
- WMB Import → WMB3 Import: dispatches WMB3
- WMB0 Import → Blender Scene: creates scene data
- WMB3 Import → Blender Scene: creates scene data
- Blender User → Blender Scene: edits scene
- Blender User → WMB Export: exports model
- WMB Export → Game Files: writes WMB
- Blender User → MDB Import: selects MDB
- MDB Import → Blender Scene: imports model
- Blender User → SCR Operators: selects stage
- SCR Operators → SCR Import: invokes import
- SCR Import → WMB Import: imports stage models
- SCR Import → Texture Decoder: extracts textures
- SCR Import → Blender Scene: creates stage data
- Blender User → LYT Import: selects LYT
- LYT Import → Blender Scene: creates layout data
- Blender User → DAT/DTT Import: selects archive
- DAT/DTT Import → Archive Unpacker: unpacks files
- DAT/DTT Import → SCR Import: imports SCR
- DAT/DTT Import → WMB Import: imports WMB
- DAT/DTT Import → LYT Import: imports LYT
- Archive Unpacker → Game Files: reads archive
- Blender User → Archive Export: starts export
- Archive Export → WMB Export: exports WMB step
- Archive Export → WTA Export: exports WTA step
- Archive Export → WTP Export: exports WTP step
- Archive Export → DAT/DTT Writer: writes archive data
- DAT/DTT Writer → Game Files: writes DAT/DTT
- Blender User → WTA/WTP UI: manages textures
- WTA/WTP UI → WTA Export: invokes export
- WTA/WTP UI → WTP Export: invokes export
- WTA/WTP Import → Texture Decoder: extracts textures
- WTP Import → Texture Decoder: decodes WTP
- Texture Decoder → ASTC Encoder: converts ASTC
- Blender User → Material Editor: edits materials
- Material Editor → Blender Scene: updates material data
- Blender User → MOT Operators: imports animation
- MOT Operators → MOT Import: invokes import
- MOT Import → Blender Scene: creates animation data
- Blender User → Physics Editor: opens physics editor
- Physics Editor → CLP Import: loads CLP
- CLP Import → Blender Scene: loads physics data
