Topic: Simple blender scripts to help you

Hello ! i made some scripts to automate some tiring tasks in blender.

Most of them were done with the try-fail-repeat method and some parts taken from other tutorials about scripting
mostly found on BlenderArtists forums

To use them, you must load them in a blender text editor window, then press right click -> run script (or press Alt+P on top of the text window)

Compatible with 2.68


Add Material

Adds a 4 slotted material to the object in focus.
The slots are 1- Diffuse / 2- Specular / 3- Normals / 4- Emit, to match maratis specs.
All slots settings *should* be fine (neutral settings).
-> I deactivated Texture Interpolation in this script
-> Premultiply Alpha name has changed, and i didn't enabled it in the script


Insert a texture to an already existing material

Adds a texture to the material of the object you have in focus
Unfortunately i was unable to choose the slot where the texture is added.
-> The texture must already be "loaded" in the current blender scene before using the script or it won't work


Single Slot Material + Alpha Texture

Sometimes i need a quick material with an alpha texture, this scripts add a
quick one-slotted material and loads a texture on it.
-> You must edit the script and set your own path to your texture


Apply Transformations

Apply all transformations at once (location, rotation, scale)


Enable Modifier to all objects in selection
Apply Modifier to all objects in selection

This one is not pretty at all : i forgot how to enable + apply them in the same script.
I choose Array in this script but of course you can do the same with any available modifier,
you just need to change the modifier name


Origin to geometry for all objects in selection

That's it



Example of usage : Make walls out of a single plane,
make borders out of a wall
-> Gonna add a screenshot or two later on, guess it's pretty unclear atm =p


Set-up Maratis Animations

Set Maratis animations by script instead of manually (thanks anael for this smile)
-> Script is just an example, you obviously need to edit and set your own values


Texture Anim (Simple Scrolling)

You just have to set the path to your texture,in "realpath = os.path.expanduser('C:/Path/To/YourTexture.png')" 
-> Important : use "/" instead of "\"

To come (already made but i must verify them)

• Texture animation (spritesheet animation)

Re: Simple blender scripts to help you

Going to look through these when I get a chance thanks! (I was just working on texturing a level) hehe