Animated-Java / animated-java

A Blockbench plugin that makes complex animation a breeze in Minecraft: Java Edition.
Other
156 stars 25 forks source link

[FR] Smart Duplicate Model Exporting #224

Open YeahBoi321 opened 1 month ago

YeahBoi321 commented 1 month ago

Is your feature request related to a problem? Please describe. When there are multiple groups are duplicates of each other, with the same cubes with the same relative position and rotation, which also have the same texture and UV mappings too, AJ will export two duplicate models.

Describe the solution you'd like AJ could store data regarding groups when exporting, such as how many cubes are in a group and the total volume, and if two groups have the same number of cubes and the same volume, AJ could see if the previously exported model that has the matching cube amount and volume is a duplicate of the model it's trying to save now, and if it is, just reference the already saved model in the custommodeldata in the AJ rig, and don't export the duplicate model.

Describe alternatives you've considered I have manually deleted models and modified the overrides in the main item model to refer to one model instead of different models that have the same data, because the models were large enough as-is (for minecraft models), and I wanted to remove as much bloat as possible from the resourcepack to ensure I had space for more stuff in the future.

SnaveSutit commented 1 month ago

Because of how display entity transforms and Minecraft models work, I can only deduplicate models where the bone's pivot is in the same location, and the elements are exactly the same between all copies, e.g. with identical to and from values, rotation, rotation origin, and textures.

I'm curious why you have multiple large models with these characteristics?