REDxEYE / SourceIO

SourceIO is an Blender(3.4+) addon for importing source engine textures/models/maps
https://discord.gg/XJvhzaXZf3
MIT License
631 stars 57 forks source link

Source1: Importing a texture (Source2Import) #240

Open RusJJ opened 1 year ago

RusJJ commented 1 year ago
Traceback (most recent call last):
  File "C:\cs2import\game\cs2import\2\convert_model.py", line 295, in <module>
    vmdl_file = convert_mdl(glob_file, output_folder, GameType(args.game))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\cs2import\game\cs2import\2\convert_model.py", line 237, in convert_mdl
    result, error_message = convert_material(mat, s2_output_path, game)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\cs2import\game\cs2import\2\material_converter.py", line 31, in convert_material
    vmt = VMT(material[2], material[0])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\cs2import\game\cs2import\2\SourceIO\library\source1\vmt\__init__.py", line 21, in __init__
    self.shader, self.data = parser.tree.top()
                             ^^^^^^^^^^^^^^^^^
  File "C:\cs2import\game\cs2import\2\SourceIO\library\utils\kv_parser.py", line 66, in top
    key, value = self.data[0]
                 ~~~~~~~~~^^^
IndexError: list index out of range
RusJJ commented 1 year ago

UPD: No, looks like the problem is not related to a missing VTF texture. VMT:

// envmaptint_fix

"VertexLitGeneric"

{

    "$basetexture" "wood/woodstair002b"

    "$surfaceprop" "wood"

    "%keywords" "c17skyscraper"

    "$bumpmap" "wood/woodstair002b_normal"

    "$envmap" "env_cubemap"

    "$normalmapalphaenvmapmask" 1

    "$envmapcontrast" 1

    "$envmapsaturation" .2

    "$envmaptint" "[ .56 .56 .56 ]"

}
REDxEYE commented 1 year ago

// envmaptint_fix Seems like this string confuses the parser. Will take a look later

RusJJ commented 1 year ago

// envmaptint_fix Seems like this string confuses the parser. Will take a look later

Probably. Compared other materials that are passed now. They dont have comments. Yes, that's the reason