Class: Tracksperanto::Tool::Base
- Inherits:
-
Object
- Object
- Tracksperanto::Tool::Base
- Extended by:
- Forwardable
- Includes:
- BlockInit, Casts, ConstName, Parameters, SimpleExport
- Defined in:
- lib/tools/base.rb
Overview
The base tool class works just like a Tracksperanto::Export::Base, but it only wraps another exporting object and does not get registered on it’s own as an export format. Tool can be used to massage the tracks being exported in various interesting ways - like moving the coordinates, clipping the keyframes, scaling the whole export or even reversing the trackers to go backwards
Direct Known Subclasses
Crop, Flip, Flop, Golden, LengthCutoff, LensDisto, Lerp, Lint, MoveToFirst, Pad, Prefix, Reformat, Scaler, Shift, Slipper, StartTrim
Class Method Summary collapse
-
.action_description ⇒ Object
Returns the human name of the action that the tool will perform.
-
.inherited(by) ⇒ Object
Used to automatically register your tool in Tracksperanto.tools Normally you wouldn’t need to override this.
Instance Method Summary collapse
-
#initialize(*exporter_and_args_for_block_init) ⇒ Base
constructor
Constructor accepts the exporter that will be wrapped, followed by the optional options hash and the optional block that yields self.
Methods included from Parameters
included, #parameter, #parameters
Methods included from SimpleExport
Methods included from ConstName
Methods included from Casts
#cast_to_bool, #cast_to_float, #cast_to_int, #cast_to_string, included
Constructor Details
#initialize(*exporter_and_args_for_block_init) ⇒ Base
Constructor accepts the exporter that will be wrapped, followed by the optional options hash and the optional block that yields self
32 33 34 35 |
# File 'lib/tools/base.rb', line 32 def initialize(*exporter_and_args_for_block_init) @exporter = exporter_and_args_for_block_init.shift super end |
Class Method Details
.action_description ⇒ Object
Returns the human name of the action that the tool will perform. The action is the in infinitive form, like “Remove all the invalid keyframes”, “Crop the image” and so on
26 27 28 |
# File 'lib/tools/base.rb', line 26 def self.action_description "Base tool class" end |
.inherited(by) ⇒ Object
Used to automatically register your tool in Tracksperanto.tools Normally you wouldn’t need to override this
19 20 21 22 |
# File 'lib/tools/base.rb', line 19 def self.inherited(by) Tracksperanto.tools.push(by) super end |