New python API for texture drawing? (paint.image_paint replacement?)

Hey there,

I was wondering if there is some new API that’s replacement for paint.image_paint?
I’ve noticed that the raw texture drawing in blender 3.1 is super performant with massive images working seamlessly while my old code using paint.image_paint(stroke) is still struggling just like old blender.

Is it possible to write some texture drawing code that’s as performant? Could someone point me in the right direction in the API documentation because I couldn’t find anything.


To my knowledge there isn’t a plan for a performance python API for painting.
I haven’t used the current API in any of projects, I normally use python just as a wrapper and use as_pointer to get direct access to what I need if performance matter.

What kind of painting do you do?

1 Like

Yes there is:
They’ve literarly added all this stuff in the previous update and now native texture drawing is super-performant. Now the question is how can I make my texture drawing as performant as the paint.image_paint is still the same as blender 3.0

Yes that are changes that I did :slight_smile: but they don’t reflect any changes to the painting. When painting a large part of it is to upload the changes to the GPU and draw it on the screen. The referred patch modified that part of the pipeline. Improvements of painting is just by reducing the overhead of the GPU updates.

Having a more performant Python API for painting should be considered a separate project.

1 Like

That’s wicked! I must be imagining things then!

I swear I can use a huge brush and huge image in native image/texture paint and use it like its nothing in blender 3.1 and I couldn’t before due to performance.