[WIP] LeafLock
Posted: Sat Jun 15, 2013 3:54 pm
Hey everyone! In light of all the cross-pollination between the MGM and OC communities (as well as the need to make breaking changes in my Quickbeam project) I am beginning a new project. It will be in the vein of Quickbeam, but designed to be cross-platform compatible with Mac computers.
Quickbeam was named after the common tongue translation of the name of Bregalad the ent. He got his name when Treebeard declared him 'hasty' for answering a question before another ent had finished asking it. I gave the project that name because it was intended to read Entity-style plugins (.ent) and was originally a hastily thrown-together experiment. I'm actually surprised it survived so long.
Moving forward, the project will be primarily authored in Python and will be given the name LeafLock, the common tongue translation of the Finglas the ent's name.
Here is where development currently stands: Using the Cython C-extensions for Python, I have created code which reads in raw data and interprets it as C-structs. Cython objects (half C, half Python) use these structs to expose Halo datatypes to the Python environment.
These objects rely on a 'ByteAccess' interface which can be reimplemented to allow editing on-disk as well as in Halo's memory, just as with Quickbeam.
http://i.imgur.com/1ocrolf.png
The next step is to allow Entity-style plugin support. I intend to use Python's lxml library to read and interpret Entity plugins and define Python classes based on them. These classes will allow interpretation of raw metadata as the tags we are used to: weap, bipd, effe, etc. My goal here is to recreate the functionality of traditional meta editors and reference swappers, but to expose it through a scripting interface.
At this point, LeafLock will be no more than a cross-platform Python script. I will be looking into exposing some sort of usable REPL, maybe using IPython.
http://i.imgur.com/FPzEFXq.png
Once the Python scripting API is in a workable state, I will investigate creating a GUI. I have more experience with WPF, and I like the concept of 'data-binding' that it so readily supports. With a combination of Cython and C++/CLI I will expose Python datatypes to C# and create a GUI which allows some manner of editing tags. I will also investigate embedding a Python REPL.
The Mac GUI is in territory that's more uncharted for me, but nil has informed me about the PyObjC library which allows seamless Python-ObjC interop. With that library it is possible to create Mac GUIs with only Python. We'll see how that goes.
http://i.imgur.com/w6RTiic.png
Lastly, I have been thoroughly impressed by the d3.js library and would love some way to create HTML5-based design of editor controls. Since the XML plugins will be defining how Python can edit metadata, I think I will use XML plugins solely for defining what edits can be made, and allow editor customization through HTML instead. I could host a local webserver using Python, then connect with an embedded WebKit view. The Xilium.CefGlue project provides full Chrome embedding for Windows, and I will look into Mac options.
http://i.imgur.com/q2ZnQXf.png
I will need to look into the security concerns, but in the far future I plan on allowing Forge-like shared editing by communicating edits across clients. Since all edits will be made through the Python API, it would only be a matter of sending plaintext scripts to the other clients.
At the very least, I will be looking into CSS* edits for server-side scripting of mods.
*Cascading Server Side, aka "joiner friendly"
Thanks for reading and happy hacking!
Quickbeam was named after the common tongue translation of the name of Bregalad the ent. He got his name when Treebeard declared him 'hasty' for answering a question before another ent had finished asking it. I gave the project that name because it was intended to read Entity-style plugins (.ent) and was originally a hastily thrown-together experiment. I'm actually surprised it survived so long.
Moving forward, the project will be primarily authored in Python and will be given the name LeafLock, the common tongue translation of the Finglas the ent's name.
Here is where development currently stands: Using the Cython C-extensions for Python, I have created code which reads in raw data and interprets it as C-structs. Cython objects (half C, half Python) use these structs to expose Halo datatypes to the Python environment.
These objects rely on a 'ByteAccess' interface which can be reimplemented to allow editing on-disk as well as in Halo's memory, just as with Quickbeam.
http://i.imgur.com/1ocrolf.png
The next step is to allow Entity-style plugin support. I intend to use Python's lxml library to read and interpret Entity plugins and define Python classes based on them. These classes will allow interpretation of raw metadata as the tags we are used to: weap, bipd, effe, etc. My goal here is to recreate the functionality of traditional meta editors and reference swappers, but to expose it through a scripting interface.
At this point, LeafLock will be no more than a cross-platform Python script. I will be looking into exposing some sort of usable REPL, maybe using IPython.
http://i.imgur.com/FPzEFXq.png
Once the Python scripting API is in a workable state, I will investigate creating a GUI. I have more experience with WPF, and I like the concept of 'data-binding' that it so readily supports. With a combination of Cython and C++/CLI I will expose Python datatypes to C# and create a GUI which allows some manner of editing tags. I will also investigate embedding a Python REPL.
The Mac GUI is in territory that's more uncharted for me, but nil has informed me about the PyObjC library which allows seamless Python-ObjC interop. With that library it is possible to create Mac GUIs with only Python. We'll see how that goes.
http://i.imgur.com/w6RTiic.png
Lastly, I have been thoroughly impressed by the d3.js library and would love some way to create HTML5-based design of editor controls. Since the XML plugins will be defining how Python can edit metadata, I think I will use XML plugins solely for defining what edits can be made, and allow editor customization through HTML instead. I could host a local webserver using Python, then connect with an embedded WebKit view. The Xilium.CefGlue project provides full Chrome embedding for Windows, and I will look into Mac options.
http://i.imgur.com/q2ZnQXf.png
I will need to look into the security concerns, but in the far future I plan on allowing Forge-like shared editing by communicating edits across clients. Since all edits will be made through the Python API, it would only be a matter of sending plaintext scripts to the other clients.
At the very least, I will be looking into CSS* edits for server-side scripting of mods.
*Cascading Server Side, aka "joiner friendly"
Thanks for reading and happy hacking!