Skip to content

[Lottie exporter] Use "File" -> "Export for web" menu comand to call "Lottie Exporter" #1218

Closed

Description

@morevnaproject

Currently Lottie Exporter is implemented as a Synfig Plugin.
This puts some limitation at its functionality.

For example:

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:

  1. Add "File" -> "Export for web" menu command.
  2. This command will open a dialog similar to "Save As..." dialog.
  3. 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.

Activity

  1. morevnaproject commented on Mar 10, 2020

    @morevnaproject
    MemberAuthor

    @AnishGG Please take a look. ^__^

  2. AnishGG commented on Mar 11, 2020

    @AnishGG
    Member

    Sure!

  3. AnishGG commented on Mar 13, 2020

    @AnishGG
    Member

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

  4. AnishGG commented on Mar 21, 2020

    @AnishGG
    Member

    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_options for most of the parts.
    I am trying to call the lottie exporter plugin from within the dialog_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#L214
    Specifically 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. ^__^

  5. ice0 commented on Mar 23, 2020

    @ice0
    Collaborator

    @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:

    canvas_view_->get_instance()->run_plugin(this->plugin_path);
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions