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] Blender 2.5+ WMO import/export script  (Read 17145 times)

Draakbeest

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 1
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #30 on: May 28, 2014, 11:39:29 am »
I get this error when importing! Am I doing something wrong?

Code: [Select]
Traceback (most recent call last):
  File "C:Program FilesBlender FoundationBlender2.70scriptsaddonsio_scene_wmo__init__.py", line 65, in execute
    import_wmo.read(self.filepath)
  File "C:Program FilesBlender FoundationBlender2.70scriptsaddonsio_scene_wmoimport_wmo.py", line 51, in read
    group.Read(f)
  File "C:Program FilesBlender FoundationBlender2.70scriptsaddonsio_scene_wmowmo_group.py", line 71, in Read
    self.mobr.Read(f)
  File "C:Program FilesBlender FoundationBlender2.70scriptsaddonsio_scene_wmowmo_format.py", line 1125, in Read
    self.Header.Read(f)
  File "C:Program FilesBlender FoundationBlender2.70scriptsaddonsio_scene_wmowmo_format.py", line 17, in Read
    self.Magic = f.read(4)[0:4].decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128)

location: <unknown location>:-1
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #31 on: June 06, 2014, 04:43:11 pm »
Thank you for this tool happyhack.

My custom wmos works fine with collision and everything but the script ignores lights/vertex color when exporting.

Any way to add lights to my custom wmos without using m2 light models?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

TheBuG

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 469
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #32 on: June 08, 2014, 10:22:45 am »
Quote from: "Kiun"
Thank you for this tool happyhack.

My custom wmos works fine with collision and everything but the script ignores lights/vertex color when exporting.

Any way to add lights to my custom wmos without using m2 light models?

If I recall correctly, there is currently no way to add lights to custom WMOs.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

iindigo

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 198
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #33 on: June 08, 2014, 06:15:11 pm »
You could always do it with M2 lights instead of vertex lighting.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #34 on: June 10, 2014, 02:45:18 pm »
Right now I'm trying to add m2 lights as doodads to wmos because they are very buggy for indoors if are added with Noggit or as gameobject.

The problem is that I don't know how to add doodads to custom wmos.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ohai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 172
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #35 on: September 11, 2014, 04:24:25 pm »
having this error, not reading path to .wmo or what?



http://imgur.com/AzqbFu6
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #36 on: September 11, 2014, 04:33:38 pm »
As it says: that path does not point to a file.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ohai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 172
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #37 on: September 11, 2014, 04:41:20 pm »
EDIT: Happyhack told me to put all bloodelf_smallhouse02_xxx.wmo-s in the same folder that was my problem.

Altho it didnt open it at first cos I was using some 2.62 blender version for it, tried with newest v71 and it opened. yay :!:  :!: !
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ohai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 172
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #38 on: January 16, 2015, 05:21:43 pm »
tho got a new problem now, is there any way for it to export one single WMO with geosets? becuase if I check each box 'wow WMO group' on each layer it just pops out smallhouse_00 smallhouse_01 smallhouse_02 etc. If its unchecked it gives an error tho, just wondering if theres some way cos I would need that 1 wmo to swap it ingame
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

innom

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 1
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #39 on: January 17, 2015, 10:41:57 pm »
Latest error:

UnicodeDecodeError: `ascii` codec can't decode byte 0xa3 in position 0: ordinal not in range(128)

Problem only occurs in newer map regions, such as "Stormwind Trade District" or anything from Draenor.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Pinkhair3d

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 62
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #40 on: January 25, 2015, 04:53:33 am »
I am also having some errors.



Okay, further testing shows that this seems to be happening with cata+ wmos so far. I've been able to get a few older ones working.

Notably, old stormwind and orgrimmar load easily enough, but the later versions have the error with the struct reading the wrong number of bytes.

Also, it seems to require 2.7, not 2.5. Not a problem but figured I should mention it =P
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Bravelad

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 43
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #41 on: February 21, 2015, 12:11:55 am »
This script does not work well with Cata+ WMOs.

Is there any chance of it being updated to import the new WMO structure? I would appreciate it immensely. 010 editing WMO group files to be able to import them is not very fun or efficient.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Skarn

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 807
    • View Profile
    • http://skarn-project.net
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #42 on: February 21, 2015, 07:31:21 am »
You can also use Tintai tools to get wmo from any version to .obj and port it back to .wmo using MirrorMachineQT. You will use some stuff like lights then, but it will be working.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Bravelad

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 43
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #43 on: February 21, 2015, 10:06:09 pm »
Quote from: "Skarn"
You can also use Tintai tools to get wmo from any version to .obj and port it back to .wmo using MirrorMachineQT. You will use some stuff like lights then, but it will be working.

Thank you very much! I have used MM before so I will definitely look for Tintai tools. :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Supora

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 143
    • View Profile
Re: [TOOL] Blender 2.5+ WMO import/export script
« Reply #44 on: April 27, 2015, 06:35:46 pm »
Hooray I've finally get some positive results!
I've make some more trials to make some python code without exactly understanding it. LOL
Seems that now vertex colors are exported but It didn't set the flag HAS_MOCV so you need to change it via hex yourself. Just after conversion wmo will have flags 09 so change it to 0D and test your vertex colors.
There is the script

Just unzip it to io_scene_wmo folder in your blender scripts folder.
[attachment=0:28se7i57]io_scene_wmo.rar[/attachment:28se7i57]
Don't forgot to backup your WMO's before exporting.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »