-
Notifications
You must be signed in to change notification settings - Fork 18
Add ability to export buttons and paths as wick object files #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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'); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also the commented Clip::... can probably be removed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I know, I just put it to get a reference.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That also seems like something good. |
||
| }); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
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
objectmakes more sense