Search DLab 1.0

Sunday, August 29, 2010

Python scripting for Blender

Belle has also succeeded in trying out a python script that can align any objects that are placed randomly.This could be helpful in learning the scripting language.

The objects on the screen are randomly placed


But once the script has been executed, it aligns all the objects/ or chosen objects.

import Blender


Here is our script:

import Blender
myObject = Blender.Object.Get(‘Cube’)

selectionList = Blender.Object.GetSelected()

for i in selectionList:

i.LocY = myObject.LocY

Blender.Redraw()

No comments:

Post a Comment