BAT: Blender Asset Tracer ? #54125
Labels
No Label
legacy module
Platforms, Builds, Tests & Devices
legacy project
Blender Asset Tracer
legacy project
Platform: Windows
Priority::Normal
Status::Archived
Status::Confirmed
Status::Needs Triage
Status::Resolved
Type::Design
Type::Report
Type::To Do
No Milestone
No project
No Assignees
11 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-asset-tracer#54125
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We need a replacement for BAM, as it's bloated (webserver, just to name one thing) and written in an overly complex way. In this ticket I propose BAT ?, the Blender Asset Tracer.
Requirements
pathlib.Path
to represent paths, rather than byte strings.setup.py
, no directy executing of Python scripts. Current BAM has a mixture of a top-level Python file, files in subpackages that can be run as CLI when they are executed directly, and__main__.py
files that allowpython -m bam.pack
.py.test
, rather than hand-writing a custom test runner.Features
/shared
.End-user features
maintained or added
removed (until proven necessary)
Added subscribers: @dr.sybren, @fsiddi
Looks good! Just want to mention here that we have a package called
blender-file
https://developer.blender.org/source/blender-file/ that should be probably used for some of the blendfile inspection.This is a clone of what is in BAM at the moment. Ideally BAT? should replace both.
Added subscriber: @dfelinto
Added subscriber: @oweissbarth
Added subscriber: @ArtoKitula
Added subscriber: @ideasman42
Hey, good to see a rewrite that kicks out features that were added speculatively and didn't end up getting used, the feature list is fine but a bit technical and doesn't mention things BAT will drop.
It would be good have a list of features (from user perspective) and anti-features (assume this includes BAM's goals of being an SVN replacement, or being a tool to checkout from a remote server with de-duplication from local data-store).
Would there be the concept of a BAT repository? Would there be the ability to apply overrides? Or is this left up to Python developers to write this using BAT modules?
Good points, I've updated the task details.
Added subscriber: @IsaacWeaver
That's better, note that the statement "We need a replacement for BAM, as it's bloated (webserver, just to name one thing)" is not really true.
BAM was written so the webserver was only needed for the SVN wrapper, and is not needed for pack/remap/listing-deps (all features BAT is keeping).
The web-server dependency can be trivially removed from BAM without impacting any of these sub-commands.
The webserver isn't the only thing that I'll address. The current code of BAM is quite a mess, and it's very hard to figure out what's going on. I'm talking about conditionally defined inner functions with duplicate names, which are even undocumented too. There is a tuple[index] depending on the endianness for every read on a blend file, even though the endianness of that file will not change. It's also the inconsistent ways in which reporting is done throughout the project (logging module, print statements, reporting callback functions, conditionally-defined functions, yielding strings). Cyclomatic complexity of the BAM code is also very high, whereas there is no way to easily measure unit test code coverage due to the non-standard way of doing unit testing.
By the way, I'm not blaming anybody for the current state, I understand it's been written rapidly and during pressure of movie production. The code issues need to be addressed, though, to make sure we can keep the functionality functional.
I was only commenting on your statement about the web-server, other critiques you make - I generally agree with.
I don't think its too valuable to justify details of the decisions made here, but one thing that made the code quite complicated was needing the server to be able communicate with the client while it was archiving blend files (so the client could avoid downloading data it already had locally).
The pressure of movie production was not so much of a factor. We were writing something to replace SVN - we had a list of tasks which we managed to get working, with tests. The fact artists where not working remotely on large repositories meant the primary use case for such a tool wasn't a problem for us, artists were happy using SVN.
Said different, if I was making BAM without it being an SVN replacement, I would rewrite with less strange code too :)
Added subscriber: @JohnRoper
Can this be used to check for missing assets in blend files? I'm looking for a way to check a blend file and look for missing assets (images, etc.) that should have been packed into the blend.
Changed status from 'Open' to: 'Resolved'
@JohnRoper yes it can. If running
bat --help
doesn't help enough, please open a new ticket with more questions ;-)Added subscriber: @DuarteRamos
Added subscriber: @haiku
Removed subscriber: @haiku
Added subscriber: @DimitrisChloupis
Added subscriber: @MarcelLegindi