Jump to content

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


Recommended Posts

4 minutes ago, linuxgurugamer said:

in the settings

Ah, thanks, I didn't even notice the inputs under the addon in the list in Blender.

Though I now have this error after a couple of seconds of loading :

Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_object_mu\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_object_mu\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_object_mu\import_craft\import_craft.py", line 60, in import_craft
    part = gamedata.parts[pname].get_model()
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_object_mu\import_craft\part.py", line 64, in get_model
    self.cfg, loaded_parts_collection())
  File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\addons\io_object_mu\model\model.py", line 49, in compile_model
    obj = mdl.instantiate(f"{name}:submodel", position, rotation, scale)
AttributeError: 'NoneType' object has no attribute 'instantiate'

location: <unknown location>:-1

 

Link to comment
Share on other sites

I'm Having a similar issue with importing .craft files. I am able to import .mu files perfectly fine but when I'm trying with a .craft, It always displays a python error:

Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 44, in import_craft
    gamedata = GameData(Preferences().GameData)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 146, in __init__
    self.create_db()
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 129, in create_db
    recurse_tree(self.root, self.build_db)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 29, in recurse_tree
    files = os.listdir(path)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''

location: <unknown location>:-1

 

Link to comment
Share on other sites

Hm, for some reason I get another error log.
I'm now on Blender 2.83 which is the version the addon was made for and I'm trying to open a non-modded aircraft.

bpy.ops.import_object.ksp_craft(filepath="C:\\Program Files (x86)\\Steam\\steamapps\\common\\Kerbal Space Program\\saves\\par défaut\\Ships\\VAB\\test.craft")


Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\import_craft\import_craft.py", line 44, in import_craft
    gamedata = GameData(Preferences().GameData)
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\import_craft\gamedata.py", line 140, in __init__
    self.models = Model.Preloaded()
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\model\model.py", line 95, in Preloaded
    preloaded[url] = Model(None, url)
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\model\model.py", line 106, in __init__
    obj, mu = import_mu(model, path, False, False)
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\import_mu\import_mu.py", line 199, in import_mu
    if not mu.read(filepath):
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons\io_object_mu\mu.py", line 1181, in read
    self.file = open(filepath, "rb")
TypeError: expected str, bytes or os.PathLike object, not NoneType

location: <unknown location>:-1

Thanks in advance for your help.

Link to comment
Share on other sites

On 3/10/2021 at 2:51 AM, Hugo737 said:

Looks like what I had at first, make sure you put the game directory here :

capture_blender_ksp1.png

I have done that but after a couple seconds of loading, I get this message: 
 

Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 60, in import_craft
    part = gamedata.parts[pname].get_model()
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\import_craft\part.py", line 64, in get_model
    self.cfg, loaded_parts_collection())
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_object_mu-master\model\model.py", line 49, in compile_model
    obj = mdl.instantiate(f"{name}:submodel", position, rotation, scale)
AttributeError: 'NoneType' object has no attribute 'instantiate'

location: <unknown location>:-1

 

Link to comment
Share on other sites

  • 5 weeks later...
  • 2 weeks later...
  • 3 weeks later...
  • 2 weeks later...

Привет, ребята! После экспорта моя модель выглядит так, а сама игра не отображается, что делать? 3389a34f3d48751101e905faaa9f3134-full.pndb1f2f70f33354e5d08e153e5e2809e9-full.pn

Quote

Hi guys! After exporting, my model looks like this, but the game itself is not displayed, what should I do? 

 

Edited by Vanamonde
Please post in English when not using the International subforums.
Link to comment
Share on other sites

  • 2 weeks later...

I installed Blender 2.93 and followed your instructions.

But this happens when I try to activate it. Any thoughts?

I don't know where to find the earlier blender builds.

QqzvAs0.png

Link to comment
Share on other sites

having the same issue in 2.93. Never used this plug in before and its my first time using blender for modeling (used ot use 3dmax) so I was a bit confused.  Now that I see more people having the same problem at least I know it wasnt my fault :P

Spoiler

error-blender.png

 

Edited by SiCaRiO31
Link to comment
Share on other sites

Moved from another thread, instead of derailing that one :P
 

2 hours ago, ColdJ said:

I just download your BforArtist2 @Stone Blue do I pop the .mu addon in in the same way or do you already support them?

I just drop the whole /io_object_mu_master folder in here: C:\Program Files\Bforartists 2\2.7.0\2.93\scripts\addons_contrib, then go into the User Prefs in BFA, select the AddOn item, then clic the "Testing" button, find & activate it... mae sure to set your GameData folder & clic "Install the KSP Shader Presets & KSP Config Templtes"

Link to comment
Share on other sites

vL12dtS.png

12 hours ago, Stone Blue said:

Moved from another thread, instead of derailing that one :P
 

I just drop the whole /io_object_mu_master folder in here: C:\Program Files\Bforartists 2\2.7.0\2.93\scripts\addons_contrib, then go into the User Prefs in BFA, select the AddOn item, then clic the "Testing" button, find & activate it... mae sure to set your GameData folder & clic "Install the KSP Shader Presets & KSP Config Templtes"

Still stumped. I followed your instructions. It is installed It can find the folder and the *.cfg files, I turned on everything  in the .mu set up but it won't bring up *.mu files. This is all brand new to me and there are a lot of options and settings I have no idea about. It flags a number of the things in the KSP mu addon as not even being alpha. Help Obi One Kenobi, you are my only hope. Well it can find it but as seen above it can't use it. Maybe I should go to your version 1 and the 2.79 version of the mu plugin?

Edited by ColdJ
Link to comment
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...