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] [M2 edit] model resizer  (Read 6228 times)

Eluo

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 509
    • View Profile
[TOOL] [M2 edit] model resizer
« 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
Mediafire.com
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
One is a genius, the other\'s insane!

Vel

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 340
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #1 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-)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
is no more

Zim4ik

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 407
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #2 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

spikee

  • Registred Member
  • Race Changer
  • *****
  • Posts: 30
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #3 on: December 11, 2012, 09:54:10 pm »
I need the Tigurius python Resize Scrip , please give me :S
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #4 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 ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #5 on: May 19, 2014, 12:59:33 pm »
May someone reupload Tigurius resizer script, please?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

MR. Farrare

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 963
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #6 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #7 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

leeviathan

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TOOL] [M2 edit] model resizer
« Reply #8 on: October 18, 2015, 06:12:49 pm »
Looking for this, links are broken. Does anyone still have it on hand?