Skip to main content

Reusable Solution Libraries

Shareable Component Library (SCL) Usage

The main goal of a shareable component library (SCL) solution is to make all the resources from a particular SCS solution available to be used in other solutions. A SCL is an archived file containing SCML/binary files and some meta information. SceneComposer provides the possibility to reuse any part from a solution that is exported as a SCL.

It is possible to set a new created solution as a shareable component library (SCL) by using the "Is Shared Library" checkbox from the "Create new solution" dialog. After the creation of the new solution, the "Export SCL" option will be available under the "File" menu and it will be possible to export the solution as a shareable component library (SCL).

drawing-5-1695379539.png

To export a solution already created as a shareable component library (SCL), first, choose the SCL "Library Type" from "File" > "Solution Options" > "General Configuration".

drawing-4-1687934403.png

The SCL name can be the same with the SCL solution or it can be modified. Second, after the solution has been saved, the "Export SCL" option will become available under the "File" menu. On this way, the solution can be exported as a shareable component library (SCL) in any place selected by the user.

Shareable component library (SCL) are not allowed to contain any display. If an already created solution does contain any display, the user will be noticed through a specific dialogue (see the image below).


drawing-5-1695379636.png

If an older imported/converted solution already contains a .scl file with displays, the error will be showed in Problems panel. In this way, the user will be noticed and will be allowed to correct this situation.

drawing-4-1687934527.png

After the export of the solution as a SCL solution, the content can be used in another solution after it is imported via "Solution Explorer" panel where a "References" node is available. When right click on the "References" node, the "Add Reference" from the context menu allows the user to select the SCL solution.

drawing-4-1676295954.png

After this step, all the available nodes will become visible under the "References" node in the next panels: "Solution Explorer", "Imports", "Toolbox", "Render Targets" and "Templates".

Another way to import the content of a SCL solution is through the "Solution Options" panel. Here is a specific section - "References" - where all the imported references are visible and other references can be added.

drawing-5-1695379844.png

When an external application needs to access some SCL objects, it is mandatory to know which is the SCL name.

SCL name is like a namespace and it is used to access the SCL items from outside (//$NAME$/Controls/MyControl) and also for the Candera name ($NAME$##Controls#MyControl).




Control of SCL Items Visibility

It is possible to control the visibility of the SCL items at the destination by using a flag for scenes, animations, etc. This flag is available in the "Properties" panel. It has three different options:

  • Inherited (the element, if it is a leaf, will inherit the property of the parent)
  • Public (the element will be available as a reusable/shareable resource)
  • Private (the element will not be available as a reusable/shareable resource)
drawing-4-1687934621.png

All the available elements can be used in a new SCS or SCL solution. The leaves will inherit the desired type of visibility of any node just if the flag is set after the selection of the node in Solution Explorer panel. If this operation is done by selecting the node in any other panel, the item visibility will not be inherited by its leaves.

The referenced content of a SCL solution is available only as read only. No modification can be operated on it. If a modification is needed the user has to operate it on the referenced solution. After the modification has been done, the solution has to be saved and exported, again, as a SCL solution.


Using a Theme from SCL

If a SCL solution which contains a theme that is referenced, the user can use any template: Appearances, Bitmaps, Composites 3D, Composites 2D, Materials, Raw Resources, Render Modes, Textures, Uniform Setters. If the SCS solution contains a theme with the same name, the content of both themes will be merged.

When the user wants to add a new theme from a SCL solution he will first add the theme in the current solution by using the "Import" > "Import SCL Items" menu.

drawing-4-1687934707.pngdrawing-5-1695391729.png

The "Import SCL Items" dialog offers the possibility to choose one of three possible options: "Create", "Ignore", "Ask Later".

drawing-4-1676296055.pngdrawing-5-1695392011.png

In this case, the option "Create" will be chosen. If the "Ignore" option was previously selected, the dialog will never appear again. In all other cases the user will be required again to choose for a resolution each time when solution is opened.

An existing template can be used by drag and drop operation over a node in the Scene Tree panel. To use any of these types of templates from a theme contained in a referenced SCL solution, first, create a new theme. In this way all the available referenced templates will be visible in the "Themes" panel.