From 35172900c6770ea50eec58ff97d061c85bb03e26 Mon Sep 17 00:00:00 2001 From: InternetAstronaut <87543901+InternetAstronaut@users.noreply.github.com> Date: Sat, 20 Jun 2026 21:46:57 -0300 Subject: [PATCH 1/2] Make `Wick.Button` and `Wick.Path` objects exportable as `.wickobj` files --- src/Editor/EditorCore.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Editor/EditorCore.jsx b/src/Editor/EditorCore.jsx index 73c0a5e46..4269d3779 100644 --- a/src/Editor/EditorCore.jsx +++ b/src/Editor/EditorCore.jsx @@ -2055,10 +2055,10 @@ class EditorCore extends Component { exportSelectedClip = () => { var clip = this.project.selection.getSelectedObject(); if (!clip) return; - if (!(clip instanceof window.Wick.Clip)) return; + if (!([window.Wick.Clip, window.Wick.Button, window.Wick.Path].some((o) => clip instanceof o))) return; window.Wick.WickObjectFile.toWickObjectFile(clip, 'blob', file => { - window.saveFileFromWick(file, (clip.identifier || 'object'), '.wickobj'); + window.saveFileFromWick(file, (clip.identifier || /*Clip::f87f8b7d-62c3-4576-a5bb-61ce87768ce9*/ `${clip.classname}::${clip.uuid}`), '.wickobj'); }); } From 600cf2fb9b89e4471dfac80d755748f8a55d9487 Mon Sep 17 00:00:00 2001 From: InternetAstronaut <87543901+InternetAstronaut@users.noreply.github.com> Date: Tue, 23 Jun 2026 17:09:21 -0300 Subject: [PATCH 2/2] changed naming of clips, allow for any non-temporary, non-asset Wick object --- engine/src/base/Path.js | 2 +- src/Editor/EditorCore.jsx | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/engine/src/base/Path.js b/engine/src/base/Path.js index 5bcdde4d3..9cb49abd3 100644 --- a/engine/src/base/Path.js +++ b/engine/src/base/Path.js @@ -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) { diff --git a/src/Editor/EditorCore.jsx b/src/Editor/EditorCore.jsx index 4269d3779..a99b93d50 100644 --- a/src/Editor/EditorCore.jsx +++ b/src/Editor/EditorCore.jsx @@ -2053,12 +2053,20 @@ class EditorCore extends Component { } exportSelectedClip = () => { - var clip = this.project.selection.getSelectedObject(); - if (!clip) return; - if (!([window.Wick.Clip, window.Wick.Button, window.Wick.Path].some((o) => clip instanceof o))) 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 || /*Clip::f87f8b7d-62c3-4576-a5bb-61ce87768ce9*/ `${clip.classname}::${clip.uuid}`), '.wickobj'); + window.saveFileFromWick(file, (clip.identifier || object.identifier !== null ? object.identifier : cname), '.wickobj'); }); }