Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Material Works script - Search & Replace materials, and more

19

ss.jpgHere's a great time-saving tool created by Vaclav Chaloupka. It's been created to allow fast searching of materials in a scene with the ability to easily replace them with another material. But, that's not all it can do.

Here's a listing of its features:

  • Search for a material in all objects and replaces it with another material.
  • NEW! Reduce the script to all/visible/selected objects.
  • Rename materials in a list of all materials - no need to go the the object.
  • Show who is using the material.
  • Calculate the sum of surface areas using material. NEW! - calculating real (scaled) object area.
  • NEW! Assign material to selected faces or objects.

Vaclav writes:

...[my Blender]project was becoming quite messy, with multiple copies of same material with different names. Changes sometimes did not apply to all intended objects. Then I started to create multiple scenes, made some meshes single-user, and I've got even more copies of material.

I've spent some time going to each object, scanning through the material index and changing it manually - the OOPS spaghetti did not help much. I thought there must be a better way - Python, but I could not find a script that would do that - so I wrote one...

You can get more details on his webpage.

19 Comments

  1. Is there anyway to rename objects like this. When I create objects and then duplicate them I end up with .001 for the copy when I'd rather have them renamed .l or .r. A script like that would help a lot.

  2. I think this is one of the very good reasons why the Blender UI should be re-wrighten.

    Thanks a lot for the Script!!! very helpful!

  3. Awesome... i too vote for integration in blender! (perhaps during the UI refactor of 2.50? would be a nice time to do that)

  4. Cloudsk!pper on

    I hope the GUI will be same, but in a more logical order =)
    and I dont want a GUI like 3d Max or Cinema ...

  5. I don't really care if you change the UI, (although some change would be nice), but this appears to be a very nice script. Even if it isn't integrated into blender, it looks like it makes managing materials much easier. If it can't be easily integrated (written in C/C++ and included), then perhaps included as part of the standard set of python scripts included. I haven't done a lot of testing, but it does seem to be very useful.

  6. Well, it would appear that the Glass Buttons theme from another very recent thread and this script don't get along at the moment. Blender will crash if you try to use this script with the glass buttons patch.

    Thanks for the quick reply, Vaclav.

  7. It seems that the glass theme build crashes when the python script reads the Theme (the script is using it to draw the buttons and text in the theme colors - so it apeers integral to the gui).

    Until the glass patch gets fixed, I've done a quick-fix - script that uses default hard-coded colors for the buttons and text. If you are a stubborn glass theme user, you can get the modified script on http://blender.chaloupkovi.cz/material_works_4glass.py

    Bruxy

  8. it would be convenient if we could order things in the outliner as well, by dragging. and disconnect things in the OOPS window (outliner).

    This script could be very handy to me, for the moment I use very little materials, so I can oversee it, but this script could be very helpfull to me in the near future.

  9. Thanx Man!!

    What a fantastic script.
    I am working on a complicated model and I had to replace materials.
    This worked like a charme and saved me a lot of work.
    This should be integrated as a feature into blender.

    Great job!

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×