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

Class Text3d

The Text3d object

This object gives access Blender's Font objects

Instance Methods
string
getName()
Get the name of this Text3d object.
 
setName(name)
Set the name of this Text3d object.
string
getText()
Get text string for this object
 
setText(name)
Set the text string in this Text3d object
tuple of module constants
getDrawMode()
Get the drawing mode (3d, front, and/or back) Gets the text3d's drawing modes.
None
setDrawMode(val)
Set the text3d's drawing mode.
 
getUVordco()
Return whether UV coords are used for Texture mapping
 
setUVordco(val)
Set the font to use UV coords for Texture mapping
float
getBevelAmount()
Get the Text3d's bevel resolution value.
None
setBevelAmount(bevelresol)
Set the Text3d's bevel resolution value.
float
getDefaultResolution()
Return Default text resolution.
None
setDefaultResolution(resolu)
Sets Default text Resolution.
float
getWidth()
Get the Text3d's width value.
None
setWidth(width)
Set the Text3d's width value.
float
getExtrudeDepth()
Get the text3d's ext1 value.
None
setExtrudeDepth(ext1)
Set the text3d's ext1 value.
float
getExtrudeBevelDepth()
Get the text3d's ext2 value.
None
setExtrudeBevelDepth(ext2)
Set the text3d's ext2 value.
float
getShear()
Get the text3d's shear value.
None
setShear(shear)
Set the text3d's shear value.
float
getSize()
Get the text3d's size value.
None
setSize(size)
Set the text3d's size value.
float
getLineSeparation()
Get the text3d's ext2 value.
None
setLineSeparation(sep)
Set the text3d's ext2 value.
float
getSpacing()
Get the text3d's spacing value.
None
setSpacing(spacing)
Set the text3d's spacing value.
float
getXoffset()
Get the text3d's Xoffset value.
None
setXoffset(xof)
Set the text3d's Xoffset value.
float
getYoffset()
Get the text3d's Yoffset value.
None
setYoffset(yof)
Set the text3d's Yoffset value.
module constant
getAlignment()
Get the text3d's alignment value.
None
setAlignment(align)
Set the text3d's Alignment value.
int
getMaterial(index)
get the material index of a character.
None
setMaterial(index, material_index)
Set a characters material.
None
addFrame()
Adds a text frame.
None
removeFrame(index)
Removed the frame at this index
Instance Variables
  activeFrame
The active frame for this text data.
bool fakeUser
When set to True, this datablock wont be removed, even if nothing is using it.
  frameHeight
The height of the active frame [0.0 - 50.0]
  frameWidth
The width of the active frame [0.0 - 50.0]
  frameX
The X position of the active frame [0.0 - 50.0]
  frameY
The Y position of the active frame [0.0 - 50.0]
string or None lib
path to the blend file this datablock is stored in (readonly).
string name
unique name within each blend file.
IDGroup properties
Returns an IDGroup reference to this datablocks's ID Properties.
bool tag
A temporary tag that to flag data as being used within a loop.
  totalFrames
The total number of text frames (read only)
int users
The number of users this datablock has.
Method Details

setName(name)

 

Set the name of this Text3d object.

Parameters:
  • name (string) - The new name.
Returns:
None

setText(name)

 

Set the text string in this Text3d object

Parameters:
  • name (string) - The new text string for this object.
Returns:
None

getDrawMode()

 

Get the drawing mode (3d, front, and/or back) Gets the text3d's drawing modes. Uses module constants

  • DRAW3D : "3D" is set
  • DRAWFRONT : "Front" is set
  • DRAWBACK : "Back" is set
Returns: tuple of module constants

setDrawMode(val)

 

Set the text3d's drawing mode. Uses module constants

  • DRAW3D
  • DRAWFRONT
  • DRAWBACK
Parameters:
  • val (single module constant or tuple of module constants) - The Text3d's modes. See getDrawMode for the meaning of the constants.
Returns: None

setBevelAmount(bevelresol)

 

Set the Text3d's bevel resolution value.

Parameters:
  • bevelresol (float) - The new Curve's bevel resolution value.
Returns: None

setDefaultResolution(resolu)

 

Sets Default text Resolution.

Parameters:
  • resolu (float) - The new Curve's U-resolution value.
Returns: None

setWidth(width)

 

Set the Text3d's width value.

Parameters:
  • width (float) - The new text3d's width value.
Returns: None

setExtrudeDepth(ext1)

 

Set the text3d's ext1 value.

Parameters:
  • ext1 (float) - The new text3d's ext1 value.
Returns: None

setExtrudeBevelDepth(ext2)

 

Set the text3d's ext2 value.

Parameters:
  • ext2 (float) - The new text3d's ext2 value.
Returns: None

setShear(shear)

 

Set the text3d's shear value.

Parameters:
  • shear (float) - The new text3d's shear value.
Returns: None

setSize(size)

 

Set the text3d's size value.

Parameters:
  • size (float) - The new text3d's size value.
Returns: None

setLineSeparation(sep)

 

Set the text3d's ext2 value.

Parameters:
  • sep (float) - The new text3d's separation value.
Returns: None

setSpacing(spacing)

 

Set the text3d's spacing value.

Parameters:
  • spacing (float) - The new text3d's spacing value.
Returns: None

setXoffset(xof)

 

Set the text3d's Xoffset value.

Parameters:
  • xof (float) - The new text3d's Xoffset value.
Returns: None

setYoffset(yof)

 

Set the text3d's Yoffset value.

Parameters:
  • yof (float) - The new text3d's Yoffset value.
Returns: None

getAlignment()

 

Get the text3d's alignment value. Uses module constants

  • LEFT
  • RIGHT
  • MIDDLE
  • FLUSH
Returns: module constant

setAlignment(align)

 

Set the text3d's Alignment value. Uses module constants

  • LEFT
  • RIGHT
  • MIDDLE
  • FLUSH
Parameters:
  • align (module constant) - The new text3d's Alignment value.
Returns: None

getMaterial(index)

 

get the material index of a character.

Parameters:
  • index (int) - the index of the character in a string
Returns: int
the material index if the character

setMaterial(index, material_index)

 

Set a characters material.

Parameters:
  • index (int) - the index of the character in a string
  • material_index (int) - the material index set set the character.
Returns: None

Note: after changing this youll need to update the object with object.makeDisplayList() to see the changes.

addFrame()

 

Adds a text frame. maximum number of frames is 255.

Returns: None

Instance Variable Details

fakeUser

When set to True, this datablock wont be removed, even if nothing is using it. All data has this disabled by default except for Actions.
Type:
bool

lib

path to the blend file this datablock is stored in (readonly).

lib will be None unless you are using external blend files with (File, Append/Link)

Note: the path may be relative, to get the full path use Blender.sys.expandpath

Type:
string or None

name

unique name within each blend file.

The name is case sensitive and 21 characters maximum length.

Note: a blend file may have naming collisions when external library data is used, be sure to check the value of lib.

Note: Setting a value longer then 21 characters will be shortened

Type:
string

tag

A temporary tag that to flag data as being used within a loop. always set all tags to True or False before using since blender uses this flag for its own internal operations.
Type:
bool

users

The number of users this datablock has. (readonly) Zero user datablocks are de-allocated after reloading and saving.
Type:
int