[Add-on] Paint Tools

Hi,

My friend told me there is no rectangular selection tools for ImageEditor.
So, I started developing paint tools for ImageEditor.

At first, I developed feature which can fill and erase within rectangular selection.
This is very simple feature, but I will add many features (cut/copy/paste/blur etc…) in future.

What do you think about this add-on?

Requests and comments about this add-on are welcome.
Thanks.

Hi Nutti,

Very good decision!

We(me and Craig Jone) had made this feature very easy in 3Dview with our new addon: Artist Paint Tools HEREbut we are yet in developping for other new features…
Take a look on this vids and + HERE
Good luck.
Spirou4D

This is great!

@Spirou4D: Is there a thread for Artist Paint Tools?

Not yet @mkbreuer! You can download it and try with the video of Craig, if you want…

@Nutti I installed your add-on but nothing in my UV/ImageEditor in paint mode with one image?
And I havn’t message in terminal when I use it or activate. Weird?
I use the last release of Blender trunk on Linux…
BUT do you have news of the codingteam of BlenderFoundation on this features now? Because stencil for painting must be essential in ImageEditor and today the brush Mask don’t run in ImageEditor.

EDIT: The poll() function is weird! Why you must be in edit mode to use this addon? You can use this feature on all image? An image don’t need to be applied on a shape to be paint.

On my blender 2.77 (sub 0), branch: master, commit date: 2016-04-05 18:12, hash: abf6f08
Your addon don’t run after the selection is made, the fill & erase buttons don’t run.

@mkbreuer

Thanks.

Now, this add-on has only simple feature.
I will add more and more features in this add-on.

@Spirou4D

Thanks.

We(me and Craig Jone) had made this feature very easy in 3Dview with our new addon: Artist Paint Tools HEREbut we are yet in developping for other new features…
Take a look on this vids and + HERE

It seems that your add-on is used in View3D.
My add-on is able to use in UV/ImageEditor, so we can improve Blender’s painting feature with your add-on

I installed your add-on but nothing in my UV/ImageEditor in paint mode with one image?
And I havn’t message in terminal when I use it or activate. Weird?

You should use this feature in Edit mode in View3D and in View/Mask mode in UV/ImageEditor.
This add-on uses mouse event, so there is limitation to use this feature.

BUT do you have news of the codingteam of BlenderFoundation on this features now? Because stencil for painting must be essential in ImageEditor and today the brush Mask don’t run in ImageEditor.

Ah…, ok.
Mask mode must be excluded from this feature.

The poll() function is weird! Why you must be in edit mode to use this addon? You can use this feature on all image? An image don’t need to be applied on a shape to be paint.

I tried this feature in object mode, but this feature does not work correctly.
(Mouse event does not works correctly? same as paint mode)
I think it must be solved in future.

On my blender 2.77 (sub 0), branch: master, commit date: 2016-04-05 18:12, hash: abf6f08
Your addon don’t run after the selection is made, the fill & erase buttons don’t run.

OK, I will try my add-on in newest blender.

WARNING!
I discovery why the button don’t run: You must not use “Region Overlap” in User prefs>System!
Now it’s ok!

EDIT: I understand why you use View and Mask mode in ImageEditor now!
Very good addon, Nutti, very complementary with our!

Idea: Place your addon icon before the title “Paint tool” with the header code

Idea: Have you seen if you select between the image and outside, the fill is cycling like the image is seamless.

@Spirou4D

Thanks for your investigation.

Idea: Place your addon icon before the title “Paint tool” with the header code

Is it possible to place icon before title from Python script?

Idea: Have you seen if you select between the image and outside, the fill is cycling like the image is seamless.

I fixed this problem. Please try new one.

And…, I added new features in this add-on.
I will introduce there feature soon, and hope you like it.

>>>Is it possible to place icon before title from Python script?
yes it’s possible but never used

For example:


def draw_header(self, context):
        if context.scene.UI_is_activated:
            pic = 'FILE_TICK'
        else:
            pic = 'X_VEC'
        self.layout.operator("artist_paint.load_init", text = "",
                                                    icon = pic)

Here you see I change the icon before the title if I activate the add-on but the icon is always before the title. on the same line…

>>>I will introduce there feature soon, and hope you like it.
Ho I am excited to try it… At soon!
Spirou4D

Hey man, great addon, but according to blenders “rules” it should be in the T panel, because T is for TOOLS, which is the panel in the RIGHT side, usability stuff =)
Overall, i find it to be a great solution, though couldn’t you pick the color first, then draw the square and automatically finish the “session” when you stop dragging?, if that is true, couldn’t it be the color you have selected in the already drawing tools?.. that would make it double cool.

Hi,

I added new feature about this add-on.
You can use below tools in new version.

  1. Erase
  2. Binarize
  3. Gray Scale
  4. Change Brightness
  5. Invert

@Spirou4D

Thanks for your solution.
I could place icon on header.

@Looch

Thanks for your advice.
I moved this UI to Tool shelf.

Overall, i find it to be a great solution, though couldn’t you pick the color first, then draw the square and automatically finish the “session” when you stop dragging?, if that is true, couldn’t it be the color you have selected in the already drawing tools?.. that would make it double cool.

Sorry, this tool has not only Fill feature but also above features.
So, session must be continued after dragging.

Thanks

Attachments


Thanks Nutti to speedly ended this new features, i try soon…:smiley:

Hi Nutti,

I have this traceback:


Traceback (most recent call last):
  File "/home/patrinux/.config/blender/2.77/scripts/addons/paint_paint_tools.py", line 435, in draw
    props = sc.pt_props
AttributeError: 'Scene' object has no attribute 'pt_props'

@Spirou4D

Hmm…?

It works in my machine. (Win10 or Mac OS X)
What’s operation this error occurs.

I’m on linux
I see the header not with the addon icon but only the arrow then below, nothing, no option!

EDIT: I try something to help you…wait

Now the addon run! :smiley:

You must know one thing:
if you use : bpy.utils.register_module(name)

you must place your file in folder “paint_paint_tools” with init.py file

EDIT: Your addon is excellent! I love the brightness septup! Congratulations Nutti.

May be now you must work on the UI because all buttons are scattered: you must concentrate the function, one by line may be, I mean.

A GREAT THANKS Nutti!

Added feature copy/paste/cut to this add-on.

@Spirou4D

you must place your file in folder “paint_paint_tools” with init.py file

May be now you must work on the UI because all buttons are scattered: you must concentrate the function, one by line may be, I mean.

Thanks for your advice.
I will fix these things.

Attachments


Thanks Nutti…i will use it…
Congrats.
Spirou4D

EDIT: Ok I tryed, this features are very useful. I’m sad to not can move the selection when I paste: too difficult may be?
Because actually you can choose the left-top point but you don’t know where the rest of the picture will be.

Thanks and good luck…

EDIT 2: No I havn’t seen the use of the UNDO. You must remove the selection border to return in past. OK.

  • idea: to add the Ctrl + C, Ctrl + V, Ctrl + X to this feature may be. I don’t know if it’s possible with Blender shortcut but interesting.