gMaterial tool script

Discussion in 'Track Modding' started by Mario Morais, Mar 9, 2012.

  1. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Hi My last tool!

    Allows you to edit all materials of an object faster. You do not have to open and browse in materialeditor for a material ID in 24 slots.

    View attachment 2218

    How to install:
    is MAcroscript drag and drop to viewer

    How to use:
    Select object, press "read Material"
    All materials are listed.
    To edit the material simply click on the name.
    The slot 24 has to be free it is used to edit the material. Is created an instance of the material selected for the slot 24. So the changes are saved in the right place.

    Update v1 bugs fixed.
    Add button "fix Smooth" is a quick Autosmooth faces.


    version v1.1

    Bugs fixed..

    New :
    Geometry tool
    Can create Elements from Polygons.
    Select Vertex from Polygons or Elements

    Version 1.2
    Added import FastLine to max spline from AIW file.

    Version 1.2a
    Option to add CenterLine

    Version 1.3
    +Better AIW import thanks to MonSum
    +Fix Smooth ( put all geometry in group 1 and separate Elements)
    based on the script from alex
    + Copy map Channel to others


    Version 1.4
    + Intersect Polygons
    + Copy Material ( don't copy material name and stage 1)
    + Select double Faces ( don't work yet)
    + Clean Button now clean material list and clean internal memory of max (if max freeze wait 1 min).



    Download
     
    Last edited by a moderator: May 2, 2012
    1 person likes this.
  2. Kristoff Rand

    Kristoff Rand Registered

    Joined:
    Dec 23, 2011
    Messages:
    1,055
    Likes Received:
    10
    thank you for your generous contribution.
     
  3. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,407
    Likes Received:
    957
    Thanks Mario, unfortunately the link points to your GmotorDX_02 download. :(
     
  4. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    upS!!! sorry!
    is work now..! ..
     
  5. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    I forgot to include check if object is editable poly.. so the object must be Editable poly ..

    next version. will be correct
     
  6. les

    les Registered

    Joined:
    Jan 19, 2012
    Messages:
    256
    Likes Received:
    1
    great tool. i know nothing about scripting i wish i did is there a script that when you click on a area like the track to be able to bring up the sub materials for the let say the track road texture or even having a separate way to edit the materials in a script like track main racegroove spec and so on ??
     
  7. les

    les Registered

    Joined:
    Jan 19, 2012
    Messages:
    256
    Likes Received:
    1
    ok figured it out wow really nice tool ty for this
     
  8. feels3

    feels3 Member Staff Member

    Joined:
    Sep 4, 2011
    Messages:
    1,201
    Likes Received:
    142
    It's not working with 3ds max 2012 :(
     
  9. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    no working? what error you get?
     
  10. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    new version bugs fixed
     
  11. feels3

    feels3 Member Staff Member

    Joined:
    Sep 4, 2011
    Messages:
    1,201
    Likes Received:
    142
    MAXScript Rollout Handler Exception:

    Unknown property: "name" in undefined
     
  12. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169

    need more info. open the script in MAXscript editor then run the script. When you get the error the line in editor will be gray. copy the line and paste here
     
  13. feels3

    feels3 Member Staff Member

    Joined:
    Sep 4, 2011
    Messages:
    1,201
    Likes Received:
    142
    for subid=1 to matslot.count while findid == 0 do
    (
    --if (debug) then format "slot:% submat:% \n" slotid subid


    if ( (stricmp matslot[ subid].name submat.name) == 0 ) then
    (
    findid=slotid
    if (debug) then format "slot:% submat:% \n" slotid subid
    )
    )
    ) else
     
  14. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    try new version of script.


    The max 2012 have new materials editor. Can use the old material editor? i don't have max 2012 but maybe in internet i found a fix.
     
    Last edited by a moderator: Mar 11, 2012
  15. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    New version v1.1

    Bugs fixed..

    New :
    Geometry tool
    Can create Elements from Polygons.
    Select Vertex from Polygons or Elements


    Download in first post.
     
  16. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    New version


    Version 1.2
    Added import FastLine to max spline from AIW file.
     
  17. freew67

    freew67 Registered

    Joined:
    Oct 5, 2010
    Messages:
    303
    Likes Received:
    5
    Import fastline... now sir you have my attention :)
     
  18. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    Hm, that would mean you could spline-map the groove texture exactly to the fastline of the AI, correct?
     
  19. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    yes :) and is better use the real fastline.
     
  20. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Version 1.2a
    Option to add CenterLine
     

Share This Page