how to generate custom layout and interact with it from python script
Just need a kick in the right direction here.

I'm quite new to making addons, but i've succesfully created 2 simple ones so far. Both do nothing more than generating lists of items and some functionality behind it (like generating a new list or play an audio stream).
What i'd like to do now is create an addon with a more complex layout then just a list. Something that look like this:

A frame on the right with a list; a visual/video in the top-left and information about the video in the bottom-left. When i try to find information how to do this i only find pages about skinning, but it is unclear to me how i create the skin/template/layout and then interact with it from my python script. Can someone give me a kick in the right direction?
Creating custom layouts in addons is kind of a pain. You have to either come up with a generic enough look that it doesn't look out of place, or create a version for every skin.

You're finding everything about skins because skins are essentially addons that display information from other addons. Here's the python information you're looking for:

You can create a window or dialog in python from scratch by creating a window/dialog object, then creating controls (such as buttons), then adding the control objects to the window object. Once it's assembled, call the window object's .show() method to display it on screen.

You can also create a base window in xml, then manipulate it in python by creating a WindowXML (or a WindowXMLDialog) object and passing in the name or your xml file. This way, if a skin author wants, they can override your xml with their own version that looks good with their skin. See the skinning manual: for how that works

The difference between a Window and a Dialog, is that Windows clear everything off screen before being shown, so if you didn't add it to your window, it's not there. A Dialog is drawn overtop of what's already onscreen.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
how to generate custom layout and interact with it from python script00