Skip to content

Add ability to export buttons and paths as wick object files#140

Open
InternetAstronaut wants to merge 2 commits into
Candlestickers:developmentfrom
InternetAstronaut:development
Open

Add ability to export buttons and paths as wick object files#140
InternetAstronaut wants to merge 2 commits into
Candlestickers:developmentfrom
InternetAstronaut:development

Conversation

@InternetAstronaut

@InternetAstronaut InternetAstronaut commented Jun 21, 2026

Copy link
Copy Markdown

This PR adds #139. I don't think I need to clarify any more what and how this change works.

@InternetAstronaut InternetAstronaut changed the title Add #139 (ability to export buttons and paths as wick object files) Add ability to export buttons and paths as wick object files Jun 21, 2026
@BaronAWC

Copy link
Copy Markdown
Collaborator

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.

@BaronAWC

Copy link
Copy Markdown
Collaborator

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.

@InternetAstronaut

Copy link
Copy Markdown
Author

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 BaronAWC left a comment

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.

forgot to actually submit this review

Comment thread src/Editor/EditorCore.jsx Outdated
@@ -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

Comment thread src/Editor/EditorCore.jsx Outdated

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
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
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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants