taniwha

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

Recommended Posts

1 hour ago, bitwaster said:

i configured the gamedata path to /Applications/KSP_osx

The path needs to include GameData, not just the KSP root.

Share this post


Link to post
Share on other sites

thank you! that totally worked! 

now, when i import into blender, i can't seem to individually select any parts (like i want to delete the parachutes). is this expected? (or, more likely, i'm doing something wrong and need help, please!)

Edited by bitwaster

Share this post


Link to post
Share on other sites
9 hours ago, taniwha said:

@RedPandaz: make sure you're using the correct branch for your blender: master for 2.80 (recent build) or lbender2.79 for 2.79. Beyond that, I will need to see what errors you are getting.

@Gapone: "clone the repository" is how you download the code using git or a graphical git client. It makes a local copy of the repository (in this case, the directory structure on github) including all revision history. Once you've cloned a repository, updating is done by pulling from the repository.

Either way, you will need to click on the big green "clone or download" button, which gives a git command line to clone, or you can download the zip using the provided link. cloning is better because of the ease of updating, but you do need git.

Beware that if you use blender 2.79, you will need to first select the blender2.79 branch before downloading the zip (if cloning, you can use git to switch between branches easily).

can I DM you the error messages?

 

Share this post


Link to post
Share on other sites

@RedPandaz yes, but here is better if you can because then others can see the problem and (hopefully) the answer.

@bitwaster: This is by design as it allows for easy manipulation of whole craft. However, it is still possible to edit the craft even down to individual meshes...

  • In blender's outliner (upper right corner panel in the default layout), select "Scenes" in the second dropdown (defaults to View Layers, looks a little like a pile of photos), just to the left of the search box.
  • Click on the mu_utils scene to switch to it, and also open it by clicking its triangle.
  • In there, you will find Scene Collection: open it.
  • Under that, there is craft_collection, which is where the assembled craft is stored (in its own collection under craft_collection).  You will have to enable display and selection for the collection.
  • You will also find loaded_parts which stores assembled parts (some parts are built from multiple models) and loaded_models (the actual models as loaded from .mu files).

Yeah, this does seem involved, but it's all about keeping the stuff organized in blender.

BTW, when working with individual .mu files (importing or creating), you may also find a collider_gizmos collection in mu_utils. This is for the gizmos used to display primitive collider types (sphere, capsule, box and wheel).

Share this post


Link to post
Share on other sites

I have just pushed a fix for working with ModuleManager.ConfigCache created by MM 4.

Share this post


Link to post
Share on other sites

@RedPandaz You are trying to use the blender 2.80 version of the addon (master branch) with blender 2.79. Either switch to blender 2.80, or first select the blender2.79 branch (far left of the line with the green "clone or download" button) before downloading the zip

Share this post


Link to post
Share on other sites
10 hours ago, taniwha said:

@RedPandaz You are trying to use the blender 2.80 version of the addon (master branch) with blender 2.79. Either switch to blender 2.80, or first select the blender2.79 branch (far left of the line with the green "clone or download" button) before downloading the zip

I just downloaded the one the Blender site showed me >_<

 

Share this post


Link to post
Share on other sites

2.80 is still beta, so no surprise there. The problem is that the default branch is for 2.80 and those who aren't accustomed to using github can get themselves into a bit of a mess.

Share this post


Link to post
Share on other sites
1 hour ago, taniwha said:

2.80 is still beta, so no surprise there. The problem is that the default branch is for 2.80 and those who aren't accustomed to using github can get themselves into a bit of a mess.

Well now it's not even showing up as an option in user preferences

Share this post


Link to post
Share on other sites

@RedPandaz yeah, this is because the directory name has a period in it. Just rename the directory to not have a period and it should work.

Share this post


Link to post
Share on other sites
2 hours ago, taniwha said:

@RedPandaz yeah, this is because the directory name has a period in it. Just rename the directory to not have a period and it should work.

Which directory?

Share this post


Link to post
Share on other sites
On 2/23/2019 at 8:41 PM, taniwha said:

@RedPandaz yeah, this is because the directory name has a period in it. Just rename the directory to not have a period and it should work.

Which directory

Share this post


Link to post
Share on other sites

@RedPandaz: the io_object_mu-blender2.79 directory. Best is just io_object_mu (that's how it is for me).

Share this post


Link to post
Share on other sites
1 hour ago, taniwha said:

@RedPandaz: the io_object_mu-blender2.79 directory. Best is just io_object_mu (that's how it is for me).

I changed it to that and it's still not showing up

Share this post


Link to post
Share on other sites

The whole addon doesn´t work for me in the newest 2.80 version, It´s there, but import as well as adding a collider for .mu files doesn´t work. Using an older 2.80 version didn´t work as well. 

Sorry I don´t have the errors on hand right now.

found it
unknown.png?width=962&height=280

 

Share this post


Link to post
Share on other sites

@HB Stratos: that error is for importing craft files (whole ships), not individual models. I've seen that particular error before, but I don't remember the cause off-hand. For now, ensure that the GameData path in the addon settings panel is correct (needs to point to GameData, not just your KSP directory).

If you're trying to import a module, use the import KSP Mu entry, not KSP Craft.

As for adding a collider to mu files, you will need to be more specific.

Share this post


Link to post
Share on other sites

I'm getting this error when I try to import a .craft file:

N9MEGyo.png

For some crafts nothing appears, for others small random(?) objects appear:

N2kmWT3.png

.mu files give a similar error, but seem to import properly.

Share this post


Link to post
Share on other sites

ok, I've pushed a fix for the cursor location issue

Share this post


Link to post
Share on other sites

@[object Object]: The .stl exporter needs to understand blender's collection/group instances. The craft you see after importing is an instance of a collection of assembled parts, and the parts are instances of model collections (usually just the one model in the collection, but some parts have multiple models).

Share this post


Link to post
Share on other sites

Do you know of a different .stl exporter that can do that or a way to make the built in one work? Or, is there a way to separate the craft collection into its individual parts?

Share this post


Link to post
Share on other sites

The "built in" stl exporter is probably python code, and even if it's not, converting an imported craft to a set actual objects wouldn'T be that hard to do, but I don't have the time for such., so you'll have to either do it yourself or find a willing victim.

Share this post


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.