Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mauserzjeh committed Nov 22, 2023
2 parents a5e0848 + 6a75c60 commit 4eff6a3
Show file tree
Hide file tree
Showing 17 changed files with 720 additions and 114 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ Blender add-on for importing various Call of Duty assets via the game files.
- XModel - Compiled models
- Call of Duty 5 World at War
- XModel - Compiled models
- Call of Duty Black Ops
- XModel - Compiled models

## Installation & setup
First of all, extract all the necessary game specific contents. Make sure to have the exact same folder structure as they have originally.

### Call of Duty & Call of Duty United Offensive
Files can be found inside the .pk3 files.
Files can be found inside the `.pk3` files.
```
.
├── maps/
Expand All @@ -34,7 +36,7 @@ Files can be found inside the .pk3 files.
```

### Call of Duty 2
Files can be found inside the .iwd files.
Files can be found inside the `.iwd` files.
```
.
├── images/
Expand All @@ -47,7 +49,7 @@ Files can be found inside the .iwd files.
└── xmodelsurfs/
```
### Call of Duty 4 Modern Warfare
Images can be found inside the .iwd files. The rest of the assets can be acquired by installing modtools.
Images can be found inside the `.iwd` files. The rest of the assets can be acquired by installing modtools.
```
.
├── images/
Expand All @@ -60,7 +62,20 @@ Images can be found inside the .iwd files. The rest of the assets can be acquire
```

### Call of Duty 5 World at War
Images can be found inside the .iwd files. The rest of the assets can be acquired by installing modtools.
Images can be found inside the `.iwd` files. The rest of the assets can be acquired by installing modtools.
```
.
├── images/
├── materials/
├── xanim/
├── xmodel/
├── xmodelalias/
├── xmodelparts/
└── xmodelsurfs/
```

### Call of Duty Black Ops
Images can be found inside the `.iwd` files. The rest of the assets can be acquired by installing modtools. There are still some missing assets though (mostly materials and images).
```
.
├── images/
Expand Down
2 changes: 1 addition & 1 deletion python/cod_asset_importer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Call of Duty Asset Importer",
"description": "Import Call of Duty assets",
"author": "Soma Rádóczi",
"version": (3, 0, 0),
"version": (3, 1, 0),
"blender": (3, 0, 0),
"location": "File > Import -> CoD Asset Importer",
"category": "Import-Export",
Expand Down
26 changes: 18 additions & 8 deletions python/cod_asset_importer/cod_asset_importer.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
from typing import List, Dict
import importer

class XMODEL_VERSIONS:
class XMODEL_VERSION:
V14: int
V20: int
V25: int
V62: int

class GAME_VERSIONS:
CoD1: int
class GAME_VERSION:
CoD: int
CoD2: int
CoD4: int
CoD5: int
CoDBO1: int

class TEXTURE_TYPE:
Unused: int
Color: int
Normal: int
Specular: int
Roughness: int
Detail: int

class Loader:
def __init__(self, importer: importer.Importer) -> None: ...
Expand All @@ -19,7 +29,7 @@ class Loader:
self,
asset_path: str,
file_path: str,
selected_version: GAME_VERSIONS,
selected_version: GAME_VERSION,
angles: List[float],
origin: List[float],
scale: List[float],
Expand All @@ -31,22 +41,22 @@ class LoadedIbsp:

class LoadedModel:
def name(self) -> str: ...
def version(self) -> XMODEL_VERSIONS: ...
def version(self) -> XMODEL_VERSION: ...
def angles(self) -> List[float]: ...
def origin(self) -> List[float]: ...
def scale(self) -> List[float]: ...
def materials(self) -> List[LoadedMaterial]: ...
def materials(self) -> Dict[str, LoadedMaterial]: ...
def surfaces(self) -> List[LoadedSurface]: ...
def bones(self) -> List[LoadedBone]: ...

class LoadedMaterial:
def name(self) -> str: ...
def version(self) -> XMODEL_VERSIONS: ...
def version(self) -> XMODEL_VERSION: ...
def textures(self) -> List[LoadedTexture]: ...

class LoadedTexture:
def name(self) -> str: ...
def texture_type(self) -> str: ...
def texture_type(self) -> TEXTURE_TYPE: ...
def width(self) -> int: ...
def height(self) -> int: ...
def data(self) -> List[float]: ...
Expand Down
Loading

0 comments on commit 4eff6a3

Please sign in to comment.