About templates


I’m working on a couple of commercials. I have to re-use parts of the animation in other scenes.
The problem I have is when I create a template, it doesn’t save peg bars and peg positions. When I put everything in a symbol, it saves the pegs, but I cant put it in the template folder so I can’t import it in other scenes.
In other words, if I have a sequence with a camera move that I want to reuse in a different scene, how do I tackle this?

Also, is there a way to rename all drawings on one layer at once? Because when you import a number of drawings from a different scene, the drawings with the same name will be overwritten and weird stuff happens…

I hope someone can help

Thank you


How are you creating your templates? You should have no problem bringing pegs into a template.

Make sure you are selecting everything on the left-hand side of the timeline, then dragging and dropping. Select the first layer then shift-select to go all the way to the last layer, then when you drag and drop this into your library, it will bring it all in.

The only thing that I can think of is maybe you had pegs and drawings underneath them, but when you created your template, you selected the drawing without selecting the peg? It will only bring what’s selected into the template.

Here’s a script for renaming multiple layers (adding a Prefix or a Suffix):

function TB_Add_Prefix_Or_Suffix(){
// Adds a Prefix or Suffix to the name of selected Modules
// it adds the same prefix or suffix to the columns and elements (this will be added later)
// The Modules can be selected from the timline or the network
// Francisco Del Cueto 19/05/07 – Missing the rename of the elements
// Francisco Del Cueto 06/06/07 – Added rename of elements

var n = Application.selection.numberOfNodesSelected();
var i, posx, posy;
var prefix = “”;
var suffix = “”;

// Build the dialog
d = new Dialog;
d.title = “Add Prefix or Sufix”;

var group = new GroupBox;

var suffixRB = new RadioButton;
var prefixRB = new RadioButton;
var prefixSuffixLE = new LineEdit;
suffixRB.checked = true;
prefixRB.checked = false;
suffixRB.text = “Suffix”;
prefixRB.text = “Prefix”;
prefixSuffixLE.label = “”;

// group.title = “Type of Model”

var rc = d.exec();

if (!rc)
// Call dialog, pressing “Cancel” returns false

if (suffixRB.checked)
suffix = prefixSuffixLE.text;
if (prefixRB.checked)
prefix = prefixSuffixLE.text;
if (n > 0)
for (i = 0; i < n; ++i)
var selNode = Application.selection.selectedNode(i);

var nodeNamePath= selNode.split("/");
var newNodeName = prefix + nodeNamePath[nodeNamePath.length - 1] + suffix;
var columnId = node.linkedColumn(selNode,“DRAWING.ELEMENT”);
var columnName = column.getDisplayName(columnId);
var newColumnName = prefix + columnName + suffix;

var elementKey = column.getElementIdOfDrawing(columnId);
var elementName = element.getNameById(elementKey);
var newElementName = prefix + elementName + suffix;
//System.println(selNode + " — " + columnName );
node.rename(selNode, newNodeName);
element.renameById( elementKey, newElementName);
//System.println(newNodeName + “—” + newColumnName + “—” + newElementName);

This script is already available by default in Animate Pro. However you can add it to Animate if you need it by copying and pasting the above text into a new script. Access the scripting window by clicking on the Edit Scripts button, the first one on the scripting toolbar. Then when the Scritping Interface appears, click on the new script button. Then copy and paste the script in, and now you can run it by selecting the layers you want to rename and hitting the green play button in the Scripting Interface (Call Function), or you can tie the script to a button using the Manage Scripts button (second one in the Scripting toolbar).

Hope this helps.

Toon Boom Support