Announcement

Collapse
No announcement yet.

Need script to replace all instances of a metrial with another material

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need script to replace all instances of a metrial with another material

    Hi all

    I have some objects that has material assigned with name "matA" this material has been copied few times and applied to different objects including some subobject. I want to replace all the "matA" in the scene with one new instanced "matB"

    how can I script this?
    Kind Regards,
    Morne

  • #2
    Don't need to script it, in the material editor at the bottom of the shader balls there is a button to replace scene materials with a different one. Otherwise there are material instancer scripts on scriptspot.
    Colin Senner

    Comment


    • #3
      hmmm I dont see the button you're referring to. If I mouse hover on it, what is it suppose to say?
      Kind Regards,
      Morne

      Comment


      • #4
        you don't need a script. like colin said.

        I've made a little tut for you.

        http://www.pixelschmiede.ch/download...stance_mat.swf

        hope it helps.

        best regards
        themaxxer
        Pixelschmiede GmbH
        www.pixelschmiede.ch

        Comment


        • #5
          I don't know if I really know what all went on in that little video, but that was a different trick I haven't seen before.
          Troy Buckley | Technical Art Director
          Midwest Studios

          Comment


          • #6
            Originally posted by Donald2B View Post
            I don't know if I really know what all went on in that little video, but that was a different trick I haven't seen before.
            this saved my a... many times. especially on big scenes when you merge a lot of objects into it and all materials are messed up. max does not always merge materials the right way, although the names are the same.

            best regards
            themaxxer
            Pixelschmiede GmbH
            www.pixelschmiede.ch

            Comment


            • #7
              Originally posted by themaxxer View Post
              max does not always merge materials the right way, although the names are the same.
              Cant count the number of times I look in my material list to see:
              'concrete'
              'concrete'
              'concrete'
              'concrete'
              'concrete'
              'concrete'

              all with different maps and shades!

              Comment


              • #8
                But does this work for materials\maps that also are part of complex multisubs as well?
                Signing out,
                Christian

                Comment


                • #9
                  http://3d-kstudio.com/scripts/trackscripts/

                  There is a scrpit in there that will replace all the materials with the same name, and make them instances. Works great for revit imported stuff.
                  Alain Blanchette
                  www.pixistudio.com

                  Comment

                  Working...
                  X