Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
6.13k stars 2.07k forks source link

Custom materials are not saved #1104

Closed marcopiraccini closed 6 years ago

marcopiraccini commented 7 years ago

Cura 2.3.1 (PPA) on Ubuntu 16.04 I duplicate a generic material, then I edit it, changing name and stuff. When I close and reopen Cura, the material I created is disappeared.

Also, if I export materials, the import seems not to work

phaerus commented 7 years ago

Can confirm issue still present in Windows 10 Professional, Cura 2.4. Using a custom printer, not Ultimaker. Removing the <compatible>True</compatible> line from the material files in %localappdata%/cura/materials/ lets me view the material in the UI.

Edit: looking through the code, is this to define materials that are compatible with multiple printers? I'm trying to understand the relationship between the compatible meta data and the global_compatibility variable in XmlMaterialProfile.py

If I add a new printer that's an Ultimaker, then even the material definitions with <compatible>True</compatible> appear in the menu. Appears to be an issue with determining compatibility of a filament for a printer, and maybe something in the MaterialMenu.qml on line 161? (Sorry, completely new to the codebase, just trying to toss some ideas out there)

nallath commented 7 years ago

A machine can be compatbile "in general", but a machine can have inter machine differences (in most cases; nozzle size or shape). We call those "variants".

It can be the case that the machine in general supports it, but a single one of those variants doesn't. In that case you define the compatibility of that variant to false.

Kadah commented 7 years ago

Ran into this as well. I'm new to Cura and 3d printing in general. I've barely touched Cura 2.x so far as I found the UI very difficult to navigate and use over all the other frontends I've tested.

BagelOrb commented 7 years ago

Is this issue still not fixed?

fieldOfView commented 7 years ago

I think it is fixed in at least 2.5b2. At least I could no longer reproduce it when I tested it a week or so ago.

seantapscott commented 7 years ago

Custom materials work for me. I can duplicate and edit them.

I also checked that custom material export/import works (although the open/save dialog has a weirdly set default folder lookup). Also, strangely, the display name of the imported material is the name of the file, and Cura hangs whenever I edit custom materials (probably a different issue entirely).

Ghostkeeper commented 7 years ago

Still seem to get this bug on Master though when I use the steps described in #1687.

MarcusWolschon commented 7 years ago

Using 2.4.0 I created a new material "Colorfabb CF20". Now I have that material still currently selected for the printer "Ultimaker 2ex 0.4mm nozzle" but it and it's category are no longer in "manage materials" and I can not e selected when changing to a different printer such as "Ultimaker 2ex 1.0mm nozzle". The custom Material "Colorfabb nGen" that I used daily for many month before has completely disapeared from Cura.

Both are not present as files in C:\Users\%user%\AppData\Local\cura\materials

How do I get my materials back?

When I create new materials and enter "manage materials" they are gone at first. When I scroll down and then scroll up again, they exist. (But not the 2 materials I lost)

MarcusWolschon commented 7 years ago

After the update to Cura 2.5 all custom materials are still there... but each has 20-30 copies that didn't exist before the update. No keyboard navigation in the list and no way to select multiple with shift. So I have to delete each one of them and it takes serveral seconds to delete a single entry each time.

Some of these copies can neither be activated nor deleted.

And entering a filament cost+weight for one material, changes it for all OTHER materials (of different types) too. (bug #1597)

nallath commented 7 years ago

The cost + weight fillament is not a bug; You make duplicates. That means that they share GUID (so they are about the same material). A material has a single cost.

fieldOfView commented 7 years ago

A workaround for the cost+weight thing is to (manually) edit the GUID in the XML file to something unique. Cost and weight are not stored in the XML file, but in the Cura configuration, and they are stored by the value of the GUID.

I will see if I can get around to adding a way to "unlink" the GUID in the cura interface for Cura 2.6

nallath commented 7 years ago

Having a new GUID is making a new material. If you want to go there, I think its best to just add a "new" button + GUI to create a new material.

fieldOfView commented 7 years ago

The thing is that people have been using the "Duplicate" button for a couple of months now, so we also need to solve the problem caused by that.

I'm thinking of detecting a duplicate GUID and adding a message on top of the details pane that says "this material is currently linked to "Generic PLA". Would you like to unlink it?", where unlink would be a "hyperlink"/button that creates a new GUID.

nallath commented 7 years ago

You're right, but i'd also like to prevent people from getting more used to the incorrect workflow of duplicating a material to get a new one.

MarcusWolschon commented 7 years ago

"A workaround for the cost+weight thing is to (manually) edit the GUID in the XML file to something unique." As I already wrote. This does not work.

Exporting a material, deleting the original, then changing the GUID in the exported version, then importing it again, then adding cost+weight again manually because of #1715 seems to be a workaround. But not a workflow you can offer to any user.

fieldOfView commented 7 years ago

Don't import/export

The material is now no longer linked to the one you have copied it from.

No, this is not a great solution, this is a workaround. For now.

MarcusWolschon commented 7 years ago

I did that, gave each custom material a different last digit in the GUID and it wrecked havoc. Maybe these GUIDs where referenced somewhere? As a current material in the 3 custom printers perhaps? (I didn't check what GUID format version was used by Cura in the third block. Maybe I broke some checksum.)

nallath commented 7 years ago

GUID is just seen as a string (that has to be unique). "zomg" should work as GUID

fieldOfView commented 7 years ago

See #1757

ftoons commented 7 years ago

I'm facing the issue of disappearing profiles in Cura 2.6.2. in Windows 10. My first install was 2.5. I made some costum material that worked well. Upgraded to 2.6 beta and profiles were there. Upgraded to 2.6.1 when it came out and no problems again. Then 2.6.2 came out and after upgrading the profiles come and go occasionally! no specific pattern or trigger that makes them appear or disappear, except that some randomly appear when I change the material. I hope I can get some help with that. Thanks.

Ghostkeeper commented 7 years ago

We made no change in that aspect for 2.6.2. Actually 2.6.2 was basically just an update for MacOS to have the correct CPU architecture target, and a useless update of the firmware builds.

That said, I can't reproduce the issue you're reporting on my computer.

ftoons commented 7 years ago

Thanks for your reply. So it seems the problem in my case is that the profiles disappear based on selected material, even if on extruder 2.
Here is one way I can reproduce the problem: If extruder 1 is AA and has a generic PLA spool and I choose (Ultimaker black PLA (or any ultimaker filament)) in Cura AND ASLO Extruder 2 is AA core and has Ultimaker PLA spool in it, and I select material as PVA in Cura (Not compatible message shown), I can only see very few of my profiles. The original profiles disappear and I only see two of the ones i made.

Now I can get all the profiles back by changing materials and cores in Cura, but I don't know based on what. I don't recall I was told by cura tutorial or a popup message or something that profiles are core / material dependent and i don't know precisely makes them show up or hide from the menu.

Thank you for your support

Ghostkeeper commented 7 years ago

Ah yes. We only show quality profiles with a quality type that all extruders can support. There is a bit of a weird emergent result there because the "Not Supported" profiles are also profiles like any other and they have their own quality type. As a result, the AA/PVA combination thinks only profiles with 0.1mm layer height are supported. I expect that this will change when we implement profiles depending on combinations of materials, which is scheduled for the end of the year. We'll have to think of better fall-backs then.

PVA is actually forbidden on an AA nozzle since it damages the nozzle. Other materials are only supported on AA but still printable on BB.

This has nothing to do with custom materials not being saved though so if you want to continue this conversation, please make a separate issue for it.

Ghostkeeper commented 6 years ago

This was fixed in version 3.0, if I recall correctly. It doesn't seem to happen now.

aenertia commented 6 years ago

Creating and Duplicating Materials in 3.3.1 (Linux appimage) fails. The XML's get generated however, it appears that the machine type that gets added (on either a duplicate or create material) event only include ultimaker product strings, which then hides the material (My Machine is a custom FDM) - changing the filament size to say 1.75mm is enough to trigger this. Attached an example xml of what happens. These materials disappear the moment they are created with the UI and makes material management pretty much useless. This has been happening for at least the last 2 major releases for me. (Always on Linux with Appimage) custom_material+%232.xml.fdm_material.txt

Ghostkeeper commented 6 years ago

The material diameter may make a material disappear if it's incompatible with your current printer. Look into the extruder settings in the machine settings dialogue to see what material diameter it needs.

If a material disappears for this reason, Cura should be showing a warning message.

I'm unable to reproduce your bug with the following steps in 3.4.1:

Before and after restarting Cura, the selected material is still BLA, and BLA still appears in the list of materials.

magicalbeard commented 4 years ago

This bug is currently present in 4.5.0 - all my duplicated materials are being updated at once when I change the material cost.

Ghostkeeper commented 4 years ago

If you don't want the material cost to be shared between multiple profiles, click the "unlink" button right above it. These are linked to allow you to have different sets of settings for the same spool of material.

MarcusWolschon commented 4 years ago

Why would anyone do that? It's material properties. If you want to deviate from them, you can still override them in your print profile.

magicalbeard commented 4 years ago

image

Where is the "unlink button"?

Ghostkeeper commented 4 years ago

Why would anyone do that? It's material properties. If you want to deviate from them, you can still override them in your print profile.

Except for the diameter, these are not settings and so they can't be stored in your custom print profile. They are metadata entries for material profiles. They don't have any effect on the slice either.

Where is the "unlink button"?

If the material is not linked to any other material, there is no unlink button. If it is linked, it will be between the properties and the description:

Screenshot from 2020-04-28 16-38-50

If you duplicate a material profile, your material will be linked to the original. If you create a new material profile, it won't be linked to anything (but under water it will start with the properties of PLA).

magicalbeard commented 4 years ago

@Ghostkeeper This is where I'm really confused - I have duplicated the Generic PLA material, cannot unlink it (because there is no button) and it still shares those 4 metadata values between all of them. I can, however, edit anything under "Print Settings" and those changes are unique to that duplicate.

I have no "unlink material" button on any of my duplicated materials. This means that if I want to have two identical materials, differing only in their material cost/density/diameter or weight, I would have to create them from scratch and cannot inherit any attributes from an existing material. There are many manufacturers that sell different colors of identical base filament at different prices.

Im running Cura 4.5.0 on windows 10, I've tried many different ways of making new materials and cannot get that "unlink" button to show up.

Ghostkeeper commented 4 years ago

I can, however, edit anything under "Print Settings" and those changes are unique to that duplicate.

Yes those are not linked, and really the point of being able to duplicate materials. You can edit the print settings and have different profiles for the same spool. This is not a bug.

However that you see no "unlink material" after duplicating, and that the cost and weight are still linked seems like a bug to me. Only I'm unable to reproduce that. Maybe there is a bug that the button is not showing?

The list of linked materials is constructed here:

https://github.com/Ultimaker/Cura/blob/8386d094d3bc9226754b8e2d4b6728735283380b/resources/qml/Preferences/Materials/MaterialsView.qml#L34-L50

The button is shown if that list is not empty.

This code is quite noodly though. I wouldn't be surprised if there were some update bugs in there. It's been on our list to refactor for a while.