This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TOOL] PyWMO - Python lib to import / export WMO  (Read 4694 times)

Gamh

  • Contributors
  • Loreweaver
  • *****
  • Posts: 81
    • View Profile
[TOOL] PyWMO - Python lib to import / export WMO
« 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. There are some examples available if needed.

Bonus : PyWMO + 10 free mins :
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
Re: [TOOL] PyWMO - Python lib to import / export WMO
« Reply #1 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

Thanks for that amazing lib.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »