kainotoa/cp77research

Import Multiple GLTF's At Once & Ignore Existing Materials

Closed this issue · 2 comments

Some QOL Additions & Potential Fixes

  1. Allow for importing multiple GLTF's at once, while still putting each meshes's submesh's within the correct collection.

  1. Ignore compiling materials & shaders which already have an existing one in the blend file (based on name).
    • Fixed in my fork.

  1. Decal_normals mesh_decal_parallax are not implemented within the addon.
    • Fixed in my fork.

IE: z_decals_entropy_devices

{
      "Name": "z_decals_entropy_devices",
      "BaseMaterial": "base\\surfaces\\masks\\decal_normals\\entropy\\entropy_devices_01.mi",
      "MaterialTemplate": "base\\materials\\mesh_decal_parallax.mt",
      "Data": {
        "DiffuseTexture": "base\\surfaces\\masks\\decal_normals\\entropy\\entropy_devices_01_ao_d.xbm",
        "DiffuseColor": {
          "Red": 255,
          "Green": 255,
          "Blue": 255,
          "Alpha": 255
        },
        "UVScaleX": 1.0,
        "UVScaleY": 1.0,
        "SecondaryMask": "engine\\textures\\editor\\white.xbm",
        "NormalTexture": "base\\surfaces\\masks\\decal_normals\\entropy\\entropy_devices_01_n.xbm",
        "NormalAlphaTex": "engine\\textures\\editor\\white.xbm",
        "RoughnessTexture": "engine\\textures\\editor\\white.xbm",
        "MetalnessTexture": "engine\\textures\\editor\\black.xbm",
        "AnimationSpeed": 1.0,
        "AnimationFramesWidth": 1.0,
        "AnimationFramesHeight": 1.0,
        "DepthThreshold": 0.5,
        "HeightTexture": "base\\surfaces\\masks\\decal_normals\\entropy\\entropy_devices_01_h.xbm",
        "NormalAlpha": 0.75,
        "NormalsBlendingMode": 1.0,
        "HeightStrength": 0.5,
        "DiffuseAlpha": 2.0,
        "UseNormalAlphaTex": 1.0
      }
},

I went ahead and started adding support for normal decals, a couple misc bug fixes, as well as some personal QOL changes. I don't feel they are pull request worthy as they are specific to my use case, however might be a good jumping off point for additional features and adjustments.

These are some very scuffed solutions, and I'm not a python user what so ever, so consider that if ever wanting to take from my fork.

  • Added mesh_decal_parallax Support
  • Fixed materials re-generating if one by the same name already exists in the blend file.

Following Commits: b9a6741 65e6b4c f1d94ad

Pushed a pull request with the requested features, as well as some general improvements and UX changes.

Zendrex:rework