How to change visible selections in EnumParam

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change visible selections in EnumParam

Inkscape - Dev mailing list
Dear Inkscape Team,

my bool op LPE has classical bool operations suitable for closed paths
and line cutting operations suitable for one open and one closed path. I
wanted to adjust the options shown in the EnumParam depending on the
path type, but couldn't find out how. Also it would be interesting to
know if there is way to know when the path in a PathParam is set,
because at this point I need to adjust the options shown. Otherwise I
would make the decision on the main path and always require that the
operand path is closed (and give a warning if not).

Or do you think it makes more sense to have two LPEs, one classical bool
LPE which only works for closed paths and one path trimming LPE to trim
sets of open paths with a closed path. I think separating the two might
be more obvious to the user.

Best regards,

Michael

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to change visible selections in EnumParam

Jabier Arraiza
hi:
On Sun, 2017-06-18 at 16:54 +0200, Michael Soegtrop wrote:

> Dear Inkscape Team,
>
> my bool op LPE has classical bool operations suitable for closed
> paths
> and line cutting operations suitable for one open and one closed
> path. I
> wanted to adjust the options shown in the EnumParam depending on the
> path type, but couldn't find out how. Also it would be interesting to
> know if there is way to know when the path in a PathParam is set,
> because at this point I need to adjust the options shown. Otherwise I
> would make the decision on the main path and always require that the
> operand path is closed (and give a warning if not).

You need a header var "Geom:Pathvector older_pv" asigning it in the end
of "do_before effect" and finaly compare it with current path

You also need the definition of the header put the select widget to be
available in all LPE, for this you redefine the "effect::widget" like
in a lot of effects, perspective envelope, Laticce 2....

> Or do you think it makes more sense to have two LPEs, one classical
> bool
> LPE which only works for closed paths and one path trimming LPE to
> trim
> sets of open paths with a closed path. I think separating the two
> might
> be more obvious to the user.

Not sure [UX] team?

> Best regards,
>
> Michael

Chers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
C R
Reply | Threaded
Open this post in threaded view
|

Re: How to change visible selections in EnumParam

C R
If the open paths can be handled like closed paths in one lpe, I'd recommend going with that option rather than adding another lpe. If it takes an extra checkbox in the panel, that's preferable to having two lpes that do the same thing.

This also reminds me that we need to redo the lpe add dialog to include thumbnails of each effect. I think this would add a lot to discoverability, and save the user having to remember the name of the lpe they need when they probably had to try a few before getting to the correct one.

Just my thoughts.
-C


On 19 Jun 2017 06:38, "Jabier Arraiza" <[hidden email]> wrote:
hi:
On Sun, 2017-06-18 at 16:54 +0200, Michael Soegtrop wrote:
> Dear Inkscape Team,
>
> my bool op LPE has classical bool operations suitable for closed
> paths
> and line cutting operations suitable for one open and one closed
> path. I
> wanted to adjust the options shown in the EnumParam depending on the
> path type, but couldn't find out how. Also it would be interesting to
> know if there is way to know when the path in a PathParam is set,
> because at this point I need to adjust the options shown. Otherwise I
> would make the decision on the main path and always require that the
> operand path is closed (and give a warning if not).

You need a header var "Geom:Pathvector older_pv" asigning it in the end
of "do_before effect" and finaly compare it with current path

You also need the definition of the header put the select widget to be
available in all LPE, for this you redefine the "effect::widget" like
in a lot of effects, perspective envelope, Laticce 2....

> Or do you think it makes more sense to have two LPEs, one classical
> bool
> LPE which only works for closed paths and one path trimming LPE to
> trim
> sets of open paths with a closed path. I think separating the two
> might
> be more obvious to the user.

Not sure [UX] team?

> Best regards,
>
> Michael

Chers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to change visible selections in EnumParam

Jabier Arraiza
In reply to this post by Inkscape - Dev mailing list
Hi Michael. Forget this part
On Sun, 2017-06-18 at 19:12 +0200, Michael Soegtrop via Inkscape-devel
wrote:

> . Also it would be interesting to
> know if there is way to know when the path in a P is set,
bool linkeditem.linksToItem()
> because at this point I need to adjust the options shown. Otherwi
> se I
> would make the decision on the main path and always require that the
> operand path is closed (and give a warning if not).
to get the liked paht

> Or do you think it makes more sense to have two LPEs, one
sets of open paths with a closed path. I think separating the two
> might
> be more obvious to the user.
>

[UX] Team?

> Best regards,
>
> Michael
>
> -------------------------------------------------------------------
> -----------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel