Module Curve
[frames | no frames]

Module Curve

The Blender.Curve submodule.

Curve Data

This module provides access to Curve Data objects in Blender.

A Blender Curve can consist of multiple curves. Try converting a Text object to a Curve to see an example of this. Each curve is of type Bezier or Nurb. The underlying curves can be accessed with the [] operator. Operator [] returns an object of type CurNurb.

The Curve module also supports the Python iterator interface. This means you can access the curves in a Curve or the control points in a CurNurb using a python for statement.

Add a Curve to a Scene Example:
 from Blender import Curve, Object, Scene
 c = Curve.New()             # create new  curve data
 cur = Scene.getCurrent()    # get current scene
 ob = Object.New('Curve')    # make curve object                  # link curve data with this object                # link object into scene
Iterator Example:
 ob = Object.GetSelected()[0]
 curve = ob.getData()
 for cur in curve:
   print type( cur ), cur
   for point in cur:
     print type( point ), point

CurNurb This object provides access to the control points of the curves that make up a Blender Curve.
Curve This object gives access to Curve-specific data in Blender.

Function Summary
Blender Curve or a list of Blender Curves Get(name)
Get the Curve Data object(s) from Blender.
Blender Curve New(name)
Create a new Curve Data object.

Function Details


Get the Curve Data object(s) from Blender.
name - The name of the Curve Data.
It depends on the 'name' parameter:
  • (name): The Curve Data object with the given name;
  • (): A list with all Curve Data objects in the current scene.

           (type=Blender Curve or a list of Blender Curves)


Create a new Curve Data object.
name - The Curve Data name.
The created Curve Data object.
           (type=Blender Curve)

Generated by Epydoc 2.1 on Mon Jun 13 15:31:22 2005