kristiker / source1import

Import Source game content into Source 2
MIT License
68 stars 11 forks source link

Fails if vmt has russian comments #61

Open CokeB3ar opened 1 year ago

CokeB3ar commented 1 year ago

if a vmt contains comments in russian, or possibly any other non latin character, it fails

kristiker commented 1 year ago

Post one of the vmt contents here if you can

CokeB3ar commented 1 year ago

"FurSimple" { "$pixelMode" 1 // ñ÷èòàòü âûñîòó è ïð. ïîïèñêåëüíî

// òåêñòóðû öâåòà
"$basetexture" "models/characters/cat/cat_01"

// òåêñòóðà ãóñòîòû ìåõà è êîëè÷åñòâî åå ïîâòîðåíèé
"$noiseTexture" "models/Weapons/Wolwerine/badger_fur_noise.vtf"
"$noiseScale"   12

// òåêñòóðà äëèíû ìåõà è ìàêñèìàëüíàÿ äëèíà
"$lengthTexture" "models/characters/cat/cat_Fur_Lenght"  
"$lengthScale"   0.8

// "$uvOffsetTexture" "models/Weapons/Wolwerine/badger_fur_uvoffset" // "$uvOffsetScale" 0.1 // "$uvOffsetMode" 1

"$numShells" 12        // êîëè÷åñòâî ñëîåâ (ïåðâûé ñëîé ðèñóåòñÿ áåç àëüôû) 

"$startColor" "[1 1 1 1]"          // àëüôà íèæíåãî ñëîÿ
"$endColor"   "[1 1 0.8 0.2]"        // àëüôà âåðõíåãî ñëîÿ
"$alphaTestGt" 0.1     // ïèêñåëè ñ ìåíüøåé aëüôîé îòáðàñûâàþòñÿ

"$noÑull" 1            // ðèñîâàòü äâóñòîðîííèì
"$writeZ" 1            // z-write ñëîåâ (z-test âñåãäà âêëþ÷åí)

"$lightScale" 0.8

}

base "materials/models/burned_flesh.vmt"

byteframe commented 9 months ago

I convert bad VMT's like these to UTF-8 and that seems to allow the script to process it.