Skip to content
Open
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/Editor/EditorCore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2055,10 +2055,10 @@ class EditorCore extends Component {
exportSelectedClip = () => {
var clip = this.project.selection.getSelectedObject();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this technically doesn't have to be a clip, i think renaming this variable to object makes more sense

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');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text objects are exportable, but i think it'd be nice if the classname was registered as Text instead of Path.

also, having the UUID and date of export doesn't seem that helpful, and all it does is make the filename extremely long. (especially the UUID - it doesn't help the user at all.) i'd say that unnamed objects are just named clip.wickobj, button.wickobj, path.wickobj, or text.wickobj. if the object has a name, use that instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the commented Clip::... can probably be removed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text objects are exportable, but i think it'd be nice if the classname was registered as Text instead of Path.

I also think text should be separate from paths, but that’s the way it was coded and it’ll break old files if we separate the two. I think we can change the classname to “Text” in the better, since only internal code reads that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the commented Clip::... can probably be removed

I know, I just put it to get a reference.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, having the UUID and date of export doesn't seem that helpful, and all it does is make the filename extremely long. (especially the UUID - it doesn't help the user at all.) i'd say that unnamed objects are just named clip.wickobj, button.wickobj, path.wickobj, or text.wickobj. if the object has a name, use that instead.

That also seems like something good.

});
}

Expand Down