Module Curve :: Class Curve
[frames | no frames]

Class Curve


The Curve Data object

This object gives access to Curve-specific data in Blender.
Method Summary
CurNurb appendNurb(new_point)
add a new curve to this Curve.
PyNone appendPoint(numcurve, new_control_point)
add a new control point to the indicated curve.
Blender Object or PyNone getBevOb()
Returns the Bevel Object (BevOb) assigned to the Curve.
float getBevresol()
Get the Curve's bevel resolution value.
list of floats getControlPoint(numcurve, numpoint)
Get the curve's control point value.
float getExt1()
Get the Curve's ext1 value.
float getExt2()
Get the Curve's ext2 value.
integer bitfield getFlag()
Get the Curve flag value.
a list of 3 floats. getLoc()
Get the curve's location value.
list of Material Objects getMaterials()
Returns a list of materials assigned to the Curve.
string getName()
Get the name of this Curve Data object.
integer getNumCurves()
Get the number of curves in this Curve Data object.
integer getNumPoints(curve_num)
Get the number of control points in the curve.
int getPathLen()
Get this Curve's path length.
float getResolu()
Get the Curve's U-resolution value.
float getResolv()
Get the Curve's V-resolution value.
a list of 3 floats. getRot()
Get the curve's rotation value.
a list of 3 floats. getSize()
Get the curve's size value.
int getTotcol()
Get the number of materials linked to the Curve.
float getWidth()
Get the Curve's width value.
boolean isCyclic(curve_num)
Boolean method checks whether the curve is cyclic (closed) or not.
integer isNurb(curve_num)
method used to determine whether a CurNurb is of type Bezier or of type Nurb.
PyNone setBevOb(object)
Assign a Bevel Object (BevOb) to the Curve.
PyNone setBevresol(bevelresol)
Set the Curve's bevel resolution value.
PyNone setControlPoint(numcurve, numpoint, controlpoint)
Set the Curve's controlpoint value.
PyNone setExt1(ext1)
Set the Curve's ext1 value.
PyNone setExt2(ext2)
Set the Curve's ext2 value.
PyNone setFlag(val)
Set the Curve flag value.
PyNone setLoc(location)
Set the curve's location value.
PyNone setName(name)
Set the name of this Curve Data object.
PyNone setPathLen(len)
Set this Curve's path length.
PyNone setResolu(resolu)
Set the Curve's U-resolution value.
PyNone setResolv(resolv)
Set the Curve's V-resolution value.
PyNone setRot(rotation)
Set the Curve's rotation value.
PyNone setSize(size)
Set the curve size value.
PyNone setTotcol(totcol)
Set the number of materials linked to the Curve.
PyNone setWidth(width)
Set the Curve's width value.
PyNone update()
Updates display list for a Curve.

Class Variable Summary
  bevob: The Curve Bevel Object
  bevresol: The Curve Data bevel resolution.
  ext1: The Curve Data extent 1(for bevels).
  ext2: The Curve Data extent2 (for bevels).
  flag: The Curve Data flag value; see function getFlag for the semantics.
  loc: The Curve Data location(from the center).
  name: The Curve Data name.
  pathlen: The Curve Data path length.
  resolu: The Curve Data U-resolution.
  resolv: The Curve Data V-resolution.
  rot: The Curve Data rotation(from the center).
  size: The Curve Data size(from the center).
  totcol: The Curve Data maximal number of linked materials.
  width: The Curve Data width.

Method Details

appendNurb(new_point)

add a new curve to this Curve. The new point is added to the new curve. Blender does not support a curve with zero points. The new curve is added to the end of the list of curves in the Curve.
Parameters:
new_point - see CurNurb.append for description of parameter.
           (type=BezTriple or list of xyzw coordinates for a Nurb curve.)
Returns:
the newly added spline
           (type=CurNurb)

appendPoint(numcurve, new_control_point)

add a new control point to the indicated curve.
Parameters:
numcurve - index for spline in Curve, starting from 0
           (type=int)
new_control_point - depends on curve's type.
  • type Bezier: a BezTriple
  • type Nurb: a list of four floats for the xyzw values

           (type=list xyzw or BezTriple)
Returns:
PyNone
Raises:
AttributeError - throws exception if numcurve is out of range.

getBevOb()

Returns the Bevel Object (BevOb) assigned to the Curve.
Returns:
Bevel Object (BevOb) assigned to the Curve.
           (type=Blender Object or PyNone)

getBevresol()

Get the Curve's bevel resolution value.
Returns:
float

getControlPoint(numcurve, numpoint)

Get the curve's control point value. The numpoint arg is an index into the list of points and starts with 0.
Parameters:
numcurve
           (type=int)
numpoint
           (type=int)
Returns:
depends upon the curve's type.
  • type Bezier : a list of nine floats. Values are x, y, z for handle-1, vertex and handle-2
  • type Nurb : a list of 4 floats. Values are x, y, z, w.

           (type=list of floats)

getExt1()

Get the Curve's ext1 value.
Returns:
float

getExt2()

Get the Curve's ext2 value.
Returns:
float

getFlag()

Get the Curve flag value. This item is a bitfield whose value is a combination of the following parameters.
  • Bit 0 : "3D" is set
  • Bit 1 : "Front" is set
  • Bit 2 : "Back" is set
  • Bit 3 : "CurvePath" is set.
  • Bit 4 : "CurveFollow" is set.
Returns:
integer bitfield

getLoc()

Get the curve's location value.
Returns:
a list of 3 floats.

getMaterials()

Returns a list of materials assigned to the Curve.
Returns:
list of Material Objects assigned to the Curve.
           (type=list of Material Objects)

getName()

Get the name of this Curve Data object.
Returns:
string

getNumCurves()

Get the number of curves in this Curve Data object.
Returns:
integer

getNumPoints(curve_num)

Get the number of control points in the curve.
Parameters:
curve_num - zero-based index into list of curves in this Curve
           (type=integer)
Returns:
integer

getPathLen()

Get this Curve's path length.
Returns:
the path length.
           (type=int)

getResolu()

Get the Curve's U-resolution value.
Returns:
float

getResolv()

Get the Curve's V-resolution value.
Returns:
float

getRot()

Get the curve's rotation value.
Returns:
a list of 3 floats.

getSize()

Get the curve's size value.
Returns:
a list of 3 floats.

getTotcol()

Get the number of materials linked to the Curve.
Returns:
number of materials linked.
           (type=int)

getWidth()

Get the Curve's width value.
Returns:
float

isCyclic(curve_num)

Boolean method checks whether the curve is cyclic (closed) or not.
Parameters:
curve_num - zero-based index into list of curves in this Curve
           (type=integer)
Returns:
True if is cyclic, False if not
           (type=boolean)
Raises:
AttributeError - throws exception if curve_num is out of range.

isNurb(curve_num)

method used to determine whether a CurNurb is of type Bezier or of type Nurb.
Parameters:
curve_num - zero-based index into list of curves in this Curve.
           (type=integer)
Returns:
Zero if curve is type Bezier, One if curve is of type Nurb.
           (type=integer)
Raises:
AttributeError - throws exception if curve_num is out of range.

setBevOb(object)

Assign a Bevel Object (BevOb) to the Curve. Passing None as the object parameter removes the bevel.
Parameters:
object - Blender Object to assign as Bevel Object (BevOb)
           (type=Curve type Blender Object)
Returns:
PyNone
           (type=PyNone)
Raises:
TypeError - throws exception if the parameter is not a Curve type Blender Object or PyNone

setBevresol(bevelresol)

Set the Curve's bevel resolution value.
Parameters:
bevelresol - The new Curve's bevel resolution value.
           (type=float)
Returns:
PyNone

setControlPoint(numcurve, numpoint, controlpoint)

Set the Curve's controlpoint value. The numpoint arg is an index into the list of points and starts with 0.
Parameters:
numcurve - index for spline in Curve, starting from 0
           (type=int)
numpoint - index for point in spline, starting from 0
           (type=int)
controlpoint - The new controlpoint value. See getControlPoint for the length of the list.
           (type=list)
Returns:
PyNone

setExt1(ext1)

Set the Curve's ext1 value.
Parameters:
ext1 - The new Curve's ext1 value.
           (type=float)
Returns:
PyNone

setExt2(ext2)

Set the Curve's ext2 value.
Parameters:
ext2 - The new Curve's ext2 value.
           (type=float)
Returns:
PyNone

setFlag(val)

Set the Curve flag value. The flag corresponds to the Blender settings for 3D, Front, Back, CurvePath and CurveFollow. This parameter is a bitfield.
Parameters:
val - The Curve's flag bits. See getFlag for the meaning of the individual bits.
           (type=integer bitfield)
Returns:
PyNone

setLoc(location)

Set the curve's location value.
Parameters:
location - The new Curve's location values.
           (type=list[3])
Returns:
PyNone

setName(name)

Set the name of this Curve Data object.
Parameters:
name - The new name.
           (type=string)
Returns:
PyNone

setPathLen(len)

Set this Curve's path length.
Parameters:
len - the new curve's length.
           (type=int)
Returns:
PyNone

setResolu(resolu)

Set the Curve's U-resolution value.
Parameters:
resolu - The new Curve's U-resolution value.
           (type=float)
Returns:
PyNone

setResolv(resolv)

Set the Curve's V-resolution value.
Parameters:
resolv - The new Curve's V-resolution value.
           (type=float)
Returns:
PyNone

setRot(rotation)

Set the Curve's rotation value.
Parameters:
rotation - The new Curve's rotation values.
           (type=list[3])
Returns:
PyNone

setSize(size)

Set the curve size value.
Parameters:
size - The new Curve's size values.
           (type=list[3])
Returns:
PyNone

setTotcol(totcol)

Set the number of materials linked to the Curve.
Parameters:
totcol - number of materials linked.
           (type=int)
Returns:
PyNone

setWidth(width)

Set the Curve's width value.
Parameters:
width - The new Curve's width value.
           (type=float)
Returns:
PyNone

update()

Updates display list for a Curve. Used after making changes to control points.

You must use this if you want to see your changes!
Returns:
PyNone
           (type=PyNone)

Class Variable Details

bevob

The Curve Bevel Object

bevresol

The Curve Data bevel resolution.

ext1

The Curve Data extent 1(for bevels).

ext2

The Curve Data extent2 (for bevels).

flag

The Curve Data flag value; see function getFlag for the semantics.

loc

The Curve Data location(from the center).

name

The Curve Data name.

pathlen

The Curve Data path length.

resolu

The Curve Data U-resolution.

resolv

The Curve Data V-resolution.

rot

The Curve Data rotation(from the center).

size

The Curve Data size(from the center).

totcol

The Curve Data maximal number of linked materials.

width

The Curve Data width.

Generated by Epydoc 2.1 on Mon Jun 13 15:31:23 2005 http://epydoc.sf.net