Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Resources and Tools => Topic started by: Eluo on August 22, 2011, 09:54:00 pm

Title: [TOOL] [M2 edit] model resizer
Post by: Eluo on August 22, 2011, 09:54:00 pm
ModelResizer by Tigurius

About this tool:.
This tool allows the user to resize a model by a given value.

Additional Info:
1 = equal
0.5 = 50% of the size
2 = 200% of the size

This is a commandline tool, so use the cmd console!

Download:
[attachment=0:2glh14mn]modelresizer.rar[/attachment:2glh14mn]


External:

File-upload.net (http://www.file-upload.net/download-3681473/modelresizer.rar.html)
Mediafire.com (http://www.mediafire.com/?5a741b2rd0wgoka)
Title: Re: [TOOL] [M2 edit] model resizer
Post by: Vel on August 22, 2011, 10:44:58 pm
Warning:
This tool does not resize Animation coords!
------
In this case, you must use Tigurius python Resize Script:
How to use:
* Open Resizer.py in notepad  Worldpad or other TXT editor.
* Edit 3 lines:


1) The way to model m2 = M2File (Specify your path):
Code: [Select]
m2 = M2File("E:\Tools\V50pymodeleditor\pymodeleditor\16.m2")

2) Path to saved model(Specify your path):
Code: [Select]
m2.write("E:\Tools\V50pymodeleditor\pymodeleditor\16.m2")
3) Amount to be changed resize factor:
Example:
Code: [Select]
scale = 0.02  (Reduced 50 times) (needed for MDXconv)

4) Save and close Resizer.py

* Run Resizer.py
* Profit!

----------
Do not change the size of which:
* Camera Coords
* Particles Size
* Ribbons Size
* Boundbox
----
Modifies size:
*Bone animations coords
*Bones coords
*Geosets Coords

NOTE:
Script Python requires (preferably 2.6, at others not tested)

Special thanks to Tigurius for script  8-)
Title: Re: [TOOL] [M2 edit] model resizer
Post by: Zim4ik on March 24, 2012, 11:41:22 am
This pyton script work not well. It dont resize attachments.
to fix this just replace
Code: [Select]
for i in m2.bones:
i.pivot.x *= scale
i.pivot.y *= scale
i.pivot.z *= scale
for j in i.translation.KeySubs:
for k in j.values:
k.x *= scale
k.y *= scale
k.z *= scale
with
Code: [Select]
for i in m2.bones:
i.pivot.x *= scale
i.pivot.y *= scale
i.pivot.z *= scale
for j in i.translation.KeySubs:
for k in j.values:
k.x *= scale
k.y *= scale
k.z *= scale

for j in i.scaling.KeySubs:
for k in j.values:
k.x *= scale
k.y *= scale
k.z *= scale

in resizer.py
Title: Re: [TOOL] [M2 edit] model resizer
Post by: spikee on December 11, 2012, 09:54:10 pm
I need the Tigurius python Resize Scrip , please give me :S
Title: Re: [TOOL] [M2 edit] model resizer
Post by: Ascathos on December 11, 2012, 10:24:04 pm
Quote from: "spikee"
I need the Tigurius python Resize Scrip , please give me :S
... Are you for real ?
Title: Re: [TOOL] [M2 edit] model resizer
Post by: Kiun on May 19, 2014, 12:59:33 pm
May someone reupload Tigurius resizer script, please?
Title: Re: [TOOL] [M2 edit] model resizer
Post by: MR. Farrare on May 19, 2014, 06:15:39 pm
Quote from: "Kiun"
May someone reupload Tigurius resizer script, please?
np problem friend http://www10.zippyshare.com/v/68191451/file.html (http://www10.zippyshare.com/v/68191451/file.html" onclick="window.open(this.href);return false;)
Title: Re: [TOOL] [M2 edit] model resizer
Post by: Kiun on May 20, 2014, 12:15:25 pm
Thank you Mr.Farrare.

I did what Vel and Zim4ik said to fix the script, it scales fine but messes up some animations:

(check file comments)

Is this normal?

EDIT - The problem was that the m2 wasn't properly converted.
Title: Re: [TOOL] [M2 edit] model resizer
Post by: leeviathan on October 18, 2015, 06:12:49 pm
Looking for this, links are broken. Does anyone still have it on hand?