Giter Site home page Giter Site logo

acylsilane / atomic-blender-material-compactor Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13 KB

Atomic blender creates a lot of extra materials when importing molecules. This saves time by fixing the materials for you.

License: MIT License

Python 100.00%
chemistry blender blender-scripts

atomic-blender-material-compactor's Introduction

Atomic Blender Material Compactor

(C) 2020 James Dean

What is this?

Atomic blender creates a lot of extra materials when importing molecules. This saves time by fixing the materials for you.

Why should I use this?

Atomic Blender adds in a bunch of extra element materials every time a new molecule is imported. This can get kinda unwieldy when you're importing a lot of different molecules into a scene.

To fix the problem, this script finds the 'ball' objects created by Atomic Blender, and collapses their materials down into a single one. It's saved me probably dozens of hours of tedium in changing material names.

In effect, all your Element, Element.001, ..., Element.obscenely_high_number_here materials all get swapped to just Element. Which is useful if all you care about is a uniform look in your renders when it comes to molecules.

How do I use this?

  1. Run the code in compactify.py from the scripting window in Blender, and wait a few seconds for your materials to fix themselves.
  2. Use the time saved to make yourself a cup of coffee or something.

Known Issues

Make sure you understand this code before running it. It also goes without saying that you should probably back up your blender project when you run this, in case your materials get jumbled up.

That being said, this has a high chance of garbling up your object materials if:

  • You've already got other materials that share names with elements in your moleules (e.g. you've already got a material named Gold that you're not using for molecules)
  • You've already got other objects with "ball" or "Stick" in their name that weren't created by Atomic Blender

atomic-blender-material-compactor's People

Contributors

acylsilane avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.