O'Reilly logo

Blender 2.49 Scripting by Michel J. Anders

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Regular tilings

The checkerboard texture is perhaps the simplest texture that you can imagine and is therefore often used as an example when programming textures. Because Blender already has a built-in checker texture (since version 2.49, in the texture context of the nodes window) we go one step further and create a texture node that displays not only a checkerboard texture but tilings of triangles and hexagons as well.

from Blender import Node,Noise,Scene from math import sqrt,sin,cos,pi,exp,floor from Blender.Mathutils import Vector as vec # create regular tilings to be used as a color map class Tilings(Node.Scripted): def __init__(self, sockets): sockets.input = [Node.Socket('type' , val= 2.0, min = 1.0, max = 3.0), Node.Socket('scale' , val= ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required