How to get the render pixels coordinates in compositing

When fine-tuning the finished render in “Compositing”, sometimes it is necessary to refer to the pixels coordinates of the processed image, for example, to apply effects distributed over the entire width or height of the image.

We can get the distribution factor of coordinates along with the height or width of the rendered image using texture nodes.

How to check the list of operators added to the area header

To add an operator to the area header, we can use the “append” and “prepend” functions specifying in its parameters the drawing function of the operator call button.

For example, to add an operator of adding the default cube to the header of the viewport (3D View) area, we need to define the operator drawing function:

and add it to the window header:

The operator button will appear in the header of the viewport window.

Now we can view a list of all the functions that add operators to the area header by the “_draw_funcs” property of the “draw” method.

Note that the “_draw_funcs” property would be defined only if custom operators have been added to the area header. If custom operators were not added to the header, an error will be thrown:

AttributeError: ‘function’ object has no attribute ‘_draw_funcs’