Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source1: Importing a texture (Source2Import) #240

Open
RusJJ opened this issue Nov 8, 2023 · 3 comments
Open

Source1: Importing a texture (Source2Import) #240

RusJJ opened this issue Nov 8, 2023 · 3 comments

Comments

@RusJJ
Copy link

RusJJ commented Nov 8, 2023

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
Copy link
Author

RusJJ commented Nov 8, 2023

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 ]"

}

@RusJJ RusJJ changed the title Source1: Importing a texture with missing VTF (Source2Import) Source1: Importing a texture (Source2Import) Nov 8, 2023
@REDxEYE
Copy link
Owner

REDxEYE commented Nov 8, 2023

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

@RusJJ
Copy link
Author

RusJJ commented Nov 8, 2023

// 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants