Background Image in perspective, how should I begin such addon?

Hello everybody!

There’s one feature from Zbrush that I’ve been missing when sculpting in Blender, specially when I’m using only one display, and is the option to have a background image that always faces the camera and that can be positioned in any place in the viewport, scaled or moved. Right now the only way to have such thing in Blender is by putting the backgorund image to display on the camera, but it gets the whole camera view, and the image is centralized, messing the view of the model up:


And I’d rather have it using the borders of the viewport (or anyplace you seem fit for you to place them).
I was thinking about reusing and modifying the code from background image for camera or the code that displays the stencil image on Paint mode:


Where you can move, rotate (not so important) and scale the image and put them on the unused space on the viewport, not disturbing your view from the model.

Something like this:

And I know that I could do something like this with the UV/Image Editor, but I think the way stencil displays the image is better.

Where do you think I should look in the code or a site where I can learn to develop such feature, maybe as an addon? I’ve never code anything for Blender, but I’m willing to learn in order to have this feature.

Thx :slight_smile:

hi

I think you are looking for something like stencil mode:


Yep, I mentioned it on my post. It looks like the closest thing to the one I want to achieve.
I guess I’ll try to learn some stuff from the beginning until I can get to the point where it’s easy to find this kind of code in Blender’s source and be able to understand it xD.

Thank you.

As you can parent an image to an empty too, could you use that to display the image and somehow hook it to the cursor for painting?