lasa01 / Plumber

A Blender addon for importing Source 1 engine maps, models, materials and textures. This addon makes it possible to import full CS:GO, TF2, CS:S or other Source 1 game maps into Blender.
MIT License
395 stars 29 forks source link

Importing CSGO maps get stuck when importing models #88

Closed nonunknown closed 3 years ago

nonunknown commented 3 years ago

Describe the bug I'm loading a csgo's map called de_overpass (tried with de_inferno too) and both get stuck at step 3/12 whem importing models.

image

To Reproduce Steps to reproduce the behavior: same as this vid tut: https://www.youtube.com/watch?v=G1_tGNeAo74

Expected behavior Import the map and see everything of it.

Related files https://drive.google.com/file/d/1vPGOTO46RWU5Wl4eBOzxDmG6khffpEyf/view?usp=sharing

Details (please complete the following information): CSGO Manjaro Linux Gnome Addon version 0.6.4

Log

[3/12] Importing 313 models (reusing 0 existing)...
[VERBOSE] Loading all models...
[VERBOSE] Importing model models/props/de_overpass/overpass_railing_sign...

^CPython: Traceback (most recent call last):
  File "/home/nonunknown/.config/blender/2.93/scripts/addons/io_import_vmf/__init__.py", line 748, in execute
    importer.load(self.filepath, context, self.map_data_path)
  File "/home/nonunknown/.config/blender/2.93/scripts/addons/io_import_vmf/import_vmf.py", line 162, in load
    self._qc_importer.load_all()
  File "/home/nonunknown/.config/blender/2.93/scripts/addons/io_import_vmf/import_qc.py", line 246, in load_all
    self._load(name, staged)
  File "/home/nonunknown/.config/blender/2.93/scripts/addons/io_import_vmf/import_qc.py", line 327, in _load
    result = subprocess.run(
  File "/usr/lib/python3.9/subprocess.py", line 507, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "/usr/lib/python3.9/subprocess.py", line 1121, in communicate
    stdout = self.stdout.read()
KeyboardInterrupt

location: <unknown location>:-1

Aditional Context

Since is related to models, and I'm under linux, I think the problem is related to importqc.py since I saw you use a version of crowbar for windows, just want to mention that I have crowbar on my manjaro and it works fine with wine. so this is just a kick into the air.

nonunknown commented 3 years ago

OK I tried for a little time here, and Got the plugin's Crowbar working by typing the command this following way:

image

lasa01 commented 3 years ago

Duplicate of #67. Seems that some models cause freezes on Linux (as part of .vmf or .agr import), but other things should work. I will add a mention of this in the readme. Could you try manually importing the model that freezes the import progress using the enhanced mdl importer to see if the model causes the freeze?

nonunknown commented 3 years ago

I've made tests, and it freezes for everyone, but using the Crowbar manually works fine!

lasa01 commented 3 years ago

Does it freeze if you use the bundled CrowbarCommandLineDecomp with the -o flag: wine CrowbarCommandLineDecomp.exe -p "./test.mdl" -o "./test_out"

nonunknown commented 3 years ago

works fine ! image

lasa01 commented 3 years ago

Have you tried specifically with the model that causes the freeze (overpass_railing_sign)? You would need to manually extract it, or alternatively specify a cache path in the preference, which makes the addon extract the .mdl there (that should happen before it freezes).

nonunknown commented 3 years ago

this test.mdl is it, I noticed something, everytime blender freezes when decompiling the model, if I press CTRL-C to interrupt, it shows the last decompiled model in blender, so I'm thinking maybe its freezing after the decompilation!

I was thinking in a solution, maybe calling a .sh to run all necessary decompilation? and then it returns to python if it was successful?

nonunknown commented 3 years ago

@lasa01 did you hear of this one? maybe its possible to compile it for linux too: https://github.com/UltraTechX/Crowbar-Command-Line

lasa01 commented 3 years ago

Yes, that's the one the addon is using. I haven't tried compiling for Linux, but it would probably require a lot of changes in the code. While that version is cli-only, I think all the original Crowbar code is still there, just unused.

The python code shouldn't have anything that would cause it to freeze, maybe the model it shows is the previous successfully imported model. You could check if there is a wine process still running when Blender freezes, if there is it's probably wine that is freezing. In that case you could also see what happens if you kill the wine process.

nonunknown commented 3 years ago

What if I try to build for linux and give you the bin?

lasa01 commented 3 years ago

Sure, if you succeed I'd also appreciate instructions about what you had to do.

nonunknown commented 3 years ago

@lasa01 FINALLY!!!

I've converted Crowbar's Decompilation to C# and its working, please test it and contact me, then you can please update your plugin? I really need it!!!

https://github.com/nonunknown/crowbarx

lasa01 commented 3 years ago

Tested it quickly and it seems to work, thanks. Published a new Linux release.