Jump to content

KSPBlender - Blender Addon for importing .craft files (now with complete mod support!)


Dasoccerguy

Recommended Posts

On 5/4/2016 at 11:10 AM, ckirky said:

err.. it calls up when i import a save ship that i dont have the part (missing part)

this also happens fors stock

help?

Yea I have the same problem but have not got a response.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
On 20/07/2016 at 1:08 PM, DanialADH said:

this mod still working ?

It's a Plug-in for Blender.. not a mod!

Very useful to do Pictures and Animations, out of the game.

Like this:

 

 

Edited by MKellerBR
Link to comment
Share on other sites

Did you try renaming the io_kspblender folder to the same as mine? io_object_mu?

I don't know if is this, i just know what i see what is different from mine, and that here it works.

So, try to have exact the same way may result positively!

Edited by Climberfx
Link to comment
Share on other sites

  • 1 month later...

I didn't see that anybody had solved the issue with importing .craft files into Blender on a Mac (due to some unicode jankiness), but I've made some progress.

What's currently working for me is the following:

At the top of part_dict.py, add:

import codecs

Then, on the (new) line 87, change:

f=open(os.path.join(path,cfg))

to:

f=codecs.open(os.path.join(path,cfg),"r","utf-8")

With that little change, I suddenly have my (poorly-designed) spacecraft imported into Blender! Now to learn Blender, and all its strange conventions...

Link to comment
Share on other sites

  • 2 weeks later...
On 9/1/2016 at 7:38 AM, ccarlson said:

I didn't see that anybody had solved the issue with importing .craft files into Blender on a Mac (due to some unicode jankiness), but I've made some progress.

What's currently working for me is the following:

At the top of part_dict.py, add:


import codecs

Then, on the (new) line 87, change:


f=open(os.path.join(path,cfg))

to:


f=codecs.open(os.path.join(path,cfg),"r","utf-8")

With that little change, I suddenly have my (poorly-designed) spacecraft imported into Blender! Now to learn Blender, and all its strange conventions...

Cool!  I was hoping this would work on Windows, too, but I tried and it didn't.  On that platform, looks like I'll have to stick with changing from UTF-8 to latin-1 encoding to resolve.

Link to comment
Share on other sites

  • 2 weeks later...

Any chance to dump the colliders into a separate layer instead of deleting them?

 

Rationale: Ubiozur's Welding on steroids. Use KSP's editor for preliminary construction of your 'stockalike part', save it as a .craft, import into Blender, clean up manually (removing hidden geometry, smoothing out joints, applying modifications you like, reusing, editing and joining textures) and export into unity to add functionality, KSP shaders, and create an awesome part.

Culling all the redundant colliders would be an important part of the work, and likely easier than creating them from scratch.

Link to comment
Share on other sites

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

I'm unable to import anything, keep getting a traceback error:

65ff339d59.png

I get this same error on multiple machines.
I'm using KSP version 1.2, Blender version 2.78, the latest commit to the github for this (aa2fd41 added on Oct 4, 2015) and the latest commit to github for the mu importer (d262f4d added on Oct 19, 2016).
I have tested the mu importer successfully and found it to be working flawlessly.
I've tried applying the UTF-8 to Latin-1 fix with no success.

Link to comment
Share on other sites

15 minutes ago, NightReaper said:

I'm not sure, where would I go looking for that, and how would I find it? This sounds a little more complex than the level of technicality I'm usually able to handle, but I'll give it a go.

Search the text contents .craft file you're trying to import.

My guess is that "ValueError: could not convert string to float '.0.0'" (can't tell if those are commas or periods) means there is a field somewhere which the importer is expecting to be numeric but has an extra decimal or whatever.  Can KSP open the craft OK?

Link to comment
Share on other sites

2 hours ago, Fwiffo said:

Search the text contents .craft file you're trying to import.

My guess is that "ValueError: could not convert string to float '.0.0'" (can't tell if those are commas or periods) means there is a field somewhere which the importer is expecting to be numeric but has an extra decimal or whatever.  Can KSP open the craft OK?

Seems to be multiple instances of   ".0.0", ",0.0" and ",0,0" in all the craft files, I should have said this is with any and all craft files, including stock craft, craft made with stock parts, and craft made with modded parts. While doing further testing of the mu importer, I did find one issue with a modded part (the science bay module from the USI Malamute Rover pack), but the error that gives does not show up with the traceback error when trying to import a craft that has the part.

Edited by NightReaper
Link to comment
Share on other sites

i'm also getting the error where the line.split() in part_dict is not getting a proper position, and so it tries to convert the string "to" to a float for pos(x). this happens for every craft i try to import, even stock craft. so something has changed about kerbals part structure that this plugin doesn't account for. it seems like it should be a really simple fix, just finding the correct line where position actually is, but i don't know how to look at print statements from the python script to see what it sees.

the mu importer works fine, and i've imported a few parts to test. it's just the craft reader importer that's not up to date.

Edited by tychodin
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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