Modcraft - The community dedicated to quality WoW modding!

Projects => Software Development => Topic started by: Gamh on August 08, 2013, 07:43:44 pm

Title: [TOOL] PyWMO - Python lib to import / export WMO
Post by: Gamh on August 08, 2013, 07:43:44 pm
Hey guys, I wrote a small lib in Python to import and export WMO. It's very simple and doesn't have OOP features to keep it simple, as it's mostly aimed on scripting and testing stuff. Some functions or an OOP wrapper should be totally doable anyway.

Please note it's the first thing with 1k+ loc I wrote in Python so there may be a lot of design flaws. I'm open (and willing) to any suggestions or even contributions as long as they fit the kiss philosophy of the module.

Also, note that it's _raw_ import and export ! Give it a file, it gives you the parsed data. Give it data, it gives you a file. It won't perform any check on the data semantic, won't rebuild your BSP tree, won't even check if there are MOHD.num_groups WmoGroup objects. You're warned.

It's available here (https://bitbucket.org/shgck/pywmo). There are some examples available if needed.

Bonus : PyWMO + 10 free mins :
(http://egamh9.net/misc/wow/tests_wmo/sidcraft.jpg)
Title: Re: [TOOL] PyWMO - Python lib to import / export WMO
Post by: Garthog on August 14, 2013, 03:57:44 am
First script made out of it WMO Light Adder. Permit to add lights and print informations of existing lights.

Here's the code : http://pastebin.com/UytKL9ze (http://pastebin.com/UytKL9ze" onclick="window.open(this.href);return false;)

Thanks for that amazing lib.