3drepo / 3drepobouncer

A C++ library providing 3D Repo Scene Graph definition, repository management logic and manipulation logic. It is is essentially the refactored 3DRepoCore and (parts of) 3DRepoGUI
GNU Affero General Public License v3.0
29 stars 13 forks source link

Issue 682 - Decommission AssetBundleCreator #685

Closed sebjf closed 3 months ago

sebjf commented 3 months ago

This fixes 3drepo/3drepobouncer#682

Note: anything imported after this merge will require an updated viewer to see: https://github.com/3drepo/3drepounity/pull/534

Description

This PR removes support for AssetBundleCreator, and the written stash graph, since that is no longer needed with AssetBundleCreator gone.

This PR predominantly deletes decommissioned parts of the project, but also updates the RepoBundles export to write metadata that .io would have picked up from the stash graph, into the assets list document.

Additionally, the types have been cleaned up. SupermeshNode has been introduced as a subclass of MeshNode, and all supermesh specific properties are now members of this. The way these nodes are built throughout the code has been refactored to keep as much implementation detail in the factory methods as possible as well, instead of having classes modify the BSON objects themselves with the BSONBuilder & clone methods.

As part of this, a new class RepoMeshBSONBuilder has been added for internal use by the BSON factory, for building MeshNodes and SupermeshNodes.

These changes are "light touch" however, and only done where trivial. The expectation is that big changes will occur in https://github.com/3drepo/3D-Repo-Product-Team/issues/561, when we know exactly what needs to happen. For example, though the stash graph is no longer written to disk, its types (i.e. based on RepoNodeSet) are still the same, and accessed via RepoScene in the same way.

MultipartOptimizer has been refactored so that it no longer creates stash material nodes. This is because since the stash graph is no longer written, there is no longer a need for this indirection. When exporting both textures and materials are now accessed directly from the Default graph.

The MeshMapReorganizer has been given a set of unit tests, and an outstanding bug fixed. After fixing the bug, the RepoBundles exporter has updated how it builds the mappings, and a check in the RepoBundles unit tests has been re-enabled.

Finally, the RepoBundleExport unit tests have been revised so that they no longer rely on the stash graph.

Specifically, this PR:

  1. Deletes the bouncer wrapper project & its unit tests
  2. Deletes AssetModelExport
  3. Deletes insertBinaryFileToDatabase
  4. Updates the logic of SceneManager so that it no longer writes the stash graph or Unity AssetBundles.
  5. Removes the ability to write the stash graph to the database, and deletes the CommitStash test
  6. Turns RepoUnityAssets into RepoAssets, and updates the schema to include metadata that would previously have been extracted from the stash graph on-demand.
  7. Introduces the RepoBSONMeshBuilder object for use by the BSON factory & reduces the direct use of BSON builder objects in the code in favour of factory methods
  8. Moves some utilities created for the MultipartOptimizer unit tests into a common resource for also testing MeshMapReorganizer
  9. Added unit tests for MeshMapReorganizer
  10. Fixed https://github.com/3drepo/3drepobouncer/issues/678 & updated the RepoBundle exporter mappings logic accordingly
  11. Adds appendVector3d method to write a Vector3D as an object instead of an array
  12. Updates bouncer_worker to remove all references to the Unity Queue

Note, some of these changes are in https://github.com/3drepo/AssetGenerator/issues/3, which must be merged when this PR is.

This issue/PR also addresses:

https://github.com/3drepo/3drepobouncer/issues/678 https://github.com/3drepo/3drepobouncer/issues/683

carmenfan commented 3 months ago

@sebjf another thing that's missing here (not sure if you're planning to make it a separate ticket)

We need to change the bouncerworker so it doens't plonk the task into unityq after completing the work

sebjf commented 3 months ago

@sebjf another thing that's missing here (not sure if you're planning to make it a separate ticket)

We need to change the bouncerworker so it doens't plonk the task into unityq after completing the work

Hi @carmenfan, done!

sebjf commented 3 months ago

@carmenfan, ready for another look!