Repository navigation
Rework the plugin system - #1313
Conversation
|
It's ok, what travis build is errored, i will fix it ASAP. |
|
Ok, Travis build fixed. After rebase all should be fine. |
ee214c9 to
35fabe1
Compare
|
I've added support for importers defined in plugins. To test this you can use my plugin: http://mattia.basaglia.gitlab.io/tgs/downloads.html |
|
@mbasaglia Thank you for an awesome addition! Please check my comments here - #1309 (comment) ^__^ |
|
I have tested this PR, here are my thoughts: I was unable to test properly "Import file..." command, because importer gave me an error when I made an attempt to import Lottie json file. But that's different issue. I guess that "Import file..." opens imported file in a new tab (not adds to currently opened document). So, I think the meaning of it is more like "File" - "Open" command. I think that we should merge "Import file..." and "Open" commands for better UX.
|
|
yeah it does work more like open, I'll move the code to that dialog. to test import the easiest way is to create a simple drawing in synfig, export with "[TGS] SVG" and import the same file. |
|
Thank you! I want to say that I am absolutely excited about this feature and which possibilities it opens for further development. For example, a very common case when newbie user tries to import some image using "File" - "Open" command. Synfig give them error, because images intended to be added via "File" - "import" command. But newbie users are not aware about that and they often reach out to support asking what's wrong. With new plugins system we can create a very simple plugin, which allows to open images via "File" - "Open" command. The plugin will do simple thing - it will create a new document with imported image. ^__^ |
|
I've pushed some changes that do that and also fixed some issues. |
rodolforg
left a comment
There was a problem hiding this comment.
I believe it is the whole filepath, right?
|
Yea |
|
CI fail seems unrelated to my changes |
|
I have restarted the job. Sometimes the download fails because of network errors at the server. |
|
This pull request fixes 1 alert when merging ef1f20e into f584626 - view on LGTM.com fixed alerts:
|
Thank you! I will be able to test it on Tuesday. ^__^ |
|
By the way, as a side effect of this PR, #1252 should be much easier to fix as all that is required is to recreate / update the menu items when language is changed. |
|
Hi! I did one more round of testing and found the following: The Lottie plugin (which is only capable for export currently) for some reason is displayed in "File" - "Open" dialog. The plugin doesn't has any importers declared, so I guess it shouldn't be there. ^__^ (I do not have any other export/import plugins installed, besides Lottie, which is shipped with this version of Synfig). |
|
As far as I can tell, you can't access the filter combobox (and its signals) in a normal way, only what filter is currently active. So I think "Open history" should behave differently according to the selected filter – if it's possible. Regarding the Gtkmm docs, I use it, but often I read the Gtk docs themselves, as they're more ordered and cleaner than |
Currently for plugins "open history" just acts like open. So I guess it isn't possible to disable the open history button, even if it's possible to write the code that enables/disables based on the current filter, it can't be run when the filter changes if we can't hook to the combo signal. |
|
Couldn't the "Open history" action callback check what is the selected filter instead of (sadly) disabling the button? |
|
I'm not sure I follow, what should happen if someone clicks it when a plugin importer is selected? |
|
This is the relevant code btw, clicking on "Open history" just sets an output variable when clicked from the dialog synfig/synfig-studio/src/gui/app.cpp Line 2970 in 742010d And this is where it's used, looks like it only does something for ".sfg" files? So clicking on .sif, .sifz doesn't do anything special either (from what I gather) synfig/synfig-studio/src/gui/app.cpp Lines 4196 to 4238 in 742010d |
|
This pull request fixes 1 alert when merging 742010d into 90e4e3b - view on LGTM.com fixed alerts:
|
Yes, the "Open history" works for ".sfg" format only. I am not insist on reworking behavior of "Open history" button right now, in this exact PR. Just brought that up that maybe this could be fixed in the future if not now. ^__^ I am testing the PR again now. Thanks to everyone! ^__^ |
|
I found the crash is happening now with current code. Also, you will need 2 Lottie JSON (or any other importable) files to reproduce the crash.
|
|
hmm, it seems to only affect some files |
|
Can you check if until commit 6e6eee5 it still worked? If so, try to |
|
This pull request fixes 1 alert when merging b133f7c into 2ed703e - view on LGTM.com fixed alerts:
|
|
Found a fix |
2e0f0ce to
3fb1847
Compare
|
um, I re-based again. Any chance of this getting merged? |
|
Sorry. Was busy last days. Merged. Thank you! |
|
Cool, I'll be documenting the new stuff in the XML file on the wiki |





Implements most of the things mentioned here: #1309 (comment)