https://lists.blender.org/pipermail/bf-committers/2018-June/049492.html
awesome 
Nice thread necro… however I see there is a lack of Python API threads related to 2.8 so I’ll comment.
Is the long term plan is to abstract away OpenGL for just python API? Or is this going to be for an abstraction layer between Blender and OpenGL to more easily facilitate alternatives to OpenGL (Vulcan, DirectX, Metal, etc.) down the road?
Related to that, are there any plans for an easier way to create/draw custom controls in UILayouts of panels? Right now it is a big pain in the ass with very hacky continuously running “modal” operators for input and bgl for drawing combined with ctypes and as_pointer to do introspection of said layout in order to properly “insert” a custom control. Blender has always seemed very lacking with regard to custom controls/UIs.
A custom control class that handles events and drawing would be welcome. Really rough example:
class Example(CustomControl):
bl_idname = "EXAMPLE_CT_custom_control"
#... register, unregister - set/clean up default control state, custom shaders, etc.
@classmethod
def poll(cls, context):
# ... Valid context for custom control? Optional.
def calc(self, layout_info):
# ... Return metrics to layout. Optional. For example custom height.
def input(self, context, event):
# ... Check input events, tag_redraw() if needed, return state (focus, defocus, etc.)
def draw(self, context, theme):
# ... OpenGL drawing, text, easy access to theme colors, etc.
class ExamplePanel(Panel):
# ...
def draw(self, context):
self.layout.custom_control("EXAMPLE_CT_custom_control") # or Example.bl_idname
It would allow addon creators to build cool stuff like custom graph editors, 3D graphs, multi-line text fields, generative operator inputs like shapes or profiles, custom asset fields, custom previews, etc.
As a side note, I would love to see pillow included with Blender’s default python environment (as numpy has been).