Animated-Java / animated-java

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

[FR] Move variant-specific node configs to their respective variants #311

Closed Dearliet closed 1 month ago

Dearliet commented 2 months ago

Currently, the default variant model is included within bone nodes as model. The node config for the default variant should similarly be embedded under config.

{
   "nodes": {
      "8032f609-0bad-f7f1-9f9a-bc745ed448b0": {
         "type": "bone", 
         "name": "bone",
         "config": {
            "enchanted": true
         }
      }
   },
   "variants": {
      "9290988e-fd36-3d7d-db90-47de80a81996": {
         "name": "new_variant",
         "config_overrides": {
            "8032f609-0bad-f7f1-9f9a-bc745ed448b0": {
               "glowing": true
            }
         }
      }
   }
}

The default bone configs should define the default display settings for all variants. Other variants can then override these settings as needed. This approach is analogous to how textures are managed, where the default variant establishes the base settings, and other variants apply adjustments through overrides.

For example, in the provided structure, new_variant would have the bone with both enchanted=true (from the default config) and glowing=true (overridden in the variant config).

Dearliet commented 2 months ago

The default bone configs should define the default display settings for all variants. Other variants can then override these settings as needed. This approach is analogous to how textures are managed, where the default variant establishes the base settings, and other variants apply adjustments through overrides.

Actually, this is incorrect. The default variant does not set the base settings for textures; it only has an empty texture swaps map. Likewise, the display configs should be independent for each variant, and the default variant should not act as a base config for others to override. Therefore, config_overrides should be renamed to configs.

SnaveSutit commented 2 months ago

The default variant has an empty texture map because it is a special case. It's the "default" and that's it's entire role. So therefor it will remain the default mode.

Dearliet commented 1 month ago

Closing this because of variant overhaul.