Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6eee0f502b | ||
|
|
79c8589bfc | ||
|
|
899f361fcf |
@ -3,7 +3,7 @@
|
|||||||
This file logs the changes that are actually interesting to users (new features,
|
This file logs the changes that are actually interesting to users (new features,
|
||||||
changed functionality, fixed bugs).
|
changed functionality, fixed bugs).
|
||||||
|
|
||||||
# Version 1.20 (in development)
|
# Version 1.20 (2025-07-11)
|
||||||
|
|
||||||
- Add support for Blender 5.0 compositor node trees ([16c208bc8e13](https://projects.blender.org/blender/blender-asset-tracer/commit/16c208bc8e130c8b1233bdb411ecabdab19af3c5)).
|
- Add support for Blender 5.0 compositor node trees ([16c208bc8e13](https://projects.blender.org/blender/blender-asset-tracer/commit/16c208bc8e130c8b1233bdb411ecabdab19af3c5)).
|
||||||
- Make it possible to run BAT with `python -m blender_asset_tracer` ([6c42d06f0590](https://projects.blender.org/blender/blender-asset-tracer/commit/6c42d06f05909d4ac2096e84557d19dd93382f3a)).
|
- Make it possible to run BAT with `python -m blender_asset_tracer` ([6c42d06f0590](https://projects.blender.org/blender/blender-asset-tracer/commit/6c42d06f05909d4ac2096e84557d19dd93382f3a)).
|
||||||
|
|||||||
@ -75,6 +75,7 @@ Mypy likes to see the return type of `__init__` methods explicitly declared as `
|
|||||||
BAT can be used as a Python library to inspect the contents of blend files, without having to
|
BAT can be used as a Python library to inspect the contents of blend files, without having to
|
||||||
open Blender itself. Here is an example showing how to determine the render engine used:
|
open Blender itself. Here is an example showing how to determine the render engine used:
|
||||||
|
|
||||||
|
```python
|
||||||
#!/usr/bin/env python3.7
|
#!/usr/bin/env python3.7
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
@ -118,6 +119,7 @@ open Blender itself. Here is an example showing how to determine the render engi
|
|||||||
|
|
||||||
json.dump(render_info, sys.stdout, indent=4, sort_keys=True)
|
json.dump(render_info, sys.stdout, indent=4, sort_keys=True)
|
||||||
print()
|
print()
|
||||||
|
```
|
||||||
|
|
||||||
To understand the naming of the properties, look at Blender's `DNA_xxxx.h` files with struct
|
To understand the naming of the properties, look at Blender's `DNA_xxxx.h` files with struct
|
||||||
definitions. It is those names that are accessed via `blender_asset_tracer.blendfile`. The
|
definitions. It is those names that are accessed via `blender_asset_tracer.blendfile`. The
|
||||||
@ -171,6 +173,6 @@ index-servers =
|
|||||||
pip install twine
|
pip install twine
|
||||||
|
|
||||||
poetry build
|
poetry build
|
||||||
poetry run twine check dist/blender_asset_tracer-1.19.tar.gz dist/blender_asset_tracer-1.19-*.whl
|
poetry run twine check dist/blender_asset_tracer-1.20.tar.gz dist/blender_asset_tracer-1.20-*.whl
|
||||||
poetry run twine upload -r bat dist/blender_asset_tracer-1.19.tar.gz dist/blender_asset_tracer-1.19-*.whl
|
poetry run twine upload -r bat dist/blender_asset_tracer-1.20.tar.gz dist/blender_asset_tracer-1.20-*.whl
|
||||||
```
|
```
|
||||||
|
|||||||
@ -20,4 +20,4 @@
|
|||||||
|
|
||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
|
|
||||||
__version__ = "1.19"
|
__version__ = "1.20"
|
||||||
|
|||||||
@ -447,6 +447,12 @@ class BlendFileBlock:
|
|||||||
old_structure = struct.Struct(b"4sI")
|
old_structure = struct.Struct(b"4sI")
|
||||||
"""old blend files ENDB block structure"""
|
"""old blend files ENDB block structure"""
|
||||||
|
|
||||||
|
# Explicitly annotate to avoid `Any` from `.unpack()`.
|
||||||
|
size: int
|
||||||
|
addr_old: int
|
||||||
|
sdna_index: int
|
||||||
|
count: int
|
||||||
|
|
||||||
def __init__(self, bfile: BlendFile) -> None:
|
def __init__(self, bfile: BlendFile) -> None:
|
||||||
self.bfile = bfile
|
self.bfile = bfile
|
||||||
|
|
||||||
|
|||||||
@ -204,17 +204,17 @@ class EndianIO:
|
|||||||
return fileobj.write(to_write)
|
return fileobj.write(to_write)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def read_bytes0(cls, fileobj, length):
|
def read_bytes0(cls, fileobj: typing.IO[bytes], length: int) -> bytes:
|
||||||
data = fileobj.read(length)
|
data = fileobj.read(length)
|
||||||
return cls.read_data0(data)
|
return cls.read_data0(data)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def read_data0_offset(cls, data, offset):
|
def read_data0_offset(cls, data: bytes, offset: int) -> bytes:
|
||||||
add = data.find(b"\0", offset) - offset
|
add = data.find(b"\0", offset) - offset
|
||||||
return data[offset : offset + add]
|
return data[offset : offset + add]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def read_data0(cls, data):
|
def read_data0(cls, data: bytes) -> bytes:
|
||||||
add = data.find(b"\0")
|
add = data.find(b"\0")
|
||||||
if add < 0:
|
if add < 0:
|
||||||
return data
|
return data
|
||||||
|
|||||||
@ -24,9 +24,9 @@ copyright = '2018, Sybren A. Stüvel'
|
|||||||
author = 'Sybren A. Stüvel'
|
author = 'Sybren A. Stüvel'
|
||||||
|
|
||||||
# The short X.Y version
|
# The short X.Y version
|
||||||
version = '1.19'
|
version = '1.20'
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = '1.19'
|
release = '1.20'
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "blender-asset-tracer"
|
name = "blender-asset-tracer"
|
||||||
version = "1.19"
|
version = "1.20"
|
||||||
homepage = 'https://developer.blender.org/project/profile/79/'
|
homepage = 'https://developer.blender.org/project/profile/79/'
|
||||||
|
|
||||||
description = "BAT parses Blend files and produces dependency information. After installation run `bat --help`"
|
description = "BAT parses Blend files and produces dependency information. After installation run `bat --help`"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user