Canvas or User Area for Scripting

Hello,
I’m new to scripting in Blender and I was curious if there are a few UI elements:

  1. A floating Window
  2. A component like HTML’s Canvas used for drawing pixels to a Panel. I’d like to create my own interface by drawing the buttons & bitmaps myself.

Thank you!

1 Like

AFAIK no to the both it those I’m afraid.

1 Like

Not supported by the API, but you could perhaps try to create a new window from python, you could also hijack drawing function from blender interface drawing code, most of blender interface is written in python

In my plugin i hijack the addon preferences menu

gfbc

2 Likes

Thank you for the replies.

So how is an add-on like X-Pose Picker working?

It seems to have both a floating Window and a canvas for drawing bitmaps.

looks like it’s a separate exe?
i might be wrong

1 Like

That sounds right. That would explain this:

One to rule them all… Thanks to its design, X-Pose Picker can be easily ported to Unreal Engine, Maya or other programs supporting scripting and TCP/IP protocol. Use your favorite picker in the whole production pipeline.

How would an .exe be able to interact with objects in a .blend file?!

1 Like

It says right in the quote: scripting and TCP/IP protocol. Blender add-ons have the full power of python, so you can run a separate exe and communicate with it via some inter process communication method, like TCP. The add-on practically turns your blender into a local web server to which the exe can connect to (or the exe is the server to which your blender connects).

Simply put:

  1. User clicks something in the custom executable.
  2. Exe sends request to the add-on running within blender.
  3. Add-on listening for requests, does as the request says.
  4. Things change in your blender/file accordingly.
2 Likes

Thank you @ELFoglalt, for the explanation.

1 Like