Module NLA :: Class Action
[frames] | no frames]

Class Action

The Action object

This object gives access to Action-specific data in Blender.

Instance Methods
string
getName()
Get the name of this Action.
 
setName(name)
Set the name of this Action.
 
setActive(object)
Set this action as the current action for an object.
PyIpo or None
getChannelIpo(channel)
Get the Ipo for the named channel in this action
PyList
getFrameNumbers()
Gets the frame numbers at which a key was inserted into this action
 
removeChannel(channel)
Remove a named channel from this action
Dictionary [channel : PyIpo or None]
getAllChannelIpos()
Get the all the Ipos for this action
list
getChannelNames()
Returns a list of channel names
 
renameChannel(nameFrom, nameTo)
rename an existing channel to a new name.
Instance Variables
bool fakeUser
When set to True, this datablock wont be removed, even if nothing is using it.
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.
int users
The number of users this datablock has.
Method Details

setName(name)

 

Set the name of this Action.

Parameters:
  • name (string) - The new name

setActive(object)

 

Set this action as the current action for an object.

Parameters:
  • object (PyObject) - The object whose action is to be set

getChannelIpo(channel)

 

Get the Ipo for the named channel in this action

Parameters:
  • channel (string) - The name of a channel in this action
Returns: PyIpo or None
the Ipo for the channel

getFrameNumbers()

 

Gets the frame numbers at which a key was inserted into this action

Returns: PyList
a list of ints

removeChannel(channel)

 

Remove a named channel from this action

Parameters:
  • channel (string) - The name of a channel in this action to be removed

getAllChannelIpos()

 

Get the all the Ipos for this action

Returns: Dictionary [channel : PyIpo or None]
the Ipos for all the channels in the action

getChannelNames()

 

Returns a list of channel names

Returns: list
the channel names that match bone and constraint names.

renameChannel(nameFrom, nameTo)

 

rename an existing channel to a new name.

if the nameFrom channel dosnt exist or the nameTo exists, an error will be raised.

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