Add ability to export buttons and paths as wick object files#140
Add ability to export buttons and paths as wick object files#140InternetAstronaut wants to merge 2 commits into
Conversation
|
I've been thinking more about this and I'm wondering if it's actually a bad idea to export paths as a wickobj. If we work on getting the clips system closer to how symbols work in Flash, it might make more sense to only let clips (and buttons) be a wickobj, since only clips should have a parent/instance relationship. |
|
Oh wait actually, this PR doesn't technically implement the feature request. It's specifically asking for a button in the inspector to export the object. |
Yeah, my bad... |
BaronAWC
left a comment
There was a problem hiding this comment.
forgot to actually submit this review
| @@ -2055,10 +2055,10 @@ class EditorCore extends Component { | |||
| exportSelectedClip = () => { | |||
| var clip = this.project.selection.getSelectedObject(); | |||
There was a problem hiding this comment.
since this technically doesn't have to be a clip, i think renaming this variable to object makes more sense
|
|
||
| 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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
also the commented Clip::... can probably be removed
There was a problem hiding this comment.
text objects are exportable, but i think it'd be nice if the classname was registered as
Textinstead ofPath.
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
There was a problem hiding this comment.
also the commented Clip::... can probably be removed
I know, I just put it to get a reference.
There was a problem hiding this comment.
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, ortext.wickobj. if the object has a name, use that instead.
That also seems like something good.
This PR adds #139. I don't think I need to clarify any more what and how this change works.