33 Commits

Author SHA1 Message Date
Jaime van Kessel
620cd9c45d Change the comment of the UFP mimetype to the correct description 2019-03-21 14:32:27 +01:00
Jaime van Kessel
1a037bdb82 Prevent UFP writer from crashing if the base file of a material can not be found
Another issue found in the crash reports
2019-01-31 14:48:40 +01:00
Lipu Fei
6992fd2991 Update plugin versions to match package versions
CURA-6019
2018-12-17 13:03:21 +01:00
Ghostkeeper
c235f339ae
Increment API version to 6
All plug-ins now have to re-check whether they are still compatible with the current version of Cura.

Contributes to issue CURA-6019.
2018-12-14 17:29:02 +01:00
Remco Burema
110d2daa81 [CURA-5775] The snaphot-creation of the UFP-writer should only be called when writing to UFP-files. 2018-10-04 15:54:22 +02:00
Ghostkeeper
0ce9bf61be
Move MIME type declarations into constructors of readers
So that if you disable the plug-in, the MIME type declaration is also not added.

Fixes #4151.
2018-09-27 13:58:06 +02:00
Lipu Fei
9f158a995c
Merge pull request #4283 from Ultimaker/CURA-5555_ufp_material_profile
Add materil xml file to UFP file
2018-08-30 09:58:42 +02:00
Lipu Fei
570d0715ed Add call_on_qt_thread to UFPWriter.write()
CURA-5555
2018-08-29 17:38:36 +02:00
Lipu Fei
8f5aa82bdb Fix adding materials in UFP
CURA-5555

Need to use getContainer() for a MaterialNode.
2018-08-29 17:38:36 +02:00
Lipu Fei
939484bc91 Fix adding materials in UFP
CURA-5555

 - Store materials in virtual path "/Materials"
 - Correct material relationship type
 - Add origin for material relationship
 - Use MaterialManager instead of ContainerRegistry to get materials
 - Other minor changes
2018-08-29 17:25:36 +02:00
Aleksei S
fe9cada459 Increase plugin API version to 5
CURA-5627
2018-08-27 13:59:00 +02:00
Aleksei S
423f1210b0 Catch erros and open the write stream only if the material cointaner is found
CURA-5555
2018-08-27 11:10:41 +02:00
Aleksei S
ea935024cf Add materil xml file to UFP file
CURA-5555
2018-08-24 13:02:06 +02:00
Remco Burema
ca25638c07 .ufp should also not show up in recent files since it's a gcode format 2018-08-21 11:01:35 +02:00
Diego Prado Gesto
38a0c9b66d Add some extra information when the Cura can't write the files. 2018-08-03 12:02:11 +02:00
Aleksei S
d083426497 Added MimeTypeDatabase for UFP extension
CURA-5323
2018-05-08 10:59:05 +02:00
fieldOfView
ab9c415e26 Gracefully handle missing libCharon 2018-02-05 18:30:25 +01:00
Jack Ha
0e7edc3eaf CURA-4425 the thumbnail now crops correctly 2018-02-05 14:36:42 +01:00
Ghostkeeper
cfb5d71c27
Fix imports
Needs to be a capital letter now. Also remove the unused one (the kitty is no longer there).

Contributes to issue CURA-4872.
2018-02-01 10:34:38 +01:00
Jack Ha
c42f186812 CURA-4425 first thumbnail in UFP file; updated CuraSceneModel and PreviewPass 2018-01-31 17:08:32 +01:00
Ghostkeeper
2fe9860bb9
Use streaming open function
This way we can actually write the result to the correct stream rather than opening a random file separately (which was placeholder).

Contributes to issue CURA-4872.
2018-01-31 08:52:28 +01:00
Ghostkeeper
ebe221f604
Add origin to thumbnail relation
This thumbnail is now about the g-code, so let the relation say that.

Contributes to issue CURA-4872.
2018-01-31 08:43:40 +01:00
Ghostkeeper
a9048a587d
Use new open_stream
This allows us to do something else than write to a file, too.

Contributes to issue CURA-4872.
2018-01-29 17:25:36 +01:00
Ghostkeeper
fec553dbee
Return true after successfully writing the file
This is how Uranium detects that it's been written successfully.

Contributes to issue CURA-4872.
2018-01-29 13:06:38 +01:00
Ghostkeeper
2d48fbb608
Rename file_type parameter to relation_type
It was renamed in libCharon for better semantic meaning.

Contributes to issue CURA-4872.
2018-01-29 12:51:23 +01:00
Ghostkeeper
6f833051f8
Close archive after writing
It gets flushed then and everything.

Contributes to issue CURA-4972.
2018-01-26 16:28:34 +01:00
Ghostkeeper
e3e8e8b170
Fix opening kitty file
Contributes to issue CURA-4872.
2018-01-26 16:21:01 +01:00
Ghostkeeper
20b903855f
Close streams before opening the next
Because zipfile can't handle multiple open streams at the same time.

Contributes to issue CURA-4872.
2018-01-26 16:15:30 +01:00
Ghostkeeper
b6c7a0829f
Use virtual_path parameter instead of target
This parameter was renamed.

Contributes to issue CURA-4872.
2018-01-26 15:43:14 +01:00
Ghostkeeper
d299786de7
Convert g-code to bytes before writing it to archive
Contributes to issue CURA-4872.
2018-01-26 15:41:39 +01:00
Ghostkeeper
8bd351c133
Add placeholder thumbnail to package
This kitten really likes boxes of all kinds: Cardboard and plastic boxes for sure, but also digital boxes such as the UFP.

Contributes to issue CURA-4872.
2018-01-26 13:52:20 +01:00
Ghostkeeper
8a3a3d32da
Fix imports to Charon classes
Contributes to issue CURA-4872.
2018-01-26 13:34:45 +01:00
Ghostkeeper
600e2abce1
Add basic UFP writer plug-in
This already implements most of it. Just the thumbnail must still be gotten and put inside the container.

Contributes to issue CURA-4872.
2018-01-26 13:25:49 +01:00