Inkscape.org
Creating New Extensions Simple script to create a gradient mesh
  1. #1
    Mpx83 Mpx83 @Mpx83

    Hi,

    I'm pretty new with inkscape and I need help to create what I think is a simple script. I checked the documentation but I'm probably too bad to find what I need.

    I need a script that adds a gradient mesh to the selected object and then in the script I assign the rgb components of the modes of the mesh.

    Can you tell me how to create the gradient mesh in the script(python preferred) and how can I access the nodess if the mesh? Then I should ve able to continue by myself.

     

    Thanjs

  2. #2
    inklinea inklinea @inklinea⛰️

    Under the Extensions Menu

    Extensions>Styles>Mesh Gradients>Path to Mesh Gradient

    In the Inkscape core extension folder the files are 

    path_mesh_p2m.inx and path_mesh_p2m.py

    You should be able to work out the basics from there.

    Also the basics are at the bottom of this page https://inkscape.gitlab.io/extensions/documentation/source/inkex.elements._filters.html

    However, I think mesh gradients are complicated. I don't fully understand how they work.

    I would suspect most of extension authors would have to spend some time learning how they work before attempting to write anything.

    It might be a bit of a discouraging place to start if you are a beginner.

     

  3. #3
    Mpx83 Mpx83 @Mpx83
    *

    Thanks  @inklinea   that's look exactly what I need to start. Yes I'm a beginner so maybe I would not be able to write what I have in mind but thanks to your help at least I have a place to start!

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Simple script to create a gradient mesh