Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion engine/src/base/Path.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Wick.Path = class extends Wick.Base {

/**
* The type of path that this path is. Can be 'path', 'text', or 'image'
* @returns {string}
* @returns {'text' | 'image' | 'path'}
*/
get pathType() {
if (this.view.item instanceof paper.TextItem) {
Expand Down
16 changes: 12 additions & 4 deletions src/Editor/EditorCore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2053,12 +2053,20 @@ class EditorCore extends Component {
}

exportSelectedClip = () => {
var clip = this.project.selection.getSelectedObject();
if (!clip) return;
if (!(clip instanceof window.Wick.Clip)) return;
var object = this.project.selection.getSelectedObject();
if (!object) return;
if (!object instanceof Wick.Base || !(object instanceof Wick.Asset))) return;
if (object._temporary) return;

var cname = object.classname;
if(cname === 'Path') {
var pt = object.path;
if(pt === 'path') return; // no need to export paths
cname = `Path::${}`; // could be: (some real Rust/C++ codebase has this), Path::image, or Path::text
}

window.Wick.WickObjectFile.toWickObjectFile(clip, 'blob', file => {
window.saveFileFromWick(file, (clip.identifier || 'object'), '.wickobj');
window.saveFileFromWick(file, (clip.identifier || object.identifier !== null ? object.identifier : cname), '.wickobj');
});
}

Expand Down