kainotoa / cp77research

16 stars 6 forks source link

Import Multiple GLTF's At Once & Ignore Existing Materials #12

Closed Zendrex closed 2 years ago

Zendrex commented 2 years ago

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.


2) Ignore compiling materials & shaders which already have an existing one in the blend file (based on name).


3) Decal_normals mesh_decal_parallax are not implemented within the addon.

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
      }
},
Zendrex commented 2 years ago

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.

Following Commits: b9a6741d76f724f835361265bdc9064771ef6e7b 65e6b4c7b710f4721349aa61c8bd4df95a099061 f1d94ad2a1d0e2fc37e55910ace6c0ed7377ee22

Zendrex commented 2 years ago

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

Zendrex:rework