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
PyNone 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.
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.
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.
int getMode()
Get the Curve mode value.
string getName()
Get the name of this Curve Data object.
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.
integer isNurb(curve_num)
method used to determine whether a CurNurb is of type Bezier or of type Nurb.
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 setLoc(location)
Set the curve's location value.
PyNone setMode(val)
Set the Curve mode 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
  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 coords for a Nurb curve.)
Returns:
PyNone
           (type=PyNone)

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 exeption if numcurve is out of range.

getBevresol()

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

getControlPoint(numcurve, numpoint)

Get the curve's control point value.
Parameters:
numcurve
           (type=int)
numpoint
           (type=int)
Returns:
depends upon the curve's type.
  • type bezier : a list of three coordinates
  • type nurbs : a list of nine coordinates.

           (type=list of floats)

getExt1()

Get the Curve's ext1 value.
Returns:
float

getExt2()

Get the Curve's ext2 value.
Returns:
float

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)

getMode()

Get the Curve mode value. The mode of the curve is a combination of 4 parameters.
  • Bit 0 : "Back" is set
  • Bit 1 : "Front" is set
  • Bit 2 : "3D" is set
  • Bit 3 : "CurvePath" is set.
  • Bit 4 : "CurveFollow" is set.
Returns:
int

getName()

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

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

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 of curve is type Bezier, One if curve is of type Nurb.
           (type=integer)
Raises:
AttributeError - throws execption if curve_num is out of range.

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.
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

setLoc(location)

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

setMode(val)

Set the Curve mode value.
Parameters:
val - The new Curve's mode value. See getMode for the meaning of the bit fields.
           (type=int)
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

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 Thu Aug 12 21:47:29 2004 http://epydoc.sf.net