You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Lottie exporter] Use "File" -> "Export for web" menu comand to call "Lottie Exporter" #1218
After calling plugin Synfig file is closed and re-opened every time. That takes time and also clears undo history.
Considering all above, I suggest to re-organize Lottie Exporter from plugin to native menu command.
I mean modify Synfig C++ code in the following way:
Add "File" -> "Export for web" menu command.
This command will open a dialog similar to "Save As..." dialog.
When user choosing location and filename, he clicks "Export/Save" and C++ code is saving a temporary copy of current document and executes a python script which does actual conversion. At this point we can pass additional parameters to python script, which come from options of dialog at step 2.
@AnishGG this is because you need to get an instance of the active CanvasView, and not just run the method from the Instance class. So in your example, it will be something like:
Activity
morevnaproject commentedon Mar 10, 2020
@AnishGG Please take a look. ^__^
AnishGG commentedon Mar 11, 2020
Sure!
AnishGG commentedon Mar 13, 2020
@morevnaproject
For this, I will have to create a new dialog(just like https://github.com/synfig/synfig/blob/master/synfig-studio/src/gui/dialogs/canvasoptions.cpp), right?
P.S. I am new to gtkmm, will need a little bit help here.
AnishGG commentedon Mar 21, 2020
I was trying to go through the code and implement this. I will need some clarifications. :P
Here is the branch I am committing the code to https://github.com/AnishGG/synfig/tree/export_for_web_ui
For now, I have just copied the
canvas_optionsfor most of the parts.I am trying to call the
lottie exporterplugin from within thedialog_exportforweb.cpp, but I am failing to do so here: https://github.com/AnishGG/synfig/blob/e0ea6945624b8bfca9cee2b7e49ff6420010d167/synfig-studio/src/gui/dialogs/dialog_exportforweb.cpp#L214Specifically this is the error i recieve on uncommenting the above line:
synfig/synfig-studio/src/gui/dialogs/dialog_exportforweb.cpp:214:43: error: cannot call member function ‘void studio::Instance::run_plugin(std::__cxx11::string)’ without object Instance::run_plugin(this->plugin_path);@ice0 @morevnaproject any suggestions from your side please. ^__^
ice0 commentedon Mar 23, 2020
@AnishGG this is because you need to get an instance of the active
CanvasView, and not just run the method from theInstanceclass. So in your example, it will be something like: