Python -> New Skinning Engine Interface
#1
i've been noticing some pretty sweet things going on in the new skin interface

animations,
control groups,
conditional visibility,
font effects, etc...

lots of stuff that as a python dev i am kinda jealous about. rather than try to port all of this stuff would it be possible to rig an interface between python and the skinning engine in which python can generate the skin xml?

similar to python accessing builtin commands and httpapi.
thanks.

-ast
Reply
#2
i suggest the way to do it would be via a guipythonwindow::load() function.

i'm not sure exactly what python will need - one presumes that it would have to create all the python versions of the controls as well as the xbmc versions of the controls.

this imo seems like the best way to handle things - you then get anything added to the skin engine.

perhaps darkie has some ideas of how this could be done?

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
we could add a load function to load xml files.
however, i thought about this before, but i don't think this is that usefull (except that skinners seem to have a better idea of xml skinning than skinning with the python gui system).
after you load a xml file, you would still have to get references to some controls in that xml file to let the script interact with the gui.

so two options, create the entire gui in python, or create the gui in a xml file, load it with python, and get references from all the controls you want to interact with (python code).
i was always for the first system so never implemented xml loading (the python xbmc and xbmcgui module would also need a cleanup for that), but if there is intrest for it we can always figure something out.

on the other hand, having xml loading in place would also make the python module interface much easier. no need to update the python interface anymore when new additions to the skin system are made. (not that it is 100% synced at this moment, but still Smile )
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
i'm not a python dev or anything, but i've done a fair bit of skinning, i think it would be cool to use the standard xml format if only so skinners can very easily skin a script to match just about anything without relying on the python dev to do it.
Reply
#5
some controls in python though have to be generated programmatically (like the epg for mytv or the blocks i'm using in a tetris script). even for these they can still use an external skin xml for placement references to facilitate custom skinning.

an external skin xml file for positioning and navigation is just as easy as doing it in python but i am really interested in the new controls / effects. perhaps the xbmcgui.control can be beefed up to get/set the xml properties?

hmmm would it be easier/possible to have a mapping of all controls into a single simple get/set interface? this would make adding new control support to python much easier (for instance those spinner values in my settings would be useful).
Reply
#6
there's tetris?

where? :d
Reply
#7
any and all ideas can be considered.

one idea i've had is to add a control creation function that takes in xml as it is laid out in the skin, rather than the individual parameters. we then use the existing code in guicontrolfactory::create() to create the control. sending it in xml means that we don't have to add any extra functions for setting new stuff for python at a later date.

getting the information out again is trickier, however this is possibly less useful?

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
wish i was more aware of python in general, but if you could create xbmc functions from python where the skinner could then use these from <info>, <onclick>, etc. that would mean it could be skinned exactly like everything else...and it would benefit from the full power of the skinning engine all the time. not sure how possible it would be, or how fast for that matter, but if the functions were parsed by xbmc and loaded to mem at script launch so they were already in mem and ready to go it doesn't seem so bad...any thoughts on something like this?
Reply

Logout Mark Read Team Forum Stats Members Help
Python -> New Skinning Engine Interface0