Results 1 to 4 of 4
  1. #1

    Custom Blender UI element with custom design

    Hello everybody,

    Is it possible to add a custom UI element to Blender with a custom, Python-defined design? For me that sounds like quite a basic task regarding how deep Python integration in Blender has gone. But I did not find any handy solution...

    Thanks very much in advance!
    Mythenmetz

    PS: Yes, that is part of the same project I asked a question a few days ago ( https://blenderartists.org/forum/sho...-a-Sound-Meter ; without reply yet), but (obviously) a totally different problem.
    Last edited by Mythenmetz; 18-Apr-17 at 18:25. Reason: The fact that it is impossible is what I wanted to know



  2. #2
    Member VincentG's Avatar
    Join Date
    Apr 2013
    Location
    Belgium, Brussels
    Posts
    598
    I see two ways to add custom UI element in Blender:

    1. OpenGL: you can draw with the opengl wrapper https://docs.blender.org/api/2.78b/bgl.html
    The preferred method because you do not need external libraries and this is very well integrated into Blender

    2. Use external UI libraries like Qt and GTK.
    It could not be easy to implement and will require a different setup/binary installation on each OS.



  3. #3
    Hm, for 2. I have basically no idea on how to tell Blender that my new Qt or GTK-widget exists or how to integrate it in the Blender interface. I understand how to draw using 1., but there stays the problem on how to tell the Blender GUI layout system that a new widget exists. That is important because otherwise my addon cannot know where to draw the widget without possibly overdrawing another one.

    The basic workaround would be to design a widget that does not integrate in the UI but is drawn on fixed coordinates somewhere on screen. That could become let's say context-dependent annoying.



  4. #4
    Member VincentG's Avatar
    Join Date
    Apr 2013
    Location
    Belgium, Brussels
    Posts
    598
    If your talking about widgets like button, dropdown, checkbox, etc : you can't create a new type from the bpy api.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •