toe_head2001

The Plugin Browser v1.2.0.6 (Oct 3, 2017)

Recommended Posts

Another observation on the Plugin Browser. First, excellent tool in the arsenal - absolutely.

 

Okay, if you run an Effect from within the Plugin Browser, that Effect is NOT listed in the History dialog, rather the Plugin Browser "Effect" is listed. For instance, if I use the Plugin Browser and choose Shape3D, then I get a spherical object on the canvas. In the History dialog there is a record of the Plugin Browser being used, but not which Effect. I'm sure it's not as simple as that, but it might be confusing if multiple Effects are used via the Plugin Browser?

 

Best

Hugh

  • Upvote 1

Share this post


Link to post
Share on other sites

Plugin Browser is a shell which can run another plugin. When this happens, paint.net sees only the Plugin Browser running - so this is the History entry used.

 

It might be possible to append a child plugin to the PB name for the purposes of History, but I'm not sure Rick would approve of plugins changing their name on-the-fly.

Share this post


Link to post
Share on other sites
16 hours ago, Panchdara said:

Plugin Browser. First, excellent tool in the arsenal - absolutely.

 

I'm glad you see the value in the tool.

 

16 hours ago, Panchdara said:

if you run an Effect from within the Plugin Browser, that Effect is NOT listed in the History dialog, rather the Plugin Browser "Effect" is listed.

 

Surely, that is a very small price to pay for the convenience that is the Plugin Browser?

 

Share this post


Link to post
Share on other sites
12 hours ago, BoltBait said:

 

I'm glad you see the value in the tool.

 

 

Surely, that is a very small price to pay for the convenience that is the Plugin Browser?

 

I was just observing.... very, very small price to pay indeed :)

 

EER I totally understand the issue(s) involved with "who is the messenger"/"message" bit.

 

Was only an observation is all. (I was not shouting with the "NOT", sorry for any misunderstanding, just highlighting the "not" part - italics would have been preferable)

 

The quality of the Browser is beyond words. With so many fun and useful plugins available and trying to locate and organize them is a hairy proposition - Browser is an invaluable "Effect".

 

Edited by Panchdara

Share this post


Link to post
Share on other sites
On 9/3/2017 at 0:42 AM, AndrewDavid said:

Attempting to add the bookmark works but generates the error again.

Oops... yeah I broke that in v1.2.0.3.

Version 1.2.0.4 has been posted.

 

On 9/3/2017 at 1:30 AM, Panchdara said:

Okay, if you run an Effect from within the Plugin Browser, that Effect is NOT listed in the History dialog, rather the Plugin Browser "Effect" is listed.

The Effect name property can only be set during initialization, and is otherwise readonly. We couldn't change it even if we wanted to.

  • Like 1

Share this post


Link to post
Share on other sites

Hi the horde!

 

I have a question as author of plugin.

 

I have just reviewed all my plugins for the pluginbrowser (image and text), for my next pack update. But I do not see how to add other languages for the pluginbrowser. Any clue?

 

pluginbrowser.png

 

 

Share this post


Link to post
Share on other sites

For keywords this is done easily and simply:

[assembly: AssemblyConfiguration("coordinates|grid|map|orthonormal|координаты|карта|сетка")]

pluginbrowser_kw.png

Share this post


Link to post
Share on other sites
On 9/23/2017 at 10:16 AM, MadJik said:

I have just reviewed all my plugins for the pluginbrowser (image and text), for my next pack update. But I do not see how to add other languages for the pluginbrowser. Any clue?

Seeing as AssemblyConfiguration requires a hardcoded (const) string, we can create a custom Property.

 

Here's my proposal:

Add a custom property of Keywords to your implementation of IPluginSupportInfo. Like so...

public class PluginSupportInfo : IPluginSupportInfo
{
    public string Author => ((AssemblyCopyrightAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright;
    public string Copyright => ((AssemblyDescriptionAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description;
    public string DisplayName => ((AssemblyProductAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]).Product;
    public Version Version => base.GetType().Assembly.GetName().Version;
    public Uri WebsiteUri => new Uri("https://forums.getpaint.net/index.php?showtopic=#####");

    public string Keywords => System.Globalization.CultureInfo.CurrentUICulture.Name == "fr" ? "Oh là là|baguette" : "myKeyword|awesome";
}

If that property isn't found in a plugin, the Plugin Browser could just fallback to AssemblyConfiguration for the keywords.

 

Thoughts?

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, MadJik said:

 I'll give it a try.

The Plugin Browser doesn't know to look for the Keywords property yet.

I'm proposing that for next version. Do you think it's a good solution?

 

2 minutes ago, MadJik said:

But "Oh là là|baguette",  you make me LOL.

Just a few cliché French words/phrases that came to mind. :lol:

Share this post


Link to post
Share on other sites
1 minute ago, toe_head2001 said:

The Plugin Browser doesn't know to look for the Keywords property yet.

I'm proposing that for next version. Do you think it's a good solution?

 

Just a few cliché French words/phrases that came to mind. :lol:

I think the solution shouldn't mix the languages as the example from Remake (yes it works). And the work we did with @ReMake for Russian (and French) translation was also to have a unique language readable for the user.

 

I've already tried things in the code with if..else.. and lang="Fr"?"baguette":"thin long french bread";  etc. without success yet. Would it work with your implementation for "keyword"? (hope so) but then could we have the recursive ? to give words for other languages?

 

 

Share this post


Link to post
Share on other sites
1 minute ago, MadJik said:

Would it work with your implementation for "keyword"? (hope so) but then could we have the recursive ? to give words for other languages?

 

You'd probably use switch for that.

public class PluginSupportInfo : IPluginSupportInfo
{
    public string Author => ((AssemblyCopyrightAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright;
    public string Copyright => ((AssemblyDescriptionAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description;
    public string DisplayName => ((AssemblyProductAttribute)base.GetType().Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0]).Product;
    public Version Version => base.GetType().Assembly.GetName().Version;
    public Uri WebsiteUri => new Uri("https://forums.getpaint.net/index.php?showtopic=#####");

    public string Keywords
    {
        get
        {
            switch (System.Globalization.CultureInfo.CurrentUICulture.Name)
            {
                case "fr":
                    return "Oh là là|baguette";
                case "ru":
                    return "водка";
                default:
                    return "myKeyword|awesome";
            }
        }
    }
}

 

Share this post


Link to post
Share on other sites

(Rick will probably kick me for this) Is there a way to access the resx strings from paint.net itself?

 

If a plugin used the same strings as paint.net (there are about 1300 of them), then localization of the plugin would happen automatically as the user switched pdn language.

Share this post


Link to post
Share on other sites
1 hour ago, Ego Eram Reputo said:

Is there a way to access the resx strings from paint.net itself?

 

Nope.

 

1 hour ago, Ego Eram Reputo said:

(Rick will probably kick me for this)

 

I used to do this in all of my plugins... they are now blocked.

Share this post


Link to post
Share on other sites
On ‎30‎/‎09‎/‎2017 at 10:56 PM, toe_head2001 said:

You'd probably use switch for that.

 

Yes as I already do this way for the static name:

 public static string StaticName { get { if (CICC == "French") return...

 

Share this post


Link to post
Share on other sites

Version 1.2.0.6 posted.

 

Fixes for the AppX (Store) version of paint.net, and adds some properties for Plugin authors with multi-language plugins.

  • Like 2
  • Upvote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now