class FlameChannelParser::Channel

Represents a channel parsed from the Flame setup. Contains the channel metadata and keyframes (Key objects). Supports the following standard Array methods: :empty?, :size, :each, :[], :push

Attributes

base_value[RW]
extrapolation[RW]
name[RW]
node_name[R]
node_type[R]

Public Class Methods

new(channel_name, node_type, node_name) click to toggle source
# File lib/channel.rb, line 17
def initialize(channel_name, node_type, node_name)
  @keys = []
  @node_type, @node_name, @name = node_type, node_name, channel_name.strip
end

Public Instance Methods

inspect() click to toggle source
# File lib/channel.rb, line 32
def inspect
  "<Channel (%s %s) with %d keys>" % [@node_type, path, @keys.size]
end
path() click to toggle source

Returns path to the channel (like axis1/position/x)

# File lib/channel.rb, line 23
def path
  [@node_name, name].compact.join("/")
end
to_interpolator() click to toggle source

Get an Interpolator for this channel

# File lib/channel.rb, line 28
def to_interpolator
  FlameChannelParser::Interpolator.new(self)
end