Inset

Wednesday, March 17th, 2010

Downloadable Files

This script Insets a selection of faces in your mesh.


Requirements

This script is written for blender 2.45 but should work with older versions as well


Settings

There is only one setting for the script and it will appear as a popup in your script window. The value is in blender units.

You want to make sure that the length in this is shorter than the shortest edge of your selection!!!


Usage

Select one or more (but not all) faces in your mesh, then run the script.

Pre Inset example

Post inset example:


Known issues

The script does not like poles!

It also doesn’t like Kinks


That’s it

That’s all for right now… I hope it’s as usefull to you as it is to me.

enjoy!
Dolf

Euler filter

Wednesday, March 17th, 2010

Downloadable Files

On this page you can find the Euler Filter script for Blender 3D.

It is meant to clean up Rotation IPO curves recorded with the game engine.


Requirements

This script is written for blender 2.48a


Use of the script

A lot of the time when you record motion in Blender’s game engine you get Curves that ‘Flip’.

This because Blender doesn’t like rotations above 180 or below -180 degrees.

Below here is an example of what a recorded curve may look like.

And here the result of a cleaned IPO curve


That’s basicly all there’s to it. It looks like the script does the job… enjoy!

Dolf

Caliper

Wednesday, March 17th, 2010

This script measures the distance between 2 points, and converts it to a real world equivalent.

It also can create a mesh and text object to display the result in a renderable format.
The script was developed commercially for: Render Reality LLC.

A big thank you to the company for allowing the script to be released under the GPL license!


Requirements

This script is written for use with blender 2.43 and up to 2.49.


The Gui


The Top

At the very top you can see what version of the script you are using.

In the results and messages block you normally get to see the measurement result.

In case of an error a message explaining the error should appear.


Object settings

Here you can set a nr of general things concerning the objects the script creates.

Text

When selected the script will create a 3d text object to display the measurement result.

Arrow

When selected the script will create a 3d mesh object to display what points were measured.

Clean

When selected the script will remove any previous measurement objects made between these two measured points.Will not work in case you renamed your objects after the last run of the script. May not work correctly if the object names are very long. May not work if you edited your meshes since the previous run. Cleaned objects won’t be truly removed until your save and reload your file twice!

Tip: if you deselect Text and Arrow but have Clean selected you can remove the measurement object and clean your scene.

Layers

In the block of small toggle buttons you can select on what layers the measurement objects should be created.

Color

In this dropdown box you can select what the initial color of the measurement material should be. The script will only create the material once. You can adapt the material after it has been created.


Arrow style

Arrow type

In the arrow type dropdown box you can select what arrow shape you want created.

Arrow alignment

Here you can set how the arrow and text objects for the measurement will align. The options are front, top, rear & bottom. If your measurement aligns to the left and you want it aligned to the right switch from front to rear or top to bottom to invert the objects.

Arrow scale

In the scale setting you set the relative size of the arrow object. The arrow will always stretch between the measured points. Changing the scale will make the arrow fatter or skinnier.


Text style

Bevel

Will set the bevel value for the created text object.

Ext

Will set the extrusion level (depth) of the created text object.

Size

Sets the size of the created text object.

Offset

Sets the offset of the created text object.

Tip:

if you create a larger arrow object you want to change this value.


Measurement settings

Measure the distance in

Here you can select what object types you want to measure between or in.

Measurement Constraint

Here you can constrain the measurement to a specific axis. So if you select X for instance only the distance along the x axis will be measured.

Tip Remember that when you do a “closest/furthest” measurement the script will first get the location and then constrain the result to that axis! So if you constrain along the x axis, you will still get the closest points but perhaps not the closest along the x axis!

Constrain objects

This option is only available if the measurement constraint option is active. When selected the created objects displaying the measurement will also align on the axis to which the measurement was constrained. The objects will be positioned relative to the point measured in the object/vert/edge/face you selected second. This selection can give you multiple options in the next box. Two objects Selecting this allows you to measure the distance between two object centers of selected objects.

Two meshes

Selecting two meshes gives you a nr of choices that should explain themselves. One mesh Selecting one mesh allows you not only to measure between some preset defaults but selected parts as well. You must select the parts in edit mode. Edit mode will be exited by the script!


Output style

In this section you set what measurement result format you want.

Measurement output type

Here you set the largest value you want to measure in.

Measurement levels

Only available if your largest value isn’t the smallest available or blender units. Here you set the smallest increment in your measurement result. So if your output type is in km and you set the levels to mm you might get: 1 km 1 m 1 cm 1 m

Measurement detail

Here you can select how much detail you want in the smallest increment of your measurement. If the smallest measurement is in inches the selector will allow you to set divisions, otherwise it’s how many digits behind the comma.


Input style

Here you set how a blender unit is interpreted by the script.

Measurement input type

You can set here to what base value the blender unit should be converted.

Scale

The scale value what a blender unit converts to in the base value.


Major functions

Here you can set what action the script should undertake.

Measure

When clicked the script will measure accoring to your settings and selections.

Exit

When clicked the script will exit. Alternatively you can click the escape button on your keyboard.


That’s it

Dolf

Bezier export

Wednesday, March 17th, 2010

Downloadable Files

This script exports bezier shapes from blender to an svg vector file.


Requirements

This script is written for blender 2.43


Running the script

There are no settings for the script. Set the Camera to your preferred angle. Select the bezier shapes you wish to export and run the script. A file selection screen will be generated where you can set, where you wish to export to and what filename it should be under.


Things to know

Remember that the export is orthagonal. This means that even though the camera angle is taken into account, there is no perspective in the exported result! Also all selected bezier shapes will be exported in their entirety. This means that the image size (camera area) is not used! One blender unit is translated to 100 points. A closed curve (circle) is exported with a solid black inside and no borders. A non closed curve is exported as a black line (1 point wide).


Examples

A bunch of bezier circles in blender

The exported result in inkscape


That’s all

Enjoy!
Dolf

Using python scripts

Wednesday, March 17th, 2010

This page is here to help you understand how to use basic python scripts in blender 2.4x.

It’s not about writing scripts, just using them.

I assume you know enough about blender to open windows, find menus, and open files in it.

I will only cover Windows on this page. I don’t have the other Operating systems handy. Also using scripts in the Game engine can be a bit different than how I explain here.


What is python?

If you really want to know everything about python you should go to python.org but I’ll give a simple description here.

Python is a programming language released originally by yet another Dutchman. I know they’re everywhere! You can read more about it’s history on this page if you want.

The thing that makes python unlike C or C++ for instance is that you don’t have to actually compile your programs. Basicly all programming languages are written in basic text. Programs written in C you would ’compile’, which would turn your code into a program that you can use and give to people. So for example with python you don’t generate a blender.exe file.

In stead the programming code stays in it’s basic text format, in what is really just a textfile, nothing more. This textfile can be read by a ‘real’ program which is called python as well (just like the language). This program then does all the things that it’s told to do in the textfile.

These textfiles are called python scripts. And scripts are files that tell programs what to do, they are not programs themselves. There are lots of other languages that work in the same way… like asp, php, and javascript.


The infamous blender startup message!

You may have seen this screen before and it scares a lot of people at first. I mean… it’s an actual bonafide error message…. or is it?

Do not close this screen!

This screen is used by blender to show you messages, if you close it you will close blender as well.

Let me try to explain where the message comes from.

We can use python scripts in blender. Now we can only do so because inside blender is a small version of the python program that can read these scripts, and do what they say. That’s where the first line comes from. Apparently the copy of blender that I took this screenshot from had python 2.5 put in it. The actual line of text is created by the python program in blender when it’s started. Now as the python program in blender is started (when you start blender) it has a look at itself and your computer to see what it can do, where it is, and basicly everything I do every morning when I wake up.

So it wakes up and finds out it’s the small version. Then it has a look to see if there’s a big version of itself on your computer that would allow it to do everything the big version can do. In this case it can’t find it, and all the other messages you see basicly mean: ’Hey I am only the small version inside blender, and I can’t do everything I could do if my big brother was here’. This is no reason for anyone to worry! Really it isn’t. The small version inside blender can do pretty much everything you want. Only for the really advanced stuff like communicating with big databases and such, would you need the complete version of python.

So we have blender, and we can use pretty much all python scripts released for blender in it. You can install a full version of python if you really need it, or if you want to get rid of those messages, but normally there really is no need. I use python all the time and don’t need a full version at all.


I downloaded a script… now what?

Ok so you have a script. Lets call it myScript.py, and remember that really all it is is a textfile. You can use the script inside blender in two basic ways.


One: Put the file in the blender scripts folder

If you put the script you downloaded in the same folder as all the scripts you get with blender you can use it as if its one of those official scripts. If you are on windows find the folder that has the blender.exe program file in it and there should be a folder called ‘.blender’. In that folder should be another folder called ‘scripts’. This is where all the official scripts are.

Once you put the file in there you can find it in the blender scripts menu. Don’t forget to use the ‘Update menus’ function at the top of the menu if you had blender already running when you put the script in the folder. As soon as you select the script in this menu it will ‘run/be executed’

If you are not sure where to find the script in this menu you can open it in a text editor (notepad for instance) and near the top it should say what group it’s in. That is where you’ll find it in the menu. If you can’t find the group, you’ll have to use the second way.


Two: Open the script as a textfile.

Save the script anywhere on your computer. Then in blender open a text window, and in there open the file like a textfile.

Now if you have your mouse pointer over the text window and you click ALT + P the script will run.


Having the right blender version.

Every script should tell you for what blender version it was written at the top of the script itself. There is no guarantee that a script will work if you have a newer or older version of blender than the one for which the script was written.


That’s it.

You should now know enough to use most python scripts in blender.

Have fun!
Dolf

Autosave Render

Wednesday, March 17th, 2010

Downloadable Files

This script will automaticly save every render you do as a sepparate version.

I wrote the script because I do a lot of test renders when working on a project. With this script every test render is automaticly saved, which makes for a nice progress storyboard.


Requirements

This script is written for blender 2.45


using the script

First you will want to open the script as a text file in a text window like below.

Now we set up a scriptlink that triggers the script to run whenever you render an image.

So at this point the script is ready to run, but we want to tell it where to save the images and with what filename.

I set it on windows, and I used a relative path (relative to the current file).
Notice also that I didn’t put in an extension, I set the filename as “myfilename” NOT as “myfilename.jpg”.
The extension will automaticly be added when a render is saved.
Also the script will automaticly add a number to the end of the filename and increment that number.
So you may get filenames as the following.

myfilename_0001.jpg

myfilename_0002.jpg

myfilename_0003.jpg

and so forth

If you change your image type or filename it will start counting over.

Unless you change it back ;) It just looks at what’s in the folder already.


things to be aware of

BE AWARE NOT TO ANIMATE WITH THIS SCRIPT ENABLED!

If you have the script linked and you animate it will save an image for every rendered frame!

As far as I know there’s no way to automaticly disable the script when animating, so you have to be carefull yourself!


That’s all.

enjoy,

Dolf

click here to close

Help keep these files free,
and support further development!