Skip to main content

2D Nodes

2D Toolbox

The Toolbox for 2D scenes provides the following items:

drawing-4-1676441073.png

A "Show Controls as Big Icons/List" button is available in the upper right corner. If this button is used, a different presentation mode - as icons instead of a text list of items - will be made available (see the image below).

drawing-4-1676441109.png


Create 2D Nodes

Following items can be used to create a new node in the scene graph:

04_2d_toolbox_2.PNG

2D Camera: To be linked to a render target, where the render result of the camera will be drawn.
Candera::Camera2D

04_2d_toolbox_3.PNG

2D Group: Parent item for other nodes. Child nodes are located relative to the parent group.
Candera::Group2D

04_2d_toolbox_16.png

Base Line Layout: Provides a stacked layout in the horizontal direction.
Candera::BaseLineLayouter

04_2d_toolbox_17.png

Dock Layout: Provides an area divided into five screens (Top, Bottom, Center, Left, Right). Nodes can be placed in the screens surrounding the Center screen.
Candera::DockPanelLayouter

04_2d_toolbox_18.png

Grid Layout: Each node within the group will be positioned within a grid.
Candera::DockPanelLayouter

04_2d_toolbox_19.png

Overlay Layout: Allow you to place nodes on top of each other to create a layered effect.
Candera::OverlayLayouter

04_2d_toolbox_20.png

Stack Layout: Stacks nodes in the horizontal or vertical direction.
Candera::StackLayouter

04_2d_toolbox_4.PNG

RenderNode: Can be associated with any type of effect.
Candera::RenderNode

04_2d_toolbox_6.PNG

BitmapNode: By default associated with a BitmapBrushAlphaBlend effect.
Candera::BitmapBrushAlphaBlend

04_2d_toolbox_5.PNG

TextNode: By default associated to a TextBrushAlphaBlend effect.
Candera::TextBrushAlphaBlend

04_2d_toolbox_21.png

Solid Color: By default associated to a TextBrushAlphaBlend effect.
Candera::SolidColorBrush

For each of these types, refer to the Properties panel for inspecting all properties specific for the type of node. Tooltips are available to explain the purpose of the property. Refer also to the Properties Overview listing the Tooltip descriptions.


About MVG nodes, please refer to MVG Nodes page. 

Position of 2D Nodes

By using the so-called "Object Inspector" feature, it is possible to display the following properties of a 2D node: Position, Scale, Rotation and BoundingBox. This can be done by right-clicking on a 2D node and selecting the "Object Inspector" from the context menu.

drawing-4-1676441213.png

The displayed data (visible in the "Object Inspector" panel) is always refreshed reflecting all the changes made by the user.

drawing-4-1682583043.png



WorldPivotPosition, WorldPosition and WorldBoundingBox can also be displayed in the Scene Editor panel.

drawing-4-1676441240.png

This feature is disabled by default and can be enabled in "Preferences" > "Editor" > "2D" > "World Transformations". Alternatively, it can be enabled in "View" > "2D Editing Utilities" > "World Transformations".

drawing-4-1682583110.png


drawing-4-1676441320.png


Adding Text to the 2D Scenes

Text can be added to the scenes either by using a dedicated node called TextNode2D or by using a Render Node in conjunction with a text effect.

TextNode2D
The image below shows how to drag and drop the TextNode2D from the Toolbox to the scene tree:

drawing-4-1676441348.png

The TextNode2D default properties are set so that the node is displayed after it is added to the scene tree.

drawing-4-1676441377.png

Please consult Text Style Palette for detailed information about adding and editing styles.


Render Node

Adding the Render Node to the scene tree is done in a similar way but using the corresponding icon:

drawing-4-1682583269.png

The Render Node is meant to be used with any kind of effect so, after adding the node to the scene tree, implicitly, the Effects list is empty and there is no visual outcome in the Scene Editor.
Drag and drop a text effect into the node Effect list and then configure its Style (see Text Style Palette) and Text properties:

drawing-4-1682583287.png


Solution Conversion from TextEffects to TextNode2D

A new option "Replace Old Text Nodes" was added in the context menu for all scenes, controls and folders containing scenes or controls. This will enable the user to replace the TextNode-TextBrushEffect pairs with the new TextNode2D-BitmapBrushBlendEffect pairs.

The user can perform the conversion by selecting from the Context menu the "Replace Old Text Nodes" item, available on 2D Scenes, 2D controls and folders which contain at least one of the previous.

drawing-4-1682583302.png

A "Conversion to Text Node" dialogue shows the output path and provides a "Suggest widget for deletion after conversion" checkbox.

drawing-4-1676441505.png

The converter will iterate through all 2D scenes and 2D controls and convert the RenderNode items having TextBrushBlendEffect or TextBrushColorBlendEffect effects. Each RenderNode having a TextBrushBlendEffect/TextBrushColorBlendEffect will be replaced by a TextNode2D having a BitmapBrushColorBlend effect.

drawing-4-1676441559.png

The properties of the new TextNode2D will be copied in the following order:

  • From the widget attached to the node
  • From the effect associated to the old node
  • From the common properties of the old node

Source render nodes or text effects can be animated. Animated properties will be exchanged with destination properties. The only eligible property is TextBrushBlend.TextColor. Attached widgets can also be animated. If there is an animation on a property that is part of the conversion, the animated property shall be exchanged with the destination property (for example TextEffectWidget.TextColor).

A specific category called "Text Layout" includes the following properties: TextAlignment, LineSpacing, Trimming, MultiLine and WordWrap.

drawing-4-1676441575.png

All the properties from this category are visible only if Enable Text Layout is checked. If it is unchecked, the default values of the properties will determine in which way the text is rendered.