Jump to content

[1.2-1.7] Blender (2.83+) .mu import/export addon


Recommended Posts

That is very odd. I've never seen such before (and I just tested here loading a craft: no problems). However, there are similar errors on the net implying I might be doing something slightly wrong (holding onto blender data too long). This will be a tricky one to track down.

Link to post
Share on other sites

I tried to find a log file in case that would help, but I can't find one anywhere. I have Blender 2.82 installed both regularly and through Steam, and the error happens on both. Do you have anything else I could try to maybe narrow down where the problem is?

Link to post
Share on other sites

Ok, so I had a few dozen addons (a few for textures, most of the rest for architecture modeling), and I thought there might be an issue caused by compatibility or settings files. I backed-up all of my projects and purged everything Blender from my C:\ and D"\ drives. After that, I tried installing Blender 2.80 instead of 2.82, and that time there were errors when I pressed the "Install KSP Shader Presets." I uninstalled 2.80 and installed 2.82 instead. This time, I installed it on my D:\ drive, which is where my KSP is installed. It still gave errors, but they look slightly different than last time.

Spoiler

Traceback (most recent call last):
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 44, in import_craft
    gamedata = GameData(Preferences().GameData)
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 140, in __init__
    self.models = Model.Preloaded()
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\model\model.py", line 93, in Preloaded
    preloaded = Model(None, url)
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\model\model.py", line 104, in __init__
    obj, mu = import_mu(model, path, False, False)
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\import_mu\import_mu.py", line 182, in import_mu
    if not mu.read(filepath):
  File "D:\SteamLibraryWindows\steamapps\common\Blender\2.82\scripts\addons\io_object_mu-master\mu.py", line 1169, in read
    self.file = open(filepath, "rb")
TypeError: expected str, bytes or os.PathLike object, not NoneType

location: <unknown location>:-1

bpy.ops.import_object.ksp_craft(filepath="C:\\Users\\Micro753\\Documents\\Dove.craft")

 

 After that, I tried deleting all of the mods in my GameData folder, just in case one of those were somehow causing the problem, and the error still happens. I'm at a loss on what to try next.

Edited by Micro753
Link to post
Share on other sites
16 hours ago, taniwha said:

I think it's a memory error and thus something I am doing wrong, nothing to do with where you have things installed, though that path error one is even weirder.

It works fine on your computer? How much memory does your computer have? I was trying this on my rendering desktop, which has 64 GB of memory. I'll try to find one of my old gaming laptops and see if it behaves any differently.

I wish I knew coding so I could try to track down the problem myself.

Link to post
Share on other sites
  • 3 weeks later...
12 hours ago, Send help(to Ryan) said:

why is the textures not loading correctly???

like the model would have the textures put on wrongly?

like upside down or fliped...???

Because Blender loads DDS textures "upside down". However, the importer sets up the shaders to compensate for this without messing with the UVs of the model, so it will still display correctly, so unless you intend to edit the model, there's no need to worry about it.

Link to post
Share on other sites
On 4/17/2020 at 3:26 AM, taniwha said:

I think it's a memory error and thus something I am doing wrong, nothing to do with where you have things installed, though that path error one is even weirder.

I am also getting the same "Tracback" path error. Using Blender v 2.80

Link to post
Share on other sites
11 hours ago, -ctn- said:

I am also getting the same "Tracback" path error. Using Blender v 2.80

This is one of the "fun" things with memory errors: they can allow the program to work for some time, and then something subtle changes and the program never works, even with large changes (llke different blender versions).

Anyway, I have seen the error once myself, but have also run into other problems importing (anything needing armatures is flaky).

Link to post
Share on other sites

First time participating in the forums, I have a little problem where I follow all the steps like the gamedata stuff in the addon settings and the community textures and all that, but when I import (my tylo lander in this case, it's pretty neat)

It imports the model, it imports some of the textures, and by the looks of it, I think it somehow imported the normals and the specular textures, but there's no diffuse textures, it's all grey with shading and shinyness.

I did manage to delete the shroud on the wolfhound engine to get the renders looking nice once it has all the textures

edit: blender 2.82, windows 10 if you needed to know.

Spoiler

086f790c12a0489c6f1e2b9102508b2e.png

Edited by KSPplayerperson
version info and all that
Link to post
Share on other sites

Well, I tried with both material preview and rendering, still no luck on getting anything more grey with bumps. It does show the yellow tint on the ends of the RCS nozzles which I think might be the only actual coloured texture it's showing. All the other parts that ingame appear to not use a bumpmap for extra detail are black. Which leads me to believe that it's not showing the diffuse textures.

Spoiler

d0b142fcec20fbdd918acc9a69c51848.png

Material Preview, which I think used to be called lookdev?

1bab66288c14f0b2c9e383b402241776.png

Rendered in Cycles, which chooses to completely ignore the bumpmaps despite them being the only textures on this that eevee chooses to show

c42527fcac69a9d09b2975c5b0237ee3.png

Default viewport for comparison if you were getting that mixed up with the problem I'm having

 

Edited by KSPplayerperson
Link to post
Share on other sites

@KSPplayerperson: Oh, sorry, I didn't recognize what's going on. It's actually a bug in blender: when the mesh has no vertex colors, the vertex color input no a node tree defaults to black. Probably the easiest thing to do is to go through all the materials and disconnect the vertex color node from the maincolor node.

I haven't yet decided how to handle the situation, and you happen to have caught things in between the new shader setup and me figuring out what I want to do with the vertex color issue.

Link to post
Share on other sites

Oh my god, that worked, I can't thank you enough, I'm gonna have a lot of fun rendering with this, since i've figured out deploying the landing gear and deleting certain parts to get it to look like the part of the mission I wanted to render

Spoiler

293a6538cbe8e57c94fb3894135a97a4.png

no parts deleted in this picture but, i've figured that out

 

Link to post
Share on other sites

I have pushed changes today that finally get armature imports working in general. In particular, the rather troublesome BG seismic sensor imports correctly. I do have some models that don't, but that's due to their hierarchy being a little uncooperative, but I'm working on some ideas for fixing that.

Link to post
Share on other sites

Everything worked fine for me but when i tried to insert the .mu file, an error showed up. I noticed that I was in the 2.81 version and reverted back to 2.79. Now I can't even check the box as I get this error :/. Could you please help me? Thanks!Screenshot_2020-05-14_at_17.11.14.png

Link to post
Share on other sites

I thought the addon was working fine when I created community colours, as you do when you make a new file, then imported a new craft, until it threw this error at me and created this "Shield" armature thing?

The craft file has a 10m heatshield if that has anything to do with it

Spoiler

3f90312388342a0b933bfa05e602b3be.png

07069b26064f44690a37765f79ac8ecd.png

No sign of any models being imported, the shield armature is completely invisible or very far from the origin as far as I can tell

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...