PaulGreen

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

2 Neutral

About PaulGreen

  • Rank
    Newbie

Personal Information

  • Specialty
    None

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. For possible future internet serach, this is from 2017, for an 2017 version of this WMO blender plugin. If plugin has been updated, the below is void, do not break your install or bug author after this then :3 Additionally, a few steps can be enacted to make other parts of import work. NOTE that for my purpose, I only am caring about import, not export of .WMO and related, so this only helps importing into blender. It seem that some file types have changed, but the plugin is still done well and working well, just with a few very small edits and steps. My goal is to import WMO file with all texture and objects without extra work, since I see that the plugin was designed to do this originally and saves much time instead of doing this manually every time. It turns out this is still possible, by some luck of the way the plugin was happen to be written originally, and some trivial hacking, by the following are done: First, is edit as above to fix import of WMO after cataclysm. Second, is use CASC extractor to extract all WoW data. I use Cascview by Zezula, additionally using the listfile packaged with Wowmodelviewr for filenames (not the Zezula download which is old).. Create a working directory for a work space, like C:\MineEdit then create "Data" and "patch-x.mpq' so directory is like C:\MineEdit\Data\patch-x.mpq\ . Extract all data into C:\MineEdit\Data\patch-x.mpq\ (Takes a very long time, and ends up with 75GB uncompressed data folder, lol. ) Create new any type of file ( like as text file) in C:\MineEdit and rename to "WoW.exe". Set "WoW Client Path" in the plugin to "C:\MineEdit" In blender plugin, open .\io_scene_wmo\m2\m2.py and find the class "M2File" and edit the constructor function: f = open(file, "r+b") if type(file) == type("") else io.BytesIO(file[0]) filename = file[1] To instead be: f_TEMP = open(file, "r+b") if type(file) == type("") else io.BytesIO(file[0]) f_TEMP.seek(8) f = io.BytesIO(f_TEMP.read()) f_TEMP = "" filename = file[1] (Not programmer, sure there's a better way than holding two copies of file in memory, but this is a hack, not monument to skill) Now, should work. To import a WMO and have textures and doodads be import automatic, it is important to copy WMO file to C:\MineEdit\Data\patch-x.mpq\ location. The WMO to import must be in this 'patch file' root path directory for pathing to find all the files. It looks like Warcraft no longer uses MPQ files, so auto-import from MPQ does not work, and all M2 files have had anew 'magic' number and file length integer prepended to the front of every file, not just new expansion files, but also have not updated offset numbers, so all offsets are off by -8 bytes as specified in the file, even new files. The 8 seek simply moves beyond the version and file length ints. Again, NOTE that exports will be broken, this only fixes imports.
  2. Import crashed on many models after cataclysm. I see that after cataclysm, optional "MOBS" chunk is added to group files, and a file with this chunk will not be read correctly. I modified wmo_group.py with simple test for the chunk that skips it if it exists, and models can now be imported correctly. MOBS function is of course removed, heh. ... self.monr.read(f) self.motv.read(f) self.moba.read(f) #Check for MOBS testMOBS = f.read(4)[0:4].decode('ascii') if testMOBS != 'SBOM': f.seek(f.tell()-4) else: testMOBSSize = struct.unpack("I", f.read(4))[0] f.seek(f.tell()+testMOBSSize) if self.mogp.Flags & MOGP_FLAG.HasLight: self.molr.read(f) .... Edit in this way, or add to plugin if it is appropriate.