Theme toolbox

Transfers and remapping

Previous section < Installation and main menu

- Chapter: Theme toolbox -

Next section > Preloader operations

This section discusses the operations available through the "Transfers" sub-menu (pictured below). You can get to this specific sub-menu by clicking the relevant button in the Theme toolbox's main menu. These operations actually fall into 2 categories:

The transfers sub-menu

The Transfer process

In this context "transfer" means reading a theme, decoding it and reencoding it to a different destination. In the process, it is always upgraded, if required, to the latest version supported by the Theme-O-Matic, for example to support new properties that did not exist at the time the theme was created.

Both source and destination themes may either be notecard of LSD themes. Since scripts cannot create notecards, if the destination is a notecard then you will have to copy the lines generated in the chat just like when the themes are created during preparation phase. LSD themes, on the other hand, require no copy or paste operations on your part.

To make a theme transfer:

Note: the source theme and destination name cannot be the same LSD theme.

LSD operations

The remaining buttons on this menu enable you to perform common LSD operations. They are identical to what is possible in the preparation phase:

Since the last two operations are potentially destructive, a confirmation dialog box will be shown before the action takes place.

Theme remapping

Why

When you create a theme, information about which property has to be applied on which prim (and potentially face) is recorded and encoded. The keyword here is "which prim": all prims are assigned a number (more details about this on the SL wiki) starting from 1 (for the root prim) up to the number of prims composing the object, and this "link number" is used by themes.

The problem is that the link number is highly dependent on how the object is built and modified. If you unlink a prim, or add a new prim, then all link numbers get changed in a practically unpredictable way! This of course totally breaks themes as the prim and face properties are bound to be applied on the wrong prims.

As of v2.2 of the Theme-O-Matic the Theme toolbox now enables you to fix this problem by offering a mechanism to re-encode your themes with the new corrected link numbers. To do that we have to establish a correspondence (called a mapping) between the original object (used for the theme creation) and the modified object that had its prims added or removed.

The Map maker script

The mapping notecard can easily be created by using the Map Maker script inside the original object. Just equip your original object, as it was before you made any modification to its prims. Do not use any other script inside it. The Map Maker script will display a very simple menu system where you can choose one mapping type ("direct" or "reference") and generate the mapping.


Map maker menu : select the mapping type (direct or reference) and then click "Generate!"

The resulting mapping

You get to choose between two mapping types:

Since getting the link numbers from the viewer has been a rather unreliable operation, Reference mapping is the advised method, and it is used by default. If the uniqueness requirement for references is not satisfied the script will warn you when generating the mapping notecard.

When you have selected the desired mapping type and met the requirements, just click the Generate! button to create the notecard contents. The resulting lines will look like the following pictures. Copy them to a new notecard in your inventory, named ".mapping" (do not forget the leading dot).

A direct mapping

This is the list of prims in the source object. You have to fill in (after the "=>" arrows) the corresponding link numbers in the target object

A reference mapping

It contains the list of prims in the source object associated with a reference made of the prim's name and description. You do not need to manually alter this notecard.

Worth noting

If you opted for a direct mapping, do not forget to fill in the actual link numbers in the target object. If a prim used to exist in the source object but was removed from the target object, you can use -1 as the link number to signify that properties affecting this prim should be removed when remapping the theme. For example, a line like

4=>-1

means that prim #4 in the source object no longer exists in the target object.

This is entirely automatic if you opted for the reference mapping.

Remapping themes, step-by-step

Once you have your mapping notecard ready you can just forget about the Map maker and the source object. Everything else happens in the target object. Here are step-by-step instructions. FIrst of all, of course, always keep a safe copy in your inventory. Mistakes are easily made!

Repeat steps 2 to 6 for all the themes you want to remap. Then you can test them by using, for example, the buttons from the main menu.