Category Archives: Blender 3D

Using bpy module to select and active some objects

Today I will show something about Blender 3D scripting.

The last version of Blender 3D use Python 3.

This told us : you need to know how to programming in python language.

After you start the Blender application go to Scripting Mode.


The blender application will change the windows and make all for you.


The Blender 3D application use bpy module to deal with all blender stuff.

The bpy module come with some python modules.







The Blender 3D come with autocomplete source code (Ctrl+Spacebar keys) and can be change from Blender 3D menu

File – User Preferences – Input

Let’s try some examples…

I created one python script for selection and make active object.

First rule about selection is: only one can ever be active at a time, but you could have many objects selected .

See the script: the next line will make active the Camera object.

This will show us the active object. In this case will show us : Camera.[‘Camera’]

The next lines of python source code allow me to:

select all or deselect all objects in the scene:

deselect all objects

select all objects

You can select the object by type: ‘MESH’, ‘CURVE’, ‘SURFACE’, ‘META’, ‘FONT’, ‘ARMATURE’, ‘LATTICE’, ‘EMPTY’, ‘CAMERA’, ‘LAMP’, ‘SPEAKER’.

Also you can select some Blender 3D windows feature.

Let’s change the window mode from 3D windows.

You need to select the default cube or another editable object and use the next line of python source code.

I selected just two objects and will make one list.

Now I will print collect selected objects.

Using for and if we can use all selected objects:

You can try also on your Blender application.

I will come with more complex examples in the future.

Posted in All, Blender 3D, Programming, Python. Tagged with , , , , , .

Using Ivy Generator with Blender 3D version 2.64

I used this addon with blender 2.64 and working well.

I don’t think will be problems with the last version of blender : 2.66 .

To using the Ivy addon , you need to activate this from user preference.

Search the addon “ivy” and check to activate this plugin. See image:


The next step is to add the ivy to mesh. Just press Shift+A keys and select the ivy .

The ivy will be create on cursor point. Select your mesh and point of ivy.


The next step is to make settings for ivy.This is my settings fro the final result.


The ivy will be created with roots and leafs.

Also will need to set two materials for this.

This is the the output :


Posted in All, Blender 3D. Tagged with , , , .

The Extra Objects addon – blender 2.65.

The addon can be found and enable it by using File->User Preferences->Addons.

blender extra-objects addon gem diamond

After you enable this addon.

Just use the keys: Shift/A->Mesh>Extra Objects Menu.

You will see two type of objects.


blender extra-objects addon gem diamond


blender extra-objects addon gem diamond

This is the objects will see in 3D View.

blender extra-objects addon gem diamond

Let’s make a render of this objects.

blender extra-objects addon gem diamond

You can press the key T to bring up the toolbar and you can set all the mesh options.

Posted in Blender 3D. Tagged with , .

Old tips and tricks with Ogre and Blender.

Blender is an open source 3D content creation suite.

Ogre 3D is an 3D library for multiple desktop and mobile platforms.

But is a problem between this tow way.

The last Blender 3D not have yet a script to export the mesh to last Ogre 3D.

What we can do ?. It’s a simple way to make all working.

Use old version of this two and you can also use old video cards.

After you make all settings of code::blocks to use all Ogre librarys, you need to use some tricks.

First , in your source code you need to tell about this:

This means the all three files is using by 3D engine.

On Linux first file – plugins.cfg it is on my distro:

But is because I use an very old video card.

Let’s see the next file – ogre.cfg.

As we see it’s easy way to set some settings like 600 x 400.

The ogre.log it’s use to show the problems.

Let’s see another step in source code:

This load the file – resources.cfg.

Let’s see this file:

The YOUR-USER is your user home folder.

The YOUR-PROJECT it is the folder of project code::blocks.

The OGRE-FOLDER-MEDIA is folder of all files is export by Blender 3D.

Let me show my simple example using NVIDIA FX video card.

The next image show us one 3D object wich is a mesh object.

ogre blend

After I make all materials and mesh with same name.

I use the script to export ogre mesh using the 2.49a version.

ogre blend

The next two images show the settins I need to make to have a mesh.

ogre blend
ogre blend

Also you keep just the object you need to export.

You can use a simple C++ source code to render with Ogre Engine.

ogre blend

Posted in 3D, Blender 3D, C++, Game engine, Linux, Programming. Tagged with , , , , , .

Blender 2.5 – Glare and Defocus

Today I will show a simple way of connecting nodes.

In this way we get connected glare and defocus.

Start the Blender 3D software version 2.5 with the default cube, see below.

We will select a texture for the cube.

  1. Go on Node Editor
  2. Click on Textures node

Now we will add Defocus effect.

  1. Go on Node Editor
  2. Click on Add
  3. Go on Filter
  4. … and click Defocus

Please , see below :

… same way to add Glare

  1. Go on Node Editor
  2. Click on Add
  3. Go on Filter
  4. … and click Glare

Below you see two windows Defocus – 1 and Glare – 2 and connection mode.

To connect just position your mouse over the yellow circles.

Now, holding down left button of mouse drag that on the yellow bubble that will be connected.

Sometimes it is necessary to see the difference between inputs and outputs.

For this I will use a SplitViewer.

Like the normal Viewer node except there are now two image inputs.

In this case , the input image and output – render image.

Let’s add that .

  1. Go on free node
  2. Click Add
  3. Go on Output
  4. … and click SplitViewer

In the picture below we see how it is connected the SplitViewer.

To see the final results go select UV/Image Editor ( see 1) .

Now select Viewer Node to see result of SplitViewer.

Or, just select Render View to see the final result.

This is all.

Posted in 3D, Blender 3D. Tagged with , .